Commit graph

1,309,163 commits

Author SHA1 Message Date
Nuno Sa
561e2e3e90 iio: dac: ad9739a: write complete MU_CNT1 register during lock
As specified by the datasheet we should write the value 0x3 (enable
plus tracking gain) into the MU_CNT1 register during the MU lock phase.

Currently we were only setting the enable bit (bit 0) as the tracking
gain default value is already set to 1. While we should be mostly fine
in assuming the tracking gain will have the value it should, better to
explicitly write it. On top of that the datasheet also states to
re-attempt the writes in case the lock fails which we were not doing for
the tracking gain bit.

Lastly, the recommended value for the MU phase slope lock (bit 6) is 0
but for some reason the default value is 1 and hence, we were not
changing it accordingly.

Note there was no problem with the MU lock mechanism so this is not
being treated as a fix but rather an improvement.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240429-ad9739a-improv-v1-1-c076a06a697d@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:11:12 +01:00
Wolfram Sang
8d0c937616 iio: pressure: zpa2326: use 'time_left' variable with wait_for_completion_interruptible_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:

	timeout = wait_for_completion_interruptible_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-9-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
b0329b3c7e iio: adc: twl6030-gpadc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:

	timeout = wait_for_completion_interruptible_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-8-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
2f62fd78a1 iio: adc: stm32-dfsdm-adc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:

	timeout = wait_for_completion_interruptible_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-7-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
3cd191fce8 iio: adc: stm32-adc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:

	timeout = wait_for_completion_interruptible_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-6-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
1fa9d4a0a4 iio: adc: intel_mrfld_adc: use 'time_left' variable with wait_for_completion_interruptible_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:

	timeout = wait_for_completion_interruptible_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-5-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
265b81bb75 iio: adc: fsl-imx25-gcq: use 'time_left' variable with wait_for_completion_interruptible_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_interruptible_timeout() causing patterns like:

	timeout = wait_for_completion_interruptible_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-4-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
860e36b702 iio: adc: exynos_adc: use 'time_left' variable with wait_for_completion_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240429113313.68359-3-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:18 +01:00
Wolfram Sang
4d68b25c64 iio: adc: ad_sigma_delta: use 'time_left' variable with wait_for_completion_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240429113313.68359-2-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:06:17 +01:00
Roger Quadros
0b1133ee36 arm64: dts: ti: k3-am625-beagleplay: Fix Ethernet PHY RESET GPIOs
The RESET GPIO pinmux should be part of MDIO bus node
so that they can be in the right state before the PHY
can be probed via MDIO bus scan.

The GPIO pin should be setup with PIN_INPUT so that
input circuitry is enabled in case software wants to
check pin status. Without this, incorrect status is shown
in /sys/kernel/debug/gpio.

Add GPIO reset for the Gigabit Ethernet PHY. As per
RTL8211F datasheet, reset assert width is 10ms and
PHY registers can be access accessed after 50ms of
reset deassert.

Fixes: f5a731f078 ("arm64: dts: ti: Add k3-am625-beagleplay")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20240305-b4-for-v6-9-am65-beagleplay-ethernet-reset-v2-1-2bf463a7bf13@kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-04-29 15:02:48 -05:00
Lincoln Yuji
d164888335 iio: adc: ti-ads1015: use device_for_each_child_node_scoped()
This loop definition removes the need for manual releasing of the
fwnode_handle in early exit paths (here an error path) allow
simplification of the code and reducing the chance of future
modifications not releasing fwnode_handle correctly.

Co-developed-by: Luiza Soezima <lbrsoezima@usp.br>
Signed-off-by: Luiza Soezima <lbrsoezima@usp.br>
Co-developed-by: Sabrina Araujo <sabrinaaraujo@usp.br>
Signed-off-by: Sabrina Araujo <sabrinaaraujo@usp.br>
Signed-off-by: Lincoln Yuji <lincolnyuji@usp.br>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20240429132233.6266-1-lincolnyuji@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 21:00:10 +01:00
Arnd Bergmann
6e0b0f852b i.MX defconfig changes for 6.10:
- Enable DW HDMI bridge driver for i.MX8M Plus SoC in arm64 defconfig
 - Enable ONBOAD_USB_DEV driver in imx_v6_v7_defconfig to support USB2514
   Hub found on imx6qdl-udoo board
 -----BEG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QXtHByl2kAn3r9m4tzgaZLQctopnuVuidDFou8aXbW6fJjX+V2u3F6t
 P30gm1LYK8FpvR89Qnj8TTwR901BJV8j34hGvnIX/dKVXJcEKv3qdL5oE31Jz3S4
 1KJTih1J5gBRTgbKlXytW09HOmDqwX2QsHmW1m9exfgXKn/2JicKJO9YvJcbr917
 BTVCveaWg4JGjYF45smjJwouNJn6bNs7j+TDrjWvrCHVmiImTAU=
 =50Dd
 -----END PGP SIGNATURE-----

Merge tag 'imx-defconfig-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig

i.MX defconfig changes for 6.10:

- Enable DW HDMI bridge driver for i.MX8M Plus SoC in arm64 defconfig
- Enable ONBOAD_USB_DEV driver in imx_v6_v7_defconfig to support USB2514
  Hub found on imx6qdl-udoo board

* tag 'imx-defconfig-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx_v6_v7_defconfig: Update ONBOARD_USB_HUB to ONBOAD_USB_DEV
  ARM: imx_v6_v7_defconfig: Select CONFIG_USB_ONBOARD_HUB
  arm64: defconfig: Enable DRM_IMX8MP_DW_HDMI_BRIDGE as module

Link: https://lore.kernel.org/r/20240428121247.10370-5-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 21:58:50 +02:00
Arnd Bergmann
948b25640f Qualcomm Arm64 Defconfig updates for v6.10
Ext4 security labels are enabled, as the expectation of setcap being
 functional is widespread.
 
 SC7280 display and GPU clock controllers are enabled, to make available
 related functionality. The driver for the Novatek display panel found in
 QCM6490 IDP is enabled.  The X1E80100 sound card and reset-gpio drivers
 are enabled to provide the necessary drivers for this. The regulator
 driver providing VBUS power on a few different platforms is enabled.
 ath12k is present on several recent platforms, so this is enabled as
 well.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmYtJagVHGFuZGVyc3Nv
 bkBrZXJuZWwub3Jn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MFKIuT3SQHtdQVT97kvw6s
 GRB/douim1AwV5Adr1iSMv9mhaGlW0R9oZJ6oKXJa5KRHjTVZGYG66XBm4SuQsdd
 /8dt1+phGhHqNEl8S7m4I0Yh8qWl94l+QsID4D2G0W49eI4diS34835CjxHENHRP
 V20kO0Axxv/ISBSbDcytGFY6i8jq9xjplIoaf4Epj1d7MyodHXMWwfwWm50xWEBG
 KiGljmlzxt/b9kxsW6adLgID+AEgxP03q8iBgeNnTTkfV/QIC7LM4KfXBz9qADgg
 Dzj3yHNA3bIi9RzOsV0vzUSSUAPAEYD1n42H99dtgylg12v4Oz0Z9bTF+HjmCDsW
 N5LktcLwooNUo4LgV+L0bqAeaq6FfESs0RRRxPcfTM9yjt5TByOvFTe0VVZ8xEFd
 NXMhxjWKgMH+CNNJKbCCc3mO4/JMaH6yQ48g4pSulNw+ACVNdUs=
 =CgrU
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-defconfig-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig

Qualcomm Arm64 Defconfig updates for v6.10

Ext4 security labels are enabled, as the expectation of setcap being
functional is widespread.

SC7280 display and GPU clock controllers are enabled, to make available
related functionality. The driver for the Novatek display panel found in
QCM6490 IDP is enabled.  The X1E80100 sound card and reset-gpio drivers
are enabled to provide the necessary drivers for this. The regulator
driver providing VBUS power on a few different platforms is enabled.
ath12k is present on several recent platforms, so this is enabled as
well.

* tag 'qcom-arm64-defconfig-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: enable REGULATOR_QCOM_USB_VBUS
  arm64: defconfig: enable ext4 security labels
  arm64: defconfig: qcom: enable X1E80100 sound card
  arm64: defconfig: build ath12k as a module
  arm64: defconfig: Enable sc7280 display and gpu clock controllers
  arm64: defconfig: enable reset-gpio driver as module
  arm64: defconfig: enable Novatek NT36672E DSI Panel driver

Link: https://lore.kernel.org/r/20240427162037.1431822-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 21:58:07 +02:00
Gustavo Rodrigues
80f87d6bbc iio: adc: ad799x: Prefer to use octal permission
Octal permissions are preferred over the symbolics ones
for readbility. This ceases warning message pointed by checkpatch.

Co-developed-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Gustavo Rodrigues <ogustavo@usp.br>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240428194326.2836387-4-ogustavo@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:57:56 +01:00
Gustavo Rodrigues
0fb3e211ac iio: adc: ad799x: add blank line to avoid warning messages
Add a blank line before if statement to avoid warning messages pointed by
checkpatch.

Co-developed-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Gustavo Rodrigues <ogustavo@usp.br>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240428194326.2836387-3-ogustavo@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:57:56 +01:00
Gustavo Rodrigues
da8cf0d732 iio: adc: ad799x: change 'unsigned' to 'unsigned int' declaration
Prefer 'unsigned int' instead of bare use of 'unsigned' declarations to
to improve code readbility. This ceases one of the warning messages
pointed by checkpatch.

Co-developed-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Bruna Lopes <brunaafl@usp.br>
Signed-off-by: Gustavo Rodrigues <ogustavo@usp.br>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240428194326.2836387-2-ogustavo@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:57:56 +01:00
Arnd Bergmann
ee00d5ceb2 arm64: tegra: Default configuration updates for v6.10-rc1
Enables the Security Engine driver for the corresponding devices found
 on Tegra234.
 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O+kc6TO2loqOYUGf814fDo32iisYOG78cq3qUhQ
 uM+LAK85lEIUto5ATeH/xWdtZ8VtJe7NqYobBzX+paUfe0CqTprBvw5dqsi2pNVW
 bMssMIedp9O4hHBUDNfVn+tHd0HFj8wNx9EZHAup54tKiTP7rsErh/Hm6SV2w2hW
 DqL0jmhwVTGmvavjCiykq3bxED+cEENrojWLpUc3a+LbyI1rNHeEJFGonLiPMIv9
 VtyViR0eskzC1JaOSh5vtMVcpbcapvzysZH3rxQkRPrxjNjZJxgIjeqxGabl2x0V
 IJb2ht4d0slpT3nd9BGnR1uBeZoFkifRajBdYY77J8J5+tHSqaB5rIeCK/yakSQ6
 FRLEdysZRseQkvZICttWfDWKiCUaQZN9doRk3i7PJ39bP/uyY547xA21plALWUkH
 ZBVQ6190ZeIDMqqW4nmGA4IqW7kPPTmM21Ko1/BeN2SvkuFzWl8xaI5ni6xItaiv
 /YiqPfFCRCn+1P6bQRFcqVhlhoHAmpr8T4Z018tR6+Z5BUoNg44=
 =uQMc
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.10-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/defconfig

arm64: tegra: Default configuration updates for v6.10-rc1

Enables the Security Engine driver for the corresponding devices found
on Tegra234.

* tag 'tegra-for-6.10-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Enable Tegra Security Engine

Link: https://lore.kernel.org/r/20240426180519.3972626-5-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 21:57:30 +02:00
Arnd Bergmann
b898011703 - add dependency for DRM_SUN8I_DW_HDMI in sunxi defconfig
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCZivWZgAKCRB0Ba7+DO8k
 k8HsAQCNcxRsaeprzi/d3PdieOuUmAwY7W7CLnot2Q6eH9YL1gD/eil8mFLrVP2k
 f+s0NzHgxldLFpICnCEL2u+MlBrFtws=
 =eVnM
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYv+4IACgkQYKtH/8kJ
 Uienzw//X09Hjcd38LCKehBTGut9Ab/B6Ujo7OwzhSXhCSzpoo5SWJkxe9yeOeOf
 qcsrxlTjFwMfMEUV8TBIuOoEqUNbnn/ghneESN6oWD2fXpoX1Eulgdrw5gpJoZDW
 2EmfqEHmugv5BJrO0IuekqERaaXSZKE4QRblLSyB7DGIMAOr4MaMulGgnobwWKe4
 UkgSdN3tI5z8bFuRni+PCE1oqHM9PMEAQXoOugHbKnXrpYrU3uEWNiIYrMAbhaCE
 ujFNFhV3bXf18FiFC3loZbhyu32gnVAOny/O3VLdaNMGeJYoZrwQxAIcvghiVOH7
 baw3osoO6qluq2J6bN5jmTXcuZk43HI5UNmeaQiEmc5WSGbSDSbAR6YROtUN4M5C
 mP1IwaYrAQk9OSZvFeuRwOowipaGiMBo/9N9BdNLBI6FL8CjKqUwuq73MgxatBbu
 sUQK63KzfTGh0SyvGRyIBFByf6gxN54FX54TpfWOtSIR2kJCX35AXAKbWWxxFr4I
 daE+kBK1wdpo5/ipjOwvHnuykbsZ+duantXTr/LvuLyqklJarNynrJfCYxzZou2A
 ELIYhI7G9dZFn2PQdOe0B3kIPqEyA4d/Smh8+enGXGXCn8t+ysSRI8I75TtZw3Bp
 fubat45X6bWj86UXpPMFYX9XPITN65nk2CtBG01NnHGDbMMGZjk=
 =UvMr
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config-for-6.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/defconfig

- add dependency for DRM_SUN8I_DW_HDMI in sunxi defconfig

* tag 'sunxi-config-for-6.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: configs: sunxi: Enable DRM_DW_HDMI

Link: https://lore.kernel.org/r/20240426164354.GA101098@jernej-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 21:56:50 +02:00
Jonathan Cameron
6a28a72ad2 iio: adc: mcp3564: Use device_for_each_child_node_scoped()
Switching to the _scoped() version removes the need for manual
calling of fwnode_handle_put() in the paths where the code
exits the loop early. In this case that's all in error paths.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Marius Cristea <marius.cristea@microchip.com>
Link: https://lore.kernel.org/r/20240428174020.1832825-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:55:24 +01:00
Sean Christopherson
b093f87fd1 KVM: selftests: Drop @selector from segment helpers
Drop the @selector from the kernel code, data, and TSS builders and
instead hardcode the respective selector in the helper.  Accepting a
selector but not a base makes the selector useless, e.g. the data helper
can't create per-vCPU for FS or GS, and so loading GS with KERNEL_DS is
the only logical choice.

And for code and TSS, there is no known reason to ever want multiple
segments, e.g. there are zero plans to support 32-bit kernel code (and
again, that would require more than just the selector).

If KVM selftests ever do add support for per-vCPU segments, it'd arguably
be more readable to add a dedicated helper for building/setting the
per-vCPU segment, and move the common data segment code to an inner
helper.

Lastly, hardcoding the selector reduces the probability of setting the
wrong selector in the vCPU versus what was created by the VM in the GDT.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-19-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:22 -07:00
Sean Christopherson
0f53a02450 KVM: selftests: Init x86's segments during VM creation
Initialize x86's various segments in the GDT during creation of relevant
VMs instead of waiting until vCPUs come along.  Re-installing the segments
for every vCPU is both wasteful and confusing, as is installing KERNEL_DS
multiple times; NOT installing KERNEL_DS for GS is icing on the cake.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-18-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:21 -07:00
Sean Christopherson
f18ef97fc6 KVM: selftests: Add macro for TSS selector, rename up code/data macros
Add a proper #define for the TSS selector instead of open coding 0x18 and
hoping future developers don't use that selector for something else.

Opportunistically rename the code and data selector macros to shorten the
names, align the naming with the kernel's scheme, and capture that they
are *kernel* segments.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-17-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:20 -07:00
Sean Christopherson
a2834e6e0b KVM: selftests: Allocate x86's TSS at VM creation
Allocate x86's per-VM TSS at creation of a non-barebones VM.  Like the
GDT, the TSS is needed to actually run vCPUs, i.e. every non-barebones VM
is all but guaranteed to allocate the TSS sooner or later.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-16-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:19 -07:00
Sean Christopherson
23ef21f58c KVM: selftests: Fold x86's descriptor tables helpers into vcpu_init_sregs()
Now that the per-VM, on-demand allocation logic in kvm_setup_gdt() and
vcpu_init_descriptor_tables() is gone, fold them into vcpu_init_sregs().

Note, both kvm_setup_gdt() and vcpu_init_descriptor_tables() configured the
GDT, which is why it looks like kvm_setup_gdt() disappears.

Opportunistically delete the pointless zeroing of the IDT limit (it was
being unconditionally overwritten by vcpu_init_descriptor_tables()).

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-15-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:18 -07:00
Sean Christopherson
1051e29cb9 KVM: selftests: Drop superfluous switch() on vm->mode in vcpu_init_sregs()
Replace the switch statement on vm->mode in x86's vcpu_init_sregs()'s with
a simple assert that the VM has a 48-bit virtual address space.  A switch
statement is both overkill and misleading, as the existing code incorrectly
implies that VMs with LA57 would need different to configuration for the
LDT, TSS, and flat segments.  In all likelihood, the only difference that
would be needed for selftests is CR4.LA57 itself.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-14-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:17 -07:00
Sean Christopherson
2a511ca994 KVM: selftests: Allocate x86's GDT during VM creation
Allocate the GDT during creation of non-barebones VMs instead of waiting
until the first vCPU is created, as the whole point of non-barebones VMs
is to be able to run vCPUs, i.e. the GDT is going to get allocated no
matter what.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:17 -07:00
Sean Christopherson
44c93b2772 KVM: selftests: Map x86's exception_handlers at VM creation, not vCPU setup
Map x86's exception handlers at VM creation, not vCPU setup, as the
mapping is per-VM, i.e. doesn't need to be (re)done for every vCPU.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-12-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:16 -07:00
Sean Christopherson
c1b9793b45 KVM: selftests: Init IDT and exception handlers for all VMs/vCPUs on x86
Initialize the IDT and exception handlers for all non-barebones VMs and
vCPUs on x86.  Forcing tests to manually configure the IDT just to save
8KiB of memory is a terrible tradeoff, and also leads to weird tests
(multiple tests have deliberately relied on shutdown to indicate success),
and hard-to-debug failures, e.g. instead of a precise unexpected exception
failure, tests see only shutdown.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:15 -07:00
Sean Christopherson
d8c63805e4 KVM: selftests: Rename x86's vcpu_setup() to vcpu_init_sregs()
Rename vcpu_setup() to be more descriptive and precise, there is a whole
lot of "setup" that is done for a vCPU that isn't in said helper.

No functional change intended.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:14 -07:00
Sean Christopherson
b62c32c532 KVM: selftests: Move x86's descriptor table helpers "up" in processor.c
Move x86's various descriptor table helpers in processor.c up above
kvm_arch_vm_post_create() and vcpu_setup() so that the helpers can be
made static and invoked from the aforementioned functions.

No functional change intended.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-9-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:13 -07:00
Sean Christopherson
61c3cffd4c KVM: selftests: Explicitly clobber the IDT in the "delete memslot" testcase
Explicitly clobber the guest IDT in the "delete memslot" test, which
expects the deleted memslot to result in either a KVM emulation error, or
a triple fault shutdown.  A future change to the core selftests library
will configuring the guest IDT and exception handlers by default, i.e.
will install a guest #PF handler and put the guest into an infinite #NPF
loop (the guest hits a !PRESENT SPTE when trying to vector a #PF, and KVM
reinjects the #PF without fixing the #NPF, because there is no memslot).

Note, it's not clear whether or not KVM's behavior is reasonable in this
case, e.g. arguably KVM should try (and fail) to emulate in response to
the #NPF.  But barring a goofy/broken userspace, this scenario will likely
never happen in practice.  Punt the KVM investigation to the future.

Link: https://lore.kernel.org/r/20240314232637.2538648-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:12 -07:00
Sean Christopherson
dec79eab2b KVM: selftests: Rework platform_info_test to actually verify #GP
Rework platform_info_test to actually handle and verify the expected #GP
on RDMSR when the associated KVM capability is disabled.  Currently, the
test _deliberately_ doesn't handle the #GP, and instead lets it escalated
to a triple fault shutdown.

In addition to verifying that KVM generates the correct fault, handling
the #GP will be necessary (without even more shenanigans) when a future
change to the core KVM selftests library configures the IDT and exception
handlers by default (the test subtly relies on the IDT limit being '0').

Link: https://lore.kernel.org/r/20240314232637.2538648-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:11 -07:00
Sean Christopherson
53635ec253 KVM: selftests: Move platform_info_test's main assert into guest code
As a first step toward gracefully handling the expected #GP on RDMSR in
platform_info_test, move the test's assert on the non-faulting RDMSR
result into the guest itself.  This will allow using a unified flow for
the host userspace side of things.

Link: https://lore.kernel.org/r/20240314232637.2538648-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:11 -07:00
Ackerley Tng
0d95817e07 KVM: selftests: Fix off-by-one initialization of GDT limit
Fix an off-by-one bug in the initialization of the GDT limit, which as
defined in the SDM is inclusive, not exclusive.

Note, vcpu_init_descriptor_tables() gets the limit correct, it's only
vcpu_setup() that is broken, i.e. only tests that _don't_ invoke
vcpu_init_descriptor_tables() can have problems.  And the fact that KVM
effectively initializes the GDT twice will be cleaned up in the near
future.

Signed-off-by: Ackerley Tng <ackerleytng@google.com>
[sean: rewrite changelog]
Link: https://lore.kernel.org/r/20240314232637.2538648-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:10 -07:00
Sean Christopherson
3a085fbf82 KVM: selftests: Move GDT, IDT, and TSS fields to x86's kvm_vm_arch
Now that kvm_vm_arch exists, move the GDT, IDT, and TSS fields to x86's
implementation, as the structures are firmly x86-only.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:55:07 -07:00
Sean Christopherson
f54884f938 KVM: sefltests: Add kvm_util_types.h to hold common types, e.g. vm_vaddr_t
Move the base types unique to KVM selftests out of kvm_util.h and into a
new header, kvm_util_types.h.  This will allow kvm_util_arch.h, i.e. core
arch headers, to reference common types, e.g. vm_vaddr_t and vm_paddr_t.

No functional change intended.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:54:16 -07:00
Sean Christopherson
2b7deea3ec Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h"
Effectively revert the movement of code from kvm_util.h => kvm_util_base.h,
as the TL;DR of the justification for the move was to avoid #idefs and/or
circular dependencies between what ended up being ucall_common.h and what
was (and now again, is), kvm_util.h.

But avoiding #ifdef and circular includes is trivial: don't do that.  The
cost of removing kvm_util_base.h is a few extra includes of ucall_common.h,
but that cost is practically nothing.  On the other hand, having a "base"
version of a header that is really just the header itself is confusing,
and makes it weird/hard to choose names for headers that actually are
"base" headers, e.g. to hold core KVM selftests typedefs.

For all intents and purposes, this reverts commit
7d9a662ed9.

Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20240314232637.2538648-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29 12:54:13 -07:00
Nuno Sa
05c4081fbf iio: adc: ad9467: support digital interface calibration
To make sure that we have the best timings on the serial data interface
we should calibrate it. This means going through the device supported
values and see for which ones we get a successful result. To do that, we
use a prbs test pattern both in the IIO backend and in the frontend
devices. Then for each of the test points we see if there are any
errors. Note that the backend is responsible to look for those errors.

As calibrating the interface also requires that the data format is disabled
(the one thing being done in ad9467_setup()), ad9467_setup() was removed
and configuring the data fomat is now part of the calibration process.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-7-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
Nuno Sa
7ecb8ee5c9 iio: adc: adi-axi-adc: support digital interface calibration
Implement the new IIO backend APIs for calibrating the data
digital interfaces.

While at it, removed the tabs in 'struct adi_axi_adc_state' and used
spaces for the members.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-6-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
Nuno Sa
fbc186055b iio: adc: adi-axi-adc: remove regmap max register
In one of the following patches, we'll have some new functionality that
requires reads/writes on registers bigger than 0x8000. Hence, as this is
an highly flexible core, don't bother in setting 'max_register' and
remove it from regmap_config.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-5-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
Nuno Sa
c66eabcc1c iio: backend: add API for interface tuning
This is in preparation for supporting interface tuning in one for the
devices using the axi-adc backend. The new added interfaces are all
needed for that calibration:

 * iio_backend_test_pattern_set();
 * iio_backend_chan_status();
 * iio_backend_iodelay_set();
 * iio_backend_data_sample_trigger().

Interface tuning is the process of going through a set of known points
(typically by the frontend), change some clk or data delays (or both)
and send/receive some known signal (so called test patterns in this
change). The receiving end (either frontend or the backend) is
responsible for validating the signal and see if it's good or not. The
goal for all of this is to come up with ideal delays at the data
interface level so we can have a proper, more reliable data transfer.

Also note that for some devices we can change the sampling rate
(which typically means changing some reference clock) and that can
affect the data interface. In that case, it's import to run the tuning
algorithm again as the values we had before may no longer be the best (or
even valid) ones.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-2-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
Nuno Sa
09415814cd iio: backend: change docs padding
Using tabs and maintaining the start of the docs aligned is a pain and
may lead to lot's of unrelated changes when adding new members. Hence,
let#s change things now and just have a simple space after the member
name.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-1-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
Nuno Sa
80721776c5 iio: adc: axi-adc: make sure AXI clock is enabled
We can only access the IP core registers if the bus clock is enabled. As
such we need to get and enable it and not rely on anyone else to do it.

Note this clock is a very fundamental one that is typically enabled
pretty early during boot. Independently of that, we should really rely on
it to be enabled.

Fixes: ef04070692 ("iio: adc: adi-axi-adc: add support for AXI ADC IP core")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-4-6361fc3ba1cc@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
Nuno Sa
19fb11d722 dt-bindings: adc: axi-adc: add clocks property
Add a required clock property as we can't access the device registers if
the AXI bus clock is not properly enabled.

Note this clock is a very fundamental one that is typically enabled
pretty early during boot. Independently of that, we should really rely on
it to be enabled.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes: 96553a44e9 ("dt-bindings: iio: adc: add bindings doc for AXI ADC driver")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-3-6361fc3ba1cc@analog.com
Cc: <Stable@ver.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:26 +01:00
David Lechner
633e3015ca docs: iio: ad7944: add documentation for chain mode
Add documentation for chain mode support that was recently added to the
AD7944 ADC driver.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240425-iio-ad7944-chain-mode-v1-2-9d9220ff21e1@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:25 +01:00
David Lechner
64ce7d4348 iio: adc: ad7944: add support for chain mode
This adds support for the chain mode of the AD7944 ADC. This mode allows
multiple ADCs to be daisy-chained together. Data from all of the ADCs in
is read by reading multiple words from the first ADC in the chain.

Each chip in the chain adds an extra IIO input voltage channel to the
IIO device.

Only the wiring configuration where the SPI controller CS line is
connected to the CNV pin of all of the ADCs in the chain is supported
in this patch.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240425-iio-ad7944-chain-mode-v1-1-9d9220ff21e1@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:25 +01:00
Dan Carpenter
73e49886a2 iio: dac: adi-axi: fix a mistake in axi_dac_ext_info_set()
The last parameter of these axi_dac_(frequency|scale|phase)_set()
functions is supposed to be true for TONE_2 and false for TONE_1. The
bug is the last call where it passes "private - TONE_2".  That
subtraction is going to be zero/false for TONE_2 and and -1/true for
TONE_1.  Fix the bug, and re-write it as "private == TONE_2" so it's
more obvious what is happening.

Fixes: 4e3949a192 ("iio: dac: add support for AXI DAC IP core")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/df7c6e1b-b619-40c3-9881-838587ed15d4@moroto.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:25 +01:00
Jean-Baptiste Maneyrol
a1432b5b4f iio: imu: inv_icm42600: add support of ICM-42686-P
Add ICM-42686-P chip supporting high FSRs (32G, 4000dps).

Create accel and gyro iio device states with dynamic scales table
set at device init.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240422152240.85974-3-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:25 +01:00
Jean-Baptiste Maneyrol
3b0c133612 dt-bindings: iio: imu: add icm42686 inside inv_icm42600
Add bindings for ICM-42686-P chip supporting high FSRs.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240422152240.85974-2-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:25 +01:00
Andy Shevchenko
62de5e3e31 iio: light: stk3310: Drop most likely fake ACPI ID
The commit in question does not proove that ACPI ID exists.
Quite likely it was a cargo cult addition while doint that
for DT-based enumeration.  Drop most likely fake ACPI ID.

Googling for STK3335 gives no useful results in regard to DSDT.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240415141852.853490-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-29 20:53:25 +01:00