Commit Graph

6751 Commits

Author SHA1 Message Date
Jishnu Prakash
29f8dd9fa0 iio: qcom-spmi-adc5-gen3: update module removal API
When the ADC5 Gen3 module is removed, all channels on all SDAMs
are disabled in a loop. Add a wait for HS bit to become ready
in the loop before each individual channel disable request,
similar to the wait done before requesting an immediate or
ADC_TM configuration, to ensure that each channel disable is
completed before the next one is requested.

This ensures that if the ADC module is unloaded, there are no channels
remaining enabled doing recurring TM measurements or threshold
violation interrupts for them which go unhandled in the absence
of the module.

In addition, free all IRQs during module removal, to avoid any
unnecessary interrupt handling work and update IRQ request and
release APIs accordingly to avoid using the devm_ variants.

Change-Id: I5e2d9363851a3391ab59eb5857e9def77c152a12
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
2023-11-10 10:58:39 +05:30
Mario Tesi
553dbbcd03 drivers:iio:stm:pressure:st_ilps22qs: add support to interleaved mode
Enable reading QVAR and Pressure data using interleaved mode.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I67a1929a027ca96dc114d1cea3d79f9881073917
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/292591
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-03 17:38:18 +01:00
Mario Tesi
a99961ef6e drivers:iio:stm:pressure:st_ilps22qs: add support to QVAR/AH
The ilps22qs pressure sensor supports analog hub (AH)
function for processing analog input data and Qvar for
detecting the change in electrical charge.
When using the QVAR/AH feature it will be necessary
to deactivate the pressure sensor and vice versa because
these share the same output registers.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I326960a9fcdfa32d49c65c6a42bb2100b256e247
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/291894
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-03 17:38:18 +01:00
Mario Tesi
2335ba801c drivers:iio:stm:pressure:st_ilps22qs: add support to ilps28qws
Added support to the ilps28qws device that is the waterproof
version of the ilps22qs, it shares the same basic functionalities
of ilps22qs pressure sensor.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I883bdc5842c9daa6501304ad10e776e11cda1c17
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/286584
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-03 17:38:18 +01:00
Mario Tesi
3a162cf3d9 drivers:iio:stm:pressure: add support to ilps22qs STMEMS Pressure sensor
Preliminary version of ilps22qs STMEMS Pressure driver to enable
reading data from pressure and temperature sensors.
Since the interrupts of the device are exclusively software, timers
have been used for the management of the data polling in continuous
mode with IIO buffer.

Available features:
 - Configure ODR for Pressure and Temperature sensor
 - Reading raw Pressure and Temperature sensor data
 - Reading IIO buffer Pressure and Temperature sensor data

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ifce3655b2687911b88bdbc854f6ff42778b60a40
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/284832
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-03 17:38:18 +01:00
mariotesi
d51f3298c0 drivers:iio:stm:imu:st_lsm6dso16is: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I30aa6c34575ed346dc4e3e34aa283721650ab4b9
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336875
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
1dd9fc843b drivers:iio:stm:imu:st_lsm6dsox: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I26ae22d85ae5fd6f9be15e57f1e70ddaffc2c311
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336874
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-02 11:09:20 +01:00
mariotesi
c6c8798654 drivers:iio:stm:imu:st_lsm6dsvx: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I2a590df2b22fdd3f8ab73558901c513b3d960a50
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336873
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
ab0db8a9c7 drivers:iio:stm:imu:st_lsm6dsrx: add delay during gyro self-test
During the gyro self-test procedure, a delay of 150ms must be
inserted between the gyro power-off and power-on phase.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: Ieca6ba8ed4708227650b7761823b8b73c26f0980
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333376
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
eb47872371 drivers:iio:stm:imu:st_ism330dhcx: add self test procedure
Added selfr-test procedure for acc and gyro sensors.

Possible sels-tests are:
positive sign and negative sign according to AN5398.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I86ab7c6ef6e6475d2d8337531fbcfe9a4d4ee904
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333375
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
fae638ec9b drivers:iio:stm:imu:st_asm330lhhx: add delay during gyro self-test
During the gyro self-test procedure, a delay of 150ms must be
inserted between the gyro power-off and power-on phase.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I556ad49fc2a44d0066bf05db32cc99a50be01d6c
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333374
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
Robert Hancock
6ec84059b5 iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale
commit e2bd8c28b9bd835077eb65715d416d667694a80d upstream.

The driver was previously using offset and scale values for the
temperature sensor readings which were only valid for 7-series devices.
Add per-device-type values for offset and scale and set them appropriately
for each device type.

Note that the values used for the UltraScale family are for UltraScale+
(i.e. the SYSMONE4 primitive) using the internal reference, as that seems
to be the most common configuration and the device tree values Xilinx's
device tree generator produces don't seem to give us anything to tell us
which configuration is used. However, the differences within the UltraScale
family seem fairly minor and it's closer than using the 7-series values
instead in any case.

Fixes: c2b7720a79 ("iio: xilinx-xadc: Add basic support for Ultrascale System Monitor")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Acked-by: O'Griofa, Conall <conall.ogriofa@amd.com>
Tested-by: O'Griofa, Conall <conall.ogriofa@amd.com>
Link: https://lore.kernel.org/r/20230915001019.2862964-3-robert.hancock@calian.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-02 09:35:30 +01:00
Robert Hancock
e26fd381bf iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
commit 8d6b3ea4d9eaca80982442b68a292ce50ce0a135 upstream.

In the probe function, the driver was reading out the thresholds already
set in the core, which can be configured by the user in the Vivado tools
when the FPGA image is built. However, it later clobbered those values
with zero or maximum values. In particular, the overtemperature shutdown
threshold register was overwritten with the max value, which effectively
prevents the FPGA from shutting down when the desired threshold was
eached, potentially risking hardware damage in that case.

Remove this code to leave the preconfigured default threshold values
intact.

The code was also disabling all alarms regardless of what enable state
they were left in by the FPGA image, including the overtemperature
shutdown feature. Leave these bits in their original state so they are
not unconditionally disabled.

Fixes: bdc8cda1d0 ("iio:adc: Add Xilinx XADC driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Acked-by: O'Griofa, Conall <conall.ogriofa@amd.com>
Tested-by: O'Griofa, Conall <conall.ogriofa@amd.com>
Link: https://lore.kernel.org/r/20230915001019.2862964-2-robert.hancock@calian.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-02 09:35:29 +01:00
Marek Szyprowski
cb01837e0f iio: exynos-adc: request second interupt only when touchscreen mode is used
commit 865b080e3229102f160889328ce2e8e97aa65ea0 upstream.

Second interrupt is needed only when touchscreen mode is used, so don't
request it unconditionally. This removes the following annoying warning
during boot:

exynos-adc 14d10000.adc: error -ENXIO: IRQ index 1 not found

Fixes: 2bb8ad9b44 ("iio: exynos-adc: add experimental touchscreen support")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20231009101412.916922-1-m.szyprowski@samsung.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-02 09:35:29 +01:00
Linus Walleij
7a641bc52f iio: afe: rescale: Accept only offset channels
commit bee448390e5166d019e9e037194d487ee94399d9 upstream.

As noted by Jonathan Cameron: it is perfectly legal for a channel
to have an offset but no scale in addition to the raw interface.
The conversion will imply that scale is 1:1.

Make rescale_configure_channel() accept just scale, or just offset
to process a channel.

When a user asks for IIO_CHAN_INFO_OFFSET in rescale_read_raw()
we now have to deal with the fact that OFFSET could be present
but SCALE missing. Add code to simply scale 1:1 in this case.

Link: https://lore.kernel.org/linux-iio/CACRpkdZXBjHU4t-GVOCFxRO-AHGxKnxMeHD2s4Y4PuC29gBq6g@mail.gmail.com/
Fixes: 53ebee9499 ("iio: afe: iio-rescale: Support processed channels")
Fixes: 9decacd8b3 ("iio: afe: rescale: Fix boolean logic bug")
Reported-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20230902-iio-rescale-only-offset-v2-1-988b807754c8@linaro.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-02 09:35:29 +01:00
Mario Tesi
00dafc186d drivers:iio:stm:magnetometer:st_mag40: use dev_to_iio_dev() in sysfs callbacks
On kernel 6.1 the `dev_get_drvdata()` in IIO sysfs callbacks cause
a kernel panic because the IIO core as well as most other drivers have
switched over to using `dev_to_iio_dev()`.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I1284174ebc0bc5b8ab3634d4912f9562ba76dbea
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/335847
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-10-31 17:45:11 +01:00
Mario Tesi
46cffd34d7 drivers:iio:stm:accel:st_acc33: use dev_to_iio_dev() in sysfs callbacks
On kernel 6.1 the `dev_get_drvdata()` in IIO sysfs callbacks cause
a kernel panic because the IIO core as well as most other drivers have
switched over to using `dev_to_iio_dev()`.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I891493c3562dea8ce71e1653bc5f938947afb876
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/335869
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-10-31 17:43:07 +01:00
mariotesi
492ec504f9 drivers:iio:stm:pressure:st_lps22df: add 4060 hPa full scale to lps28dfw
This commit add to compatible STMEMS pressure device
lps28dfw support up to 4060 hPa full scale.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I654548c05730e5940e912c9c46e7233a79e770c8
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336274
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-10-27 10:21:12 +02:00
mariotesi
d16f631654 drivers:iio:stm:pressure:st_lps22df: fix 'Bad address' error in setting sampling_frequency
The function st_lps22df_write_raw() should return 0
to indicate a successful frequency configuration,
rather than returning the value from st_lps22df_get_odr().

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I318b6a7f0ed5851541f560286f8a12bf2a726906
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336076
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-10-27 10:21:12 +02:00
Alisa-Dariana Roman
82a93c65a4 iio: adc: ad7192: Correct reference voltage
[ Upstream commit 7e7dcab620cd6d34939f615cac63fc0ef7e81c72 ]

The avdd and the reference voltage are two different sources but the
reference voltage was assigned according to the avdd supply.

Add vref regulator structure and set the reference voltage according to
the vref supply from the devicetree.

In case vref supply is missing, reference voltage is set according to
the avdd supply for compatibility with old devicetrees.

Fixes: b581f748cc ("staging: iio: adc: ad7192: move out of staging")
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230924152149.41884-1-alisadariana@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-25 12:03:09 +02:00
Matti Vaittinen
ee1d783be5 iio: adc: ad7192: Simplify using devm_regulator_get_enable()
[ Upstream commit 1ccef2e6e9205e209ad958d2e591bcca60981007 ]

Use devm_regulator_get_enable() instead of open coded get, enable,
add-action-to-disable-at-detach - pattern. Also drop the seemingly unused
struct member 'dvdd'.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/9719c445c095d3d308e2fc9f4f93294f5806c41c.1660934107.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 7e7dcab620cd ("iio: adc: ad7192: Correct reference voltage")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-25 12:03:09 +02:00
Tzung-Bi Shih
3b02dbd1cd iio: cros_ec: fix an use-after-free in cros_ec_sensors_push_data()
[ Upstream commit 7771c8c80d62ad065637ef74ed2962983f6c5f6d ]

cros_ec_sensors_push_data() reads `indio_dev->active_scan_mask` and
calls iio_push_to_buffers_with_timestamp() without making sure the
`indio_dev` stays in buffer mode.  There is a race if `indio_dev` exits
buffer mode right before cros_ec_sensors_push_data() accesses them.

An use-after-free on `indio_dev->active_scan_mask` was observed.  The
call trace:
[...]
 _find_next_bit
 cros_ec_sensors_push_data
 cros_ec_sensorhub_event
 blocking_notifier_call_chain
 cros_ec_irq_thread

It was caused by a race condition: one thread just freed
`active_scan_mask` at [1]; while another thread tried to access the
memory at [2].

Fix it by calling iio_device_claim_buffer_mode() to ensure the
`indio_dev` can't exit buffer mode during cros_ec_sensors_push_data().

[1]: https://elixir.bootlin.com/linux/v6.5/source/drivers/iio/industrialio-buffer.c#L1189
[2]: https://elixir.bootlin.com/linux/v6.5/source/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c#L198

Cc: stable@vger.kernel.org
Fixes: aa984f1ba4 ("iio: cros_ec: Register to cros_ec_sensorhub when EC supports FIFO")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20230829030622.1571852-1-tzungbi@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-25 12:03:09 +02:00
Nuno Sá
7bca0af538 iio: core: introduce iio_device_{claim|release}_buffer_mode() APIs
[ Upstream commit 0a8565425afd8ba0e1a0ea73e21da119ee6dacea ]

These APIs are analogous to iio_device_claim_direct_mode() and
iio_device_release_direct_mode() but, as the name suggests, with the
logic flipped. While this looks odd enough, it will have at least two
users (in following changes) and it will be important to move the IIO
mlock to the private struct.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20221012151620.1725215-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 7771c8c80d62 ("iio: cros_ec: fix an use-after-free in cros_ec_sensors_push_data()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-25 12:03:09 +02:00
Antoniu Miclaus
ff42d244b3 iio: addac: Kconfig: update ad74413r selections
commit b120dd3a15582fb7a959cecb05e4d9814fcba386 upstream.

Building ad74413r without selecting IIO_BUFFER and
IIO_TRIGGERED_BUFFER generates error with respect to the iio trigger
functions that are used within the driver.
Update the Kconfig accordingly.

Fixes: fea251b6a5 ("iio: addac: add AD74413R driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20230912085421.51102-1-antoniu.miclaus@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Alexander Zangerl
7d4ff34b6c iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
commit fd39d9668f2ce9f4b05ad55e8c8d80c098073e0b upstream.

The ms5611 driver falsely rejects lots of MS5607-02BA03-50 chips
with "PROM integrity check failed" because it doesn't accept a prom crc
value of zero as legitimate.

According to the datasheet for this chip (and the manufacturer's
application note about the PROM CRC), none of the possible values for the
CRC are excluded - but the current code in ms5611_prom_is_valid() ends with

return crc_orig != 0x0000 && crc == crc_orig

Discussed with the driver author (Tomasz Duszynski) and he indicated that
at that time (2015) he was dealing with some faulty chip samples which
returned blank data under some circumstances and/or followed example code
which indicated CRC zero being bad.

As far as I can tell this exception should not be applied anymore; We've
got a few hundred custom boards here with this chip where large numbers
of the prom have a legitimate CRC value 0, and do work fine, but which the
current driver code wrongly rejects.

Signed-off-by: Alexander Zangerl <az@breathe-safe.com>
Fixes: c0644160a8 ("iio: pressure: add support for MS5611 pressure and temperature sensor")
Link: https://lore.kernel.org/r/2535-1695168070.831792@Ze3y.dhYT.s3fx
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Lakshmi Yadlapati
b166ce5275 iio: pressure: dps310: Adjust Timeout Settings
commit 901a293fd96fb9bab843ba4cc7be3094a5aa7c94 upstream.

The DPS310 sensor chip has been encountering intermittent errors while
reading the sensor device across various system designs. This issue causes
the chip to become "stuck," preventing the indication of "ready" status
for pressure and temperature measurements in the MEAS_CFG register.

To address this issue, this commit fixes the timeout settings to improve
sensor stability:
- After sending a reset command to the chip, the timeout has been extended
  from 2.5 ms to 15 ms, aligning with the DPS310 specification.
- The read timeout value of the MEAS_CFG register has been adjusted from
  20ms to 30ms to match the specification.

Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Fixes: 7b4ab4abce ("iio: pressure: dps310: Reset chip after timeout")
Link: https://lore.kernel.org/r/20230829180222.3431926-2-lakshmiy@us.ibm.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Antoniu Miclaus
e93a7677f0 iio: admv1013: add mixer_vgate corner cases
commit 287d998af24326b009ae0956820a3188501b34a0 upstream.

Include the corner cases in the computation of the MIXER_VGATE register
value.

According to the datasheet: The MIXER_VGATE values follows the VCM such
as, that for a 0V to 1.8V VCM, MIXER_VGATE = 23.89 VCM + 81, and for a >
1.8V to 2.6V VCM, MIXER_VGATE = 23.75 VCM + 1.25.

Fixes: da35a7b526 ("iio: frequency: admv1013: add support for ADMV1013")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230807143806.6954-1-antoniu.miclaus@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Marcelo Schmitt
8ab33ae244 iio: dac: ad3552r: Correct device IDs
commit 9a85653ed3b9a9b7b31d95a34b64b990c3d33ca1 upstream.

Device IDs for AD3542R and AD3552R were swapped leading to unintended
collection of DAC output ranges being used for each design.
Change device ID values so they are correct for each DAC chip.

Fixes: 8f2b54824b ("drivers:iio:dac: Add AD3552R driver support")
Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reported-by: Chandrakant Minajigi <Chandrakant.Minajigi@analog.com>
Link: https://lore.kernel.org/r/011f480220799fbfabdd53896f8a2f251ad995ad.1691091324.git.marcelo.schmitt1@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Philipp Rossak
a6bd5e1653 iio: adc: imx8qxp: Fix address for command buffer registers
commit 850101b3598277794f92a9e363a60a66e0d42890 upstream.

The ADC Command Buffer Register high and low are currently pointing to
the wrong address and makes it impossible to perform correct
ADC measurements over all channels.

According to the datasheet of the imx8qxp the ADC_CMDL register starts
at address 0x100 and the ADC_CMDH register starts at address 0x104.

This bug seems to be in the kernel since the introduction of this
driver.

This can be observed by checking all raw voltages of the adc and they
are all nearly identical:

cat /sys/bus/iio/devices/iio\:device0/in_voltage*_raw
3498
3494
3491
3491
3489
3490
3490
3490

Fixes: 1e23dcaa1a ("iio: imx8qxp-adc: Add driver support for NXP IMX8QXP ADC")
Signed-off-by: Philipp Rossak <embed3d@gmail.com>
Acked-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20230904220204.23841-1-embed3d@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Jonathan Cameron
92426b1f5f iio: imu: bno055: Fix missing Kconfig dependencies
commit c9b9cfe7d342683f624a89c3b617be18aff879e8 upstream.

This driver uses IIO triggered buffers so it needs to select them in
Kconfig.

on riscv-32bit:

/opt/crosstool/gcc-13.2.0-nolibc/riscv32-linux/bin/riscv32-linux-ld: drivers/iio/imu/bno055/bno055.o: in function `.L367':
bno055.c:(.text+0x2c96): undefined reference to `devm_iio_triggered_buffer_setup_ext'

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/linux-next/40566b4b-3950-81fe-ff14-871d8c447627@infradead.org/
Fixes: 4aefe1c2bd ("iio: imu: add Bosch Sensortec BNO055 core driver")
Cc: Andrea Merello <andrea.merello@iit.it>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20230903113052.846298-1-jic23@kernel.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Phil Elwell
187939163b iio: pressure: bmp280: Fix NULL pointer exception
commit 85dfb43bf69281adb1f345dfd9a39faf2e5a718d upstream.

The bmp085 EOC IRQ support is optional, but the driver's common probe
function queries the IRQ properties whether or not it exists, which
can trigger a NULL pointer exception. Avoid any exception by making
the query conditional on the possession of a valid IRQ.

Fixes: aae9539496 ("iio: pressure: bmp280: add support for BMP085 EOC interrupt")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230811155829.51208-1-phil@raspberrypi.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:55 +02:00
Matteo DAMENO
28af5617e0 drivers:iio:stm:imu:st_asm330lxxh: add support to ASM330LHHXG1
Added support for ASM330LHHXG1 imu sensor to st_asm330lhhx driver.

Change-Id: I55b0f0a4138e818f089c78f1e7c35d382ac19f9e
Signed-off-by: Matteo DAMENO <matteo.damenom@st.com>
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333673
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Mario TESI <mario.tesi@st.com>
2023-10-13 17:14:07 +02:00
Mario Tesi
07766380c8 drivers:iio:stm:imu:st_asm330lhhx: avoid to set invalid odr values
Prevent applying invalid odr values to the device, especially the
null value.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I6eca531089c8ef4663dbd886804a91f98c881425
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/293585
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-09-22 00:45:52 +02:00
Mario Tesi
b1f69ff9c6 drivers:iio:stm:imu: Fix check when odr change
The callback function raw_get_fmt does not check mask
IIO_CHAN_INFO_SAMP_FREQ and returns error when sensor
odr is changed.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Idf4ee04e89d67d8d2ad52611c28c9314b3dca1e7
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/303978
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-22 00:45:52 +02:00
mariotesi
87a218df8b drivers:iio:stm:imu: remove duplicate hwtimestamp link
When imu drivers that support the hwtimestamp feature
are compiled as modules there is a duplication of links
to the hwtimestamp file which does not occur when the
driver is compiled built-in. This patch removes duplication
in the Makefile.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I3a01cdf5b59fbc681c614ea37bf19ffd04b038b0
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/326093
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-09-15 16:05:18 +02:00
qctecmdr
f806323d3f Merge "iio: adc: qcom-spmi-adc5: Update SW calibrated ADC device data" 2023-09-14 17:38:53 -07:00
mariotesi
fd9092e177 drivers:iio:stm: remove all custom types previously introduced in IIO
All the patches applied to the IIO framework file types.h have been
removed, then concentrated and replaced with different ones (prefixed
by STM_) in a single stm driver file:
drivers/iio/stm/common/stm_iio_types.h
which is expected to be shared with the application layer or hal.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I66ca184fe31f3b09bfe830187d9e3f096dd219f1
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/323957
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 22:54:51 +02:00
Mario Tesi
b6abc92c02 drivers:iio:stm: extends IIO ST MEMS drivers build on k6.1
Cumulative patch to allow build IIO ST MEMS drivers on k6.1

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I1fa2524b21c800eefbfeee85d9abc26e4b2a2eef
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/295087
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 20:16:18 +02:00
mariotesi
015ea32b3b drivers:iio:stm:imu:st_lsm6dso16is: add lsm6dso16is device to kernel build
The st_lsm6dso16is driver was not included in the kernel build
because it was not added in the top level Kconfig/Makefile,
furthermore the default config contained a typo.

In lsm6dso16is_defconfig there is a wrong device name,
this fix enables lsm6dso16is module compilation.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I92df0ca4c3e29af6bcaef5ce80a78d494672ef00
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/325964
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-09-14 17:26:12 +02:00
mariotesi
8b346fe8b2 drivers:iio:stm:imu:st_lsm6dso16is: fix compile warnings
Initialize the odr to correct value in set odr function and
remove warning for varialble array length in the function to
read one shot data from sensor hub.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I69e6e8ad8a7b427fb8a9791ecf60230a9a9640f3
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/327204
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 16:34:07 +02:00
Anjelique Melendez
d0a84114ac iio: adc: qcom-spmi-adc5: Update SW calibrated ADC device data
Currently, SW calibrated ADC device data points to ADC7 data. Update
device data so that it will point to ADC7 SW calibrated data.

Change-Id: I84a3b11f73c679979ee1bfe20573ee86ed3234d4
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2023-09-13 11:31:25 -07:00
Biju Das
21608d2ba5 iio: accel: adxl313: Fix adxl313_i2c_id[] table
[ Upstream commit f636554c4cd1c644109cc525900a056495b86cc9 ]

The .driver_data in adxl313_i2c_id[] for adxl312 and adxl314 is
wrong. Fix this issue by adding corresponding adxl31x_chip_info
data.

Reported-by: Jonathan Cameron <jic23@kernel.org>
Closes: https://lore.kernel.org/all/20230722172832.04ad7738@jic23-huawei
Fixes: a7a1c60bc4 ("drivers: iio: accel: adxl312 and adxl314 support")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230725171624.331283-2-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:52 +02:00
Rakesh Kota
af4e33377e iio: spmi-adc5: Add DT based option to specify scale-fn-type
Based on the board designs, same ADC channel for a PMIC may be required
to use with a different scale function.

eg -
PM7250B PMIC's VADC channel for reading slave charger temperature will
require different scaling function to calculate the voltage to
temperature based on the slave charger used on that board(SMB1390/SMB1398).

Add DT based option to specify scale-fn-type to handle such
kind of requirements.

Change-Id: I52d7b8afb5b6b6ef0419740bdb67ed3f48108cde
Signed-off-by: Rakesh Kota <quic_kotarake@quicinc.com>
2023-09-11 04:00:35 -07:00
Satya Priya Kakitapalli
5877e4a6ca iio: qcom-spmi-adc5: set platform driver data in probe
Initialize platform driver data in the probe in order to be
able to fetch the data in adc_freeze and adc_restore callbacks.

Change-Id: Iacee302f2fae1d206838aec4aa40c22c046e353c
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
2023-08-31 14:46:53 +05:30
Milan Zamazal
312f04ede2 iio: core: Prevent invalid memory access when there is no parent
commit b2a69969908fcaf68596dfc04369af0fe2e1d2f7 upstream.

Commit 813665564b ("iio: core: Convert to use firmware node handle
instead of OF node") switched the kind of nodes to use for label
retrieval in device registration.  Probably an unwanted change in that
commit was that if the device has no parent then NULL pointer is
accessed.  This is what happens in the stock IIO dummy driver when a
new entry is created in configfs:

  # mkdir /sys/kernel/config/iio/devices/dummy/foo
  BUG: kernel NULL pointer dereference, address: ...
  ...
  Call Trace:
  __iio_device_register
  iio_dummy_probe

Since there seems to be no reason to make a parent device of an IIO
dummy device mandatory, let’s prevent the invalid memory access in
__iio_device_register when the parent device is NULL.  With this
change, the IIO dummy driver works fine with configfs.

Fixes: 813665564b ("iio: core: Convert to use firmware node handle instead of OF node")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Link: https://lore.kernel.org/r/20230719083208.88149-1-mzamazal@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:25 +02:00
Alvin Šipraga
77b689cc27 iio: adc: ina2xx: avoid NULL pointer dereference on OF device match
commit a41e19cc0d6b6a445a4133170b90271e4a2553dc upstream.

The affected lines were resulting in a NULL pointer dereference on our
platform because the device tree contained the following list of
compatible strings:

    power-sensor@40 {
        compatible = "ti,ina232", "ti,ina231";
        ...
    };

Since the driver doesn't declare a compatible string "ti,ina232", the OF
matching succeeds on "ti,ina231". But the I2C device ID info is
populated via the first compatible string, cf. modalias population in
of_i2c_get_board_info(). Since there is no "ina232" entry in the legacy
I2C device ID table either, the struct i2c_device_id *id pointer in the
probe function is NULL.

Fix this by using the already populated type variable instead, which
points to the proper driver data. Since the name is also wanted, add a
generic one to the ina2xx_config table.

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Fixes: c43a102e67 ("iio: ina2xx: add support for TI INA2xx Power Monitors")
Link: https://lore.kernel.org/r/20230619141239.2257392-1-alvin@pqrs.dk
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:24 +02:00
Alisa Roman
2f8ebbd0f0 iio: adc: ad7192: Fix ac excitation feature
commit 6bc471b6c3aeaa7b95d1b86a1bb8d91a3c341fa5 upstream.

AC excitation enable feature exposed to user on AD7192, allowing a bit
which should be 0 to be set. This feature is specific only to AD7195. AC
excitation attribute moved accordingly.

In the AD7195 documentation, the AC excitation enable bit is on position
22 in the Configuration register. ACX macro changed to match correct
register and bit.

Note that the fix tag is for the commit that moved the driver out of
staging.

Fixes: b581f748cc ("staging: iio: adc: ad7192: move out of staging")
Signed-off-by: Alisa Roman <alisa.roman@analog.com>
Cc: stable@vger.kernel.org
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230614155242.160296-1-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:24 +02:00
Dan Carpenter
5e1ed816a0 iio: frequency: admv1013: propagate errors from regulator_get_voltage()
commit 507397d19b5a296aa339f7a1bd16284f668a1906 upstream.

The regulator_get_voltage() function returns negative error codes.
This function saves it to an unsigned int and then does some range
checking and, since the error code falls outside the correct range,
it returns -EINVAL.

Beyond the messiness, this is bad because the regulator_get_voltage()
function can return -EPROBE_DEFER and it's important to propagate that
back properly so it can be handled.

Fixes: da35a7b526 ("iio: frequency: admv1013: add support for ADMV1013")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ce75aac3-2aba-4435-8419-02e59fdd862b@moroto.mountain
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:24 +02:00
Yiyuan Guo
366563c14f iio: cros_ec: Fix the allocation size for cros_ec_command
commit 8a4629055ef55177b5b63dab1ecce676bd8cccdd upstream.

The struct cros_ec_command contains several integer fields and a
trailing array. An allocation size neglecting the integer fields can
lead to buffer overrun.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Yiyuan Guo <yguoaz@gmail.com>
Fixes: 974e6f02e2 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub.")
Link: https://lore.kernel.org/r/20230630143719.1513906-1-yguoaz@gmail.com
Cc: <Stable@vger.kerenl.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:24 +02:00
mariotesi
a9bf4167c4 driver:iio:stm:imu:st_asm330lhhx: Added support to 125dps gyro full scale
This contribution extends the support of all full scale
supported by this sensor (for the gyro was missing support
to 125 dps).

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I59d1ad9e91283de9ec879fb9955a888c44d0f089
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/321052
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-08-04 13:37:46 +02:00
George Stark
be06ffa8f4 meson saradc: fix clock divider mask length
commit c57fa0037024c92c2ca34243e79e857da5d2c0a9 upstream.

According to the datasheets of supported meson SoCs length of ADC_CLK_DIV
field is 6-bit. Although all supported SoCs have the register
with that field documented later SoCs use external clock rather than
ADC internal clock so this patch affects only meson8 family (S8* SoCs).

Fixes: 3adbf34273 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
Signed-off-by: George Stark <GNStark@sberdevices.ru>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230606165357.42417-1-gnstark@sberdevices.ru
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-23 13:49:42 +02:00
Sean Nyekjaer
96b1bc9a6f iio: accel: fxls8962af: fixup buffer scan element type
commit d1cfbd52ede5e5fabc09992894c5733b4057f159 upstream.

Scan elements for x,y,z channels is little endian and requires no bit shifts.
LE vs. BE is controlled in register SENS_CONFIG2 and bit LE_BE, default
value is LE.

Fixes: a3e0b51884 ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230605103223.1400980-1-sean@geanix.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-19 16:21:46 +02:00
Sean Nyekjaer
04a579517b iio: accel: fxls8962af: errata bug only applicable for FXLS8962AF
commit b410a9307bc3a7cdee3c930c98f6fc9cf1d2c484 upstream.

Remove special errata handling if FXLS8964AF is used.

Fixes: af959b7b96 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230605103223.1400980-2-sean@geanix.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-19 16:21:46 +02:00
Fabrizio Lamarque
fcdae54e3d iio: adc: ad7192: Fix internal/external clock selection
commit f7d9e21dd274b97dc0a8dbc136a2ea8506063a96 upstream.

Fix wrong selection of internal clock when mclk is defined.

Resolve a logical inversion introduced in c9ec2cb328.

Fixes: c9ec2cb328 ("iio: adc: ad7192: use devm_clk_get_optional() for mclk")
Signed-off-by: Fabrizio Lamarque <fl.scratchpad@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230530075311.400686-3-fl.scratchpad@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-19 16:21:46 +02:00
Fabrizio Lamarque
b61f26a8a0 iio: adc: ad7192: Fix null ad7192_state pointer access
commit 9e58e3a6f8e1c483c86a04903b7b7aa0923e4426 upstream.

Pointer to indio_dev structure is obtained via spi_get_drvdata() at
the beginning of function ad7192_setup(), but the spi->dev->driver_data
member is not initialized, hence a NULL pointer is returned.

Fix by changing ad7192_setup() signature to take pointer to struct
iio_dev, and get ad7192_state pointer via st = iio_priv(indio_dev);

Fixes: bd5dcdeb3f ("iio: adc: ad7192: convert to device-managed functions")
Signed-off-by: Fabrizio Lamarque <fl.scratchpad@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230530075311.400686-2-fl.scratchpad@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-19 16:21:45 +02:00
Mario Tesi
aa9e1facb9 drivers:iio:stm:imu:st_lsm6dsvx: avoid to set invalid odr values
back porting of the commit:

commit 8281b4fba1df ("drivers:iio:stm:imu:st_asm330lhhx: avoid to set invalid odr values")

This fix solves the issue after setting the odr as only the
least significant part is changed.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Idb95500d6a370bc411faa3ed2fe0768e563eb9dc
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/294835
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-07-05 17:08:53 +02:00
Mario Tesi
ec746fae52 drivers:iio:stm:imu:st_lsm6dsrx: reworks includes
Order include file and remove duplicates.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I33a67e2fafd366a5dd6fd5c42490de4984a724d2
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282316
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-07-04 14:22:13 +02:00
Mario Tesi
5be095a0da drivers:iio:stm:imu:st_lsm6dsox: reworks includes
Order include file and remove duplicates.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I2b92b1d502822c5097483247c5a0617d3048ca75
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282315
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-07-03 15:58:33 +02:00
Mario Tesi
26173808b6 drivers:iio:stm:tmos:st_sths34pf80: Add support to TMOS ST MEMS driver
Add support of TMOS ST MEMS IIO sensor with the following features:

 - Tobject sensor data (compensation can be enabled / disabled)
 - Tambient sensor data
 - Tpresence sensor data and event generation
 - Tmotion sensor data and event generation
 - Tambient_shock sensor data and event generation
 - LPF configurable
 - Hysteresis and Threshold setting
 - Supported ODR are 0.25, 0.5, 1, 2, 4, 8, 15 and 30 Hz
 - Support reset algo procedure

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I74b8b50baf91693230a195300b3660591d32605e
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/315094
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-06-30 17:24:30 +02:00
Mario Tesi
3c819bb010 drivers:iio:stm:accel:st_lis2duxs12: add support to LIS2DUX12
Added support to LIS2DUX12 smart xl sensor to st_lis2duxs12 driver.
This new STMEMS XL device don't include the QVAR sensor support.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I4c12954c78910b97abdade2b275f87a7e38e6518
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/271225
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-06-16 14:42:57 +02:00
Lukas Bulwahn
3cfdc3fc18 iio: dac: build ad5758 driver when AD5758 is selected
commit a146eccb68be161ae9eab5f3f68bb0ed7c0fbaa8 upstream.

Commit 28d1a7ac2a ("iio: dac: Add AD5758 support") adds the config AD5758
and the corresponding driver ad5758.c. In the Makefile, the ad5758 driver
is however included when AD5755 is selected, not when AD5758 is selected.

Probably, this was simply a mistake that happened by copy-and-paste and
forgetting to adjust the actual line. Surprisingly, no one has ever noticed
that this driver is actually only included when AD5755 is selected and that
the config AD5758 has actually no effect on the build.

Fixes: 28d1a7ac2a ("iio: dac: Add AD5758 support")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20230508040208.12033-1-lukas.bulwahn@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Sean Nyekjaer
f453753900 iio: adc: stm32-adc: skip adc-diff-channels setup if none is present
commit 9c0d6ccd7d6bbd275e390b55a3390b4274291d95 upstream.

If no adc differential channels are defined driver will fail with EINVAL:
stm32-adc: probe of 48003000.adc:adc@0 failed with error -22

Fix this by skipping the initialization if no channels are defined.

This applies only to the legacy way of initializing adc channels.

Fixes: d7705f3544 ("iio: adc: stm32-adc: convert to device properties")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Link: https://lore.kernel.org/r/20230503162029.3654093-1-sean@geanix.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Paul Cercueil
735d033bed iio: adc: ad7192: Change "shorted" channels to differential
commit e55245d115bb9054cb72cdd5dda5660f4484873a upstream.

The AD7192 provides a specific channel configuration where both negative
and positive inputs are connected to AIN2. This was represented in the
ad7192 driver as a IIO channel with .channel = 2 and .extended_name set
to "shorted".

The problem with this approach, is that the driver provided two IIO
channels with the identifier .channel = 2; one "shorted" and the other
not. This goes against the IIO ABI, as a channel identifier should be
unique.

Address this issue by changing "shorted" channels to being differential
instead, with channel 2 vs. itself, as we're actually measuring AIN2 vs.
itself.

Note that the fix tag is for the commit that moved the driver out of
staging. The bug existed before that, but backporting would become very
complex further down and unlikely to happen.

Fixes: b581f748cc ("staging: iio: adc: ad7192: move out of staging")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Co-developed-by: Alisa Roman <alisa.roman@analog.com>
Signed-off-by: Alisa Roman <alisa.roman@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230330102100.17590-1-paul@crapouillou.net
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Rasmus Villemoes
84f4d63ae1 iio: addac: ad74413: fix resistance input processing
commit 24febc99ca725dcf42d57168a2f4e8a75a5ade92 upstream.

On success, ad74413r_get_single_adc_result() returns IIO_VAL_INT aka
1. So currently, the IIO_CHAN_INFO_PROCESSED case is effectively
equivalent to the IIO_CHAN_INFO_RAW case, and we never call
ad74413r_adc_to_resistance_result() to convert the adc measurement to
ohms.

Check ret for being negative rather than non-zero.

Fixes: fea251b6a5 (iio: addac: add AD74413R driver)
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230503095817.452551-1-linux@rasmusvillemoes.dk
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Marek Vasut
ab0c2dffe8 iio: dac: mcp4725: Fix i2c_master_send() return value handling
commit 09d3bec7009186bdba77039df01e5834788b3f95 upstream.

The i2c_master_send() returns number of sent bytes on success,
or negative on error. The suspend/resume callbacks expect zero
on success and non-zero on error. Adapt the return value of the
i2c_master_send() to the expectation of the suspend and resume
callbacks, including proper validation of the return value.

Fixes: cf35ad61ac ("iio: add mcp4725 I2C DAC driver")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230511004330.206942-1-marex@denx.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Masahiro Honda
89f92d4353 iio: adc: ad_sigma_delta: Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag
commit 626d312028bec44209d0ecd5beaa9b1aa8945f7d upstream.

The Sigma-Delta ADCs supported by this driver can use SDO as an interrupt
line to indicate the completion of a conversion. However, some devices
cannot properly detect the completion of a conversion by an interrupt.
This is for the reason mentioned in the following commit.

commit e9849777d0 ("genirq: Add flag to force mask in
                      disable_irq[_nosync]()")

A read operation is performed by an extra interrupt before the completion
of a conversion. At this time, the value read from the ADC data register
is the same as the previous conversion result. This patch fixes the issue
by setting IRQ_DISABLE_UNLAZY flag.

Fixes: 0c6ef985a1fd ("iio: adc: ad7791: fix IRQ flags")
Fixes: 1a913270e5 ("iio: adc: ad7793: Fix IRQ flag")
Fixes: e081102f30 ("iio: adc: ad7780: Fix IRQ flag")
Fixes: 89a86da5cb ("iio: adc: ad7192: Add IRQ flag")
Fixes: 79ef91493f ("iio: adc: ad7124: Set IRQ type to falling")
Signed-off-by: Masahiro Honda <honda@mechatrax.com>
Link: https://lore.kernel.org/r/20230518110816.248-1-honda@mechatrax.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Sean Nyekjaer
2eb2696051 iio: adc: stm32-adc: skip adc-channels setup if none is present
commit 3e27ef0ced49f8ae7883c25fadf76a2086e99025 upstream.

If only adc differential channels are defined driver will fail with
stm32-adc: probe of 48003000.adc:adc@0 failed with error -22

Fix this by skipping the initialization if no channels are defined.

This applies only to the legacy way of initializing adc channels.

Fixes: d7705f3544 ("iio: adc: stm32-adc: convert to device properties")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20230503162029.3654093-2-sean@geanix.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:19 +02:00
Frank Li
54d737d796 iio: light: vcnl4035: fixed chip ID check
commit a551c26e8e568fad42120843521529241b9bceec upstream.

VCNL4035 register(0xE) ID_L and ID_M define as:

 ID_L: 0x80
 ID_H: 7:6 (0:0)
       5:4 (0:0) slave address = 0x60 (7-bit)
           (0:1) slave address = 0x51 (7-bit)
           (1:0) slave address = 0x40 (7-bit)
           (1:0) slave address = 0x41 (7-bit)
       3:0 Version code default	(0:0:0:0)

So just check ID_L.

Fixes: 55707294c4 ("iio: light: Add support for vishay vcnl4035")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20230501143605.1615549-1-Frank.Li@nxp.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:18 +02:00
Jean-Baptiste Maneyrol
cb2a612c39 iio: imu: inv_icm42600: fix timestamp reset
commit bbaae0c79ebd49f61ad942a8bf9e12bfc7f821bb upstream.

Timestamp reset is not done in the correct place. It must be done
before enabling buffer. The reason is that interrupt timestamping
is always happening when the chip is on, even if the
corresponding sensor is off. When the sensor restarts, timestamp
is wrong if you don't do a reset first.

Fixes: ec74ae9fd3 ("iio: imu: inv_icm42600: add accurate timestamping")
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230509152202.245444-1-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:18 +02:00
Jiakai Luo
23c241676f iio: adc: mxs-lradc: fix the order of two cleanup operations
commit 27b2ed5b6d53cd62fc61c3f259ae52f5cac23b66 upstream.

Smatch reports:
drivers/iio/adc/mxs-lradc-adc.c:766 mxs_lradc_adc_probe() warn:
missing unwind goto?

the order of three init operation:
1.mxs_lradc_adc_trigger_init
2.iio_triggered_buffer_setup
3.mxs_lradc_adc_hw_init

thus, the order of three cleanup operation should be:
1.mxs_lradc_adc_hw_stop
2.iio_triggered_buffer_cleanup
3.mxs_lradc_adc_trigger_remove

we exchange the order of two cleanup operations,
introducing the following differences:
1.if mxs_lradc_adc_trigger_init fails, returns directly;
2.if trigger_init succeeds but iio_triggered_buffer_setup fails,
goto err_trig and remove the trigger.

In addition, we also reorder the unwind that goes on in the
remove() callback to match the new ordering.

Fixes: 6dd112b9f8 ("iio: adc: mxs-lradc: Add support for ADC driver")
Signed-off-by: Jiakai Luo <jkluo@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230422133407.72908-1-jkluo@hust.edu.cn
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:18 +02:00
Hans de Goede
b6867ce5fb iio: accel: st_accel: Fix invalid mount_matrix on devices without ACPI _ONT method
commit 79b8ded9d9c595db9bd5b2f62f5f738b36de1e22 upstream.

When apply_acpi_orientation() fails, st_accel_common_probe() will fall back
to iio_read_mount_matrix(), which checks for a mount-matrix device property
and if that is not set falls back to the identity matrix.

But when a sensor has no ACPI companion fwnode, or when the ACPI fwnode
does not have a "_ONT" method apply_acpi_orientation() was returning 0,
causing iio_read_mount_matrix() to never get called resulting in an
invalid mount_matrix:

[root@fedora ~]# cat /sys/bus/iio/devices/iio\:device0/mount_matrix
(null), (null), (null); (null), (null), (null); (null), (null), (null)

Fix this by making apply_acpi_orientation() always return an error when
it did not set the mount_matrix.

Fixes: 3d8ad94bb1 ("iio: accel: st_sensors: Support generic mounting matrix")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Marius Hoch <mail@mariushoch.de>
Link: https://lore.kernel.org/r/20230416212409.310936-1-hdegoede@redhat.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:18 +02:00
jianzhou
e555c11e74 Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (a0290fa) into qcom-6.1
* refs/heads/tmp-a0290fa:
  ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus for extend copy & fbarrier feature
  ANDROID: abi_gki_aarch64_qcom: Update symbol list
  ANDROID: mmc: core: Export core functions for kernel modules usage
  ANDROID: vendor_hooks: Define new hooks in _mmc_suspend/resume
  ANDROID: update symbol for unisoc vendor_hooks
  ANDROID: vendor_hooks: psci: add hook to check if cpu is allowed to power off
  ANDROID: Add vendor hook to the effective_cpu_util
  ANDROID: Update symbol list for mtk
  ANDROID: ABI: update symbol list for galaxy
  ANDROID: update symbol for unisoc vendor_hooks
  ANDROID: thermal: Add vendor hook to check power range
  ANDROID: thermal: Add vendor hook to get thermal zone device
  ANDROID: thermal: Add hook for cpufreq thermal
  ANDROID: virt: gunyah: Delta between v13 and v14
  Revert "ANDROID: gki_config: use DWARFv5 rather than DWARFv4"
  ANDROID: gunyah: Sync with latest "mailbox: Add Gunyah message queue mailbox"
  FROMLIST: scsi: ufs: core: Fix mcq tag calcualtion
  UPSTREAM: ufs: mcq: qcom: Fix passing zero to PTR_ERR
  UPSTREAM: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource
  UPSTREAM: scsi: ufs: core: Print trs for pending requests in MCQ mode
  UPSTREAM: scsi: ufs: core: Add trace event for MCQ
  UPSTREAM: mm,kfence: decouple kfence from page granularity mapping judgement
  UPSTREAM: mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock
  UPSTREAM: mm: page_alloc: skip regions with hugetlbfs pages when allocating 1G pages
  UPSTREAM: usb: gadget: f_fs: Add unbind event before functionfs_unbind
  UPSTREAM: mm: kmsan: handle alloc failures in kmsan_vmap_pages_range_noflush()
  ANDROID: defconfig: Enable debug configs in consolidate-fragment
  ANDROID: ABI: Update oplus symbol list
  Revert "FROMGIT: usb: gadget: udc: core: Prevent redundant calls to pullup"
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: vendor_hooks: Add hooks for binder proc transaction
  UPSTREAM: mm: kmsan: handle alloc failures in kmsan_ioremap_page_range()
  UPSTREAM: mm/huge_memory.c: warn with pr_warn_ratelimited instead of VM_WARN_ON_ONCE_FOLIO
  UPSTREAM: mm/userfaultfd: fix uffd-wp handling for THP migration entries
  UPSTREAM: mm/khugepaged: check again on anon uffd-wp during isolation
  UPSTREAM: fuse: always revalidate rename target dentry
  ANDROID: GKI: update xiaomi symbol list
  BACKPORT: FROMGIT: Multi-gen LRU: fix workingset accounting
  BACKPORT: FROMGIT: PCI: dwc: Wait for link up only if link is started
  ANDROID: ABI: update symbol list for exynos
  ANDROID: ufs: Improve MCQ err handling
  ANDROID: ABI: Update oplus symbol list
  ANDROID: GKI: sched: add rvh for new cfs task util
  ANDROID: Disable BTI_KERNEL, enable UNWIND_PATCH_PAC_INTO_SCS
  BACKPORT: arm64: implement dynamic shadow call stack for Clang
  UPSTREAM: scs: add support for dynamic shadow call stacks
  BACKPORT: arm64: unwind: add asynchronous unwind tables to kernel and modules
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
  ANDROID: ashmem: Export is_ashmem_file
  ANDROID: ABI: update symbol list related to show_mem for Exynos
  ANDROID: vendor_hooks: Add hooks for memory when debug
  ANDROID: GKI: Update symbol list for honor
  ANDROID: mutex: Add vendor hook to init mutex oem data.
  ANDROID: bazel: Adding make_goals to consolidate build
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hook: add hooks in dm_bufio.c
  ANDROID: abi_gki_aarch64_qcom: update QCOM symbol list
  ANDROID: ABI: Update honor symbol list
  ANDROID: mm: create vendor hooks for do_shrink_slab()
  ANDROID: mm: create vendor hooks for shrink_slab()
  BACKPORT: usb: dwc3: fix gadget mode suspend interrupt handler issue
  ANDROID: GKI: update symbol list file for xiaomi
  ANDROID: 5/24/2023 KMI update
  ANDROID: virt: gunyah: Add KABI reservations
  ANDROID: virt: gunyah: Sync with KMI impacting changes from v13
  ANDROID: virt: gunyah: Force struct gh_rm as opaque
  Revert "ANDROID: gki_config: use DWARFv5 rather than DWARFv4"
  ANDROID: ABI: Update symbol list for Exynos SoC
  ANDROID: power: Add ANDROID_OEM_DATA in freq_qos_request.
  ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
  ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
  ANDROID: GKI: add vendor padding variable in struct sock
  ANDROID: GKI: add vendor padding variable in struct nf_conn
  ANDROID: GKI: add vendor padding variable in struct skb_shared_info
  UPSTREAM: ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum
  UPSTREAM: cpuidle: teo: Introduce util-awareness
  UPSTREAM: cpuidle: teo: Optionally skip polling states in teo_find_shallower_state()
  ANDROID: ABI: Update oplus symbol list
  ANDROID: thermal: Add vendor hooks for thermal
  ANDROID: GKI: Update symbol list for honor
  ANDROID: mm: create vendor hooks for page alloc
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Add hooks for cpufreq_acct_update_power
  ANDROID: ABI: Update symbol list for Exynos SoC
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Add hooks for account irqtime process tick
  ANDROID: vendor_hooks: Add hooks to dup_task_struct
  ANDROID: vendor_hooks: Add hooks to record the time of the process in various states
  ANDROID: vendor_hooks: Add hooks for signal
  ANDROID: power: wakeup_reason: change abort log
  ANDROID: virt: gunyah: Delta between v13 and v14
  ANDROID: GKI: Update symbol list for xiaomi
  ANDROID: psi: Add vendor hooks for PSI tracing
  UPSTREAM: ext4: fix invalid free tracking in ext4_xattr_move_to_block()
  FROMGIT: scsi: ufs: core: mcq: Fix &hwq->cq_lock deadlock issue
  ANDROID: ABI: Update oplus symbol list
  ANDROID: android: Export symbols for invoking cpufreq_update_util()
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Export the tracepoints task_rename
  ANDROID: Add macros to create reserved data fields to backport upstream changes
  ANDROID: retry page allocation from buddy on lock contention
  UPSTREAM: KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg()
  ANDROID: arm64: Check FGT cap before touching HFGWTR_EL2
  Revert "ANDROID: Partially Revert "ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules""
  FROMGIT: f2fs: fix the wrong condition to determine atomic context
  ANDROID: GKI: update symbol list file for honor
  ANDROID: ABI: Update symbol list for imx
  ANDROID: mm: shmem: initialize the vendor data
  ANDROID: GKI: refresh STG ABI to new version
  ANDROID: GKI: Add symbols to symbol list for vivo
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Add hooks for account process tick
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: add hook account_process_tick_gran
  ANDROID: vendor_hooks: Add hook in try_to_unmap_one()
  ANDROID: vendor_hooks: Add hook in mmap_region()
  ANDROID: Partially Revert "ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules"
  ANDROID: GKI: update the ABI symbol list
  ANDROID: freezer: Add vendor hook to freezer for GKI purpose.
  ANDROID: freezer: export the freezer_cgrp_subsys for GKI purpose.
  ANDROID: GKI: update the ABI symbol list
  ANDROID: Add vendor hooks for binder perf tuning
  ANDROID: Add vendor hooks to signal.
  ANDROID: Update the ABI symbol list
  ANDROID: page_pinner: add missing page_pinner_put_page
  ANDROID: page_pinner: prevent pp_buffer uninitialized access
  ANDROID: page_pinner: prevent pp_buffer access before initialization
  ANDROID: mm: fix use-after free of page_ext in page_pinner
  ANDROID: mm: introduce page_pinner
  ANDROID: abi_gki_aarch64_qcom: Add gh_rm_register_platform_ops
  ANDROID: gunyah: Sync remaining gunyah drivers with latest
  ANDROID: gunyah: Sync with latest "mailbox: Add Gunyah message queue mailbox"
  ANDROID: gunyah: Sync with latest "gunyah: Common types and error codes for Gunyah hypercalls"
  ANDROID: gunyah: Sync with latest hypercalls
  ANDROID: gunyah: Sync with latest documentation and UAPI
  ANDROID: gunyah: Sync with latest "firmware: qcom_scm: Register Gunyah platform ops"
  BACKPORT: firmware: qcom_scm: Use fixed width src vm bitmap
  BACKPORT: misc: fastrpc: Pass bitfield into qcom_scm_assign_mem
  ANDROID: gunyah: Sync with latest "virt: gunyah: Add ioeventfd"
  ANDROID: gunyah: Sync with latest "gunyah: vm_mgr: Add ioctls to support basic non-proxy VM boot"
  ANDROID: gunyah: Sync with latest "gunyah: vm_mgr: Add/remove user memory regions"
  ANDROID: gunyah: Sync with latest "virt: gunyah: Add resource tickets"
  ANDROID: gunyah: Sync with latest "gunyah: vm_mgr: Add framework for VM Functions"
  ANDROID: gunyah: Sync with latest "gunyah: rsc_mgr: Add resource manager RPC core"
  ANDROID: gunyah: Sync with latest "virt: gunyah: Translate gh_rm_hyp_resource into gunyah_resource"
  ANDROID: gunyah: Sync with latest "virt: gunyah: Add hypercalls to identify Gunyah"
  BACKPORT: overflow: Introduce overflows_type() and castable_to_type()
  UPSTREAM: drm/amd/display: set dcn315 lb bpp to 48
  UPSTREAM: drm/amdgpu: Fix desktop freezed after gpu-reset
  UPSTREAM: drm/i915: Fix fast wake AUX sync len
  UPSTREAM: ASN.1: Fix check for strdup() success
  UPSTREAM: ASoC: fsl_sai: Fix pins setting for i.MX8QM platform
  UPSTREAM: ASoC: fsl_asrc_dma: fix potential null-ptr-deref
  UPSTREAM: ASoC: SOF: pm: Tear down pipelines only if DSP was active
  UPSTREAM: fpga: bridge: properly initialize bridge device before populating children
  UPSTREAM: iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
  UPSTREAM: Input: pegasus-notetaker - check pipe type when probing
  UPSTREAM: gcc: disable '-Warray-bounds' for gcc-13 too
  UPSTREAM: sctp: Call inet6_destroy_sock() via sk->sk_destruct().
  UPSTREAM: dccp: Call inet6_destroy_sock() via sk->sk_destruct().
  UPSTREAM: netfilter: nf_tables: deactivate anonymous set from preparation phase
  ANDROID: GKI: add symbol list file for unisoc
  UPSTREAM: inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
  UPSTREAM: purgatory: fix disabling debug info
  UPSTREAM: MIPS: Define RUNTIME_DISCARD_EXIT in LD script
  UPSTREAM: usb: dwc3: debugfs: Resume dwc3 before accessing registers
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Export the tracepoints sched_stat_sleep and sched_waking to let module probe them
  ANDROID: vendor_hooks: Export the tracepoints sched_stat_iowait, sched_stat_blocked, sched_stat_wait to let modules probe them
  ANDROID: vendor_hooks: export get_wchan
  ANDROID: workqueue: export symbol of the function wq_worker_comm()
  BACKPORT: mm/kmemleak: fix UAF bug in kmemleak_scan()
  ANDROID: clang: update to 17.0.2
  ANDROID: abi_gki_aarch64_qcom: update symbol list
  UPSTREAM: media: add nv12_8l128 and nv12_10be_8l128 video format.
  ANDROID: ABI: update symbol list for galaxy
  ANDROID: db845c: Remove MAKE_GOALS from build.config
  ANDROID: GKI: gen_gki_modules_headers update preprocessing
  FROMGIT: locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers
  FROMGIT: xfrm: Check if_id in inbound policy/secpath match
  ANDROID: always add the struct wireless_dev * to struct net_device
  ANDROID: ABI: Update symbol list for imx
  ANDROID: KVM: arm64: Always unmap protected regions from the host
  FROMLIST: usb: typec: altmodes/displayport: fix pin_assignment_show
  ANDROID: block: Improve shared tag set performance
  ANDROID: Update ABI representation broken by update race
  ANDROID: GKI: update the ABI symbol list
  ANDROID: cgroup: Add vendor hook for cpuset.
  ANDROID: export cpuset_cpus_allowed()for GKI purpose.
  ANDROID: sched: Add vendor hooks for cpu affinity.
  ANDROID: GKI: Update owners for GKI modules lists
  ANDROID: abi_gki_aarch64_qcom: Add USB SND power domain symbol
  FROMGIT: usb: xhci: Remove unused udev from xhci_log_ctx trace event
  ANDROID: 5/10/2023 KMI update
  ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules
  ANDROID: KVM: arm64: Allow tweaking HCR_EL2 from modules
  ANDROID: GKI: Trimmed symbol lists for 80211 modules
  ANDROID: GKI: DB845C: cfg/mac 80211 as vendor modules
  ANDROID: GKI: cfg/mac 80211 as vendor modules
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Add hooks for futex
  ANDROID: vendor_hooks: Add hooks for oem futex optimization
  FROMGIT: wifi: nl80211: Add support for randomizing TA of auth and deauth frames
  ANDROID: GKI: update the ABI symbol list
  ANDROID: sched: Add ANDROID_OEM_DATA_ARRAY in user_struct.
  ANDROID: power: Add vendor hook to qos for GKI purpose.
  ANDROID: GKI: update the ABI symbol list
  ANDROID: export find_user() & free_uid()for GKI purpose.
  ANDROID: user: Add vendor hook to user for GKI purpose
  ANDROID: sched: add trace_android_vh_map_util_freq parameter
  FROMGIT: usb: gadget: udc: core: Prevent redundant calls to pullup
  FROMGIT: usb: gadget: udc: core: Invoke usb_gadget_connect only when started
  Revert "Revert "KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU""
  Revert "Revert "KVM: arm64: PMU: Sanitise PMCR_EL0.LP on first vcpu run""
  Revert "Revert "KVM: arm64: PMU: Distinguish between 64bit counter and 64bit overflow""
  Revert "Revert "KVM: arm64: PMU: Align chained counter implementation with architecture pseudocode""
  Revert "Revert "pwm: meson: Explicitly set .polarity in .get_state()""
  Revert "Revert "pwm: sprd: Explicitly set .polarity in .get_state()""
  Revert "Revert "pwm: iqs620a: Explicitly set .polarity in .get_state()""
  Revert "Revert "pwm: cros-ec: Explicitly set .polarity in .get_state()""
  Revert "Revert "pwm: hibvt: Explicitly set .polarity in .get_state()""
  Revert "Revert "pwm: Make .get_state() callback return an error code""
  Revert "Revert "raw: Fix NULL deref in raw_get_next().""
  Revert "Revert "raw: use net_hash_mix() in hash function""
  FROMLIST: scsi: ufs: core: Fix mcq nr_hw_queues
  FROMLIST: scsi: ufs: core: Rename symbol sizeof_utp_transfer_cmd_desc()
  FROMLIST: scsi: ufs: core: Fix mcq tag calcualtion
  ANDROID: GKI: Remove MAKE_GOALS from build.config
  ANDROID: GKI: Add symbols to symbol list for vivo
  ANDROID: KVM: arm64: Restrict pKVM hyp exports
  ANDROID: kleaf: move NDK_TRIPLE for arm to build.config.constants.
  FROMLIST: clocksource/drivers/timer-mediatek: Make timer-mediatek become loadable module
  FROMLIST: clocksource/drivers/timer-of: Remove __init markings
  FROMLIST: clocksource/drivers/mmio: Export clocksource_mmio_init()
  FROMLIST: time/sched_clock: Export sched_clock_register()
  ANDROID: ABI: Update symbol list for Exynos SoC
  Revert "Revert "ANDROID: cpufreq: Add a restricted vendor hook for freq transition""
  ANDROID: usb: gadget: configfs: Protect composite_setup in a spinlock
  Revert "ANDROID: uid_sys_stat: split the global lock uid_lock to the fine-grained"
  ANDROID: GKI: update symbol list file for xiaomi
  ANDROID: GKI: x86_64: Remove 80211 from protected modules
  ANDROID: GKI: Update owners for GKI modules lists
  FROMLIST: binder: fix UAF caused by faulty buffer cleanup
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hooks: Add hooks to select binder worklist
  ANDROID: vendor_hooks: Add hooks for binder
  ANDROID: vendor_hooks: Add hooks for rwsem and mutex
  ANDROID: vendor_hooks: Add hooks for binder proc transaction
  ANDROID: vendor_hooks: Add hook for binder
  ANDROID: vendor_hooks: Add hooks for mutex and rwsem optimistic spin
  ANDROID: vendor_hooks: Add hooks for rwsem and mutex
  ANDROID: ABI: Update cpu-profiler symbol list for Exynos SoC
  ANDROID: ABI: Update WLBT, Sensor symbol list for Exynos SoC
  ANDROID: ABI: Update GPU symbol for Exynos SoC
  ANDROID: ABI: Update oplus symbol list
  ANDROID: vendor_hook: add hooks to protect locking-tsk in cpu scheduler
  ufs: Update struct ufs_hba
  ANDROID: ABI: Update DRM symbol for Exynos SoC
  fscrypt: destroy keyring after security_sb_delete()
  ANDROID: GKI: Increase max 8250 uarts
  ANDROID: ABI: Update Audio symbol for Exynos SoC
  UPSTREAM: ufs: mcq: qcom: Fix passing zero to PTR_ERR
  UPSTREAM: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource
  ANDROID: Update symbol list for Exynos SoC
  fscrypt: optimize fscrypt_initialize()
  fscrypt: use WARN_ON_ONCE instead of WARN_ON
  fscrypt: new helper function - fscrypt_prepare_lookup_partial()
  fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref()
  fscrypt: improve fscrypt_destroy_keyring() documentation
  drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume
  drm/rockchip: vop2: fix suspend/resume
  drm/amd/display: set dcn315 lb bpp to 48
  drm/amdgpu: Fix desktop freezed after gpu-reset
  drm/i915: Fix fast wake AUX sync len
  mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25
  memstick: fix memory leak if card device is never registered
  writeback, cgroup: fix null-ptr-deref write in bdi_split_work_to_wbs
  tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used
  kernel/sys.c: fix and improve control flow in __sys_setres[ug]id()
  nilfs2: initialize unused bytes in segment summary blocks
  maple_tree: fix a potential memory leak, OOB access, or other unpredictable bug
  maple_tree: fix mas_empty_area() search
  LoongArch: Mark 3 symbol exports as non-GPL
  rust: kernel: Mark rust_fmt_argument as extern "C"
  maple_tree: make maple state reusable after mas_empty_area_rev()
  LoongArch: Fix probing of the CRC32 feature
  btrfs: get the next extent map during fiemap/lseek more efficiently
  ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook
  iio: light: tsl2772: fix reading proximity-diodes from device tree
  iio: dac: ad5755: Add missing fwnode_handle_put()
  drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes
  Revert "userfaultfd: don't fail on unrecognized features"
  mtd: spi-nor: fix memory leak when using debugfs_lookup()
  platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models
  platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
  xen/netback: use same error messages for same errors
  nvme-tcp: fix a possible UAF when failing to allocate an io queue
  drm: test: Fix 32-bit issue in drm_buddy_test
  drm: buddy_allocator: Fix buddy allocator init on 32-bit systems
  s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
  platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX
  net: dsa: b53: mmap: add phy ops
  scsi: core: Improve scsi_vpd_inquiry() checks
  scsi: megaraid_sas: Fix fw_crash_buffer_show()
  selftests: sigaltstack: fix -Wuninitialized
  platform/x86 (gigabyte-wmi): Add support for A320M-S2H V2
  platform/x86/intel: vsec: Fix a memory leak in intel_vsec_add_aux
  f2fs: Fix f2fs_truncate_partial_nodes ftrace event
  net: bridge: switchdev: don't notify FDB entries with "master dynamic"
  e1000e: Disable TSO on i219-LM card to increase speed
  bpf: Fix incorrect verifier pruning due to missing register precision taints
  spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe()
  mlxsw: pci: Fix possible crash during initialization
  net: rpl: fix rpl header size calculation
  bonding: Fix memory leak when changing bond type to Ethernet
  mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
  bnxt_en: Do not initialize PTP on older P3/P4 chips
  netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements
  netfilter: nf_tables: validate catch-all set elements
  i40e: fix i40e_setup_misc_vector() error handling
  i40e: fix accessing vsi->active_filters without holding lock
  netfilter: nf_tables: fix ifdef to also consider nf_tables=m
  sfc: Fix use-after-free due to selftest_work
  virtio_net: bugfix overflow inside xdp_linearize_page()
  net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
  regulator: fan53555: Fix wrong TCS_SLEW_MASK
  regulator: fan53555: Explicitly include bits header
  rust: str: fix requierments->requirements typo
  netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT
  netfilter: br_netfilter: fix recent physdev match breakage
  arm64: dts: imx8mp-verdin: correct off-on-delay
  arm64: dts: imx8mm-verdin: correct off-on-delay
  arm64: dts: imx8mm-evk: correct pmic clock source
  arm64: dts: qcom: sc8280xp-pmics: fix pon compatible and registers
  arm64: dts: meson-g12-common: specify full DMC range
  arm64: dts: qcom: ipq8074-hk10: enable QMP device, not the PHY node
  arm64: dts: qcom: hk10: use "okay" instead of "ok"
  arm64: dts: qcom: ipq8074-hk01: enable QMP device, not the PHY node
  arm64: dts: rockchip: Lower sd speed on rk3566-soquartz
  ARM: dts: rockchip: fix a typo error for rk3288 spdif node

 Conflicts:
	android/abi_gki_aarch64.stg
	android/gki_system_dlkm_modules

Change-Id: I753eb5791de01079ea02b215e38a149fe0626f76
Upstream-Build: ks_qcom-android14-6.1-keystone-qcom-release@10256832 UKQ2.230604.001
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
2023-06-08 00:45:30 -07:00
qctecmdr
9a99015e7f Merge "Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (98d56a5) into qcom-6.1" 2023-05-24 11:43:59 -07:00
Mario Tesi
7d05d20934 drivers:iio:stm:accel:st_lis2duxs12: add support to multiple hw id
Predisposition of the driver to also support other devices of the STMEMS
LIS2DUX(S)12 smart xl sensors family.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I0600f1531fa67a4db635056a8b79586052230d76
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/271224
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-05-24 17:54:15 +02:00
Mario Tesi
52224a7247 drivers:iio:stm:accel: Add support to LIS2DUXS12 STMEMS accel
Added support to STMEMS acc LIS2DUXS12 sensor.
The following features has been included:
 - Acc, Temp and QVAR sensors in FIFO
 - Self Test
 - Embedded features event detection supported:
   - Wake-up
   - Free fall
   - Single Tap
   - Double Tap
   - Triple Tap
   - 6D orientation
   - Sleep change
   - Step Counter
   - Step Detection
   - Significant Motion
   - Tilt
 - MLC and FSM configuration
 - I2C / SPI / I3C interfaces through regmap
 - Multi kernel version support up to v5.15
 - Preload MLC/FSM presence detection using QVAR

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I014d990f55c178f15a4a087a897d7eb8ed17ed8f
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/261051
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-24 17:17:55 +02:00
Mario Tesi
d93ddd10b6 drivers:iio:stm:pressure: add support to lps22ch ST MEMS pressure sensor
The lps22ch ST MEMS pressure sensor belongs to the ST lps22(x)h
pressure sensor family, for this reason the support to the
pre-existing driver has been added.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I9433f0bd57150c25ebc3c4fe8eefe525b1743750
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/296642
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-22 16:51:22 +02:00
qctecmdr
da3431c11d Merge "iio: qcom-spmi-adc5-gen3: add support for reg dumping when error seen" 2023-05-16 19:32:44 -07:00
Dan Carpenter
0c69b18d8e UPSTREAM: iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
commit 73a428b37b9b538f8f8fe61caa45e7f243bab87c upstream.

The at91_adc_allocate_trigger() function is supposed to return error
pointers.  Returning a NULL will cause an Oops.

Fixes: 5e1a1da0f8 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support")
Change-Id: I31db683d8467f130b1795093287e0eacee2a776a
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/5d728f9d-31d1-410d-a0b3-df6a63a2c8ba@kili.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f8c3eb751a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-05-16 17:26:38 +00:00
jianzhou
106629f5e1 Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (98d56a5) into qcom-6.1
* refs/heads/tmp-98d56a5:
  FROMLIST: ANDROID: GKI: psi: remove 500ms min window size limitation for triggers
  ANDROID: uid_sys_stat: split the global lock uid_lock to the fine-grained locks for each hlist in hash_table.
  ANDROID: uid_sys_stats: defer process_notifier work if uid_lock is contended
  ANDROID: Add symbols for pkvm module support
  ANDROID: abi_gki_aarch64_qcom: Add dma_resv iterator symbols
  ANDROID: Unnest MAKE_GOALS from build configs
  ANDROID: iommu/dma: Add support for DMA_ATTR_SYS_CACHE_NWA
  ANDROID: iommu/dma: Add support for DMA_ATTR_SYS_CACHE
  ANDROID: iommu/io-pgtable-arm: Add IOMMU_SYS_CACHE/_NWA
  ANDROID: Enable CONFIG_ZONE_DEVICE
  ANDROID: abi_gki_aarch64_qcom: Add sock_gen_put
  BACKPORT: FROMLIST: Revert "scsi: ufs: core: Initialize devfreq synchronously"
  FROMLIST: staging: greybus: drop loopback test files
  UPSTREAM: wifi: cfg80211: Authentication offload to user space for MLO connection in STA mode
  UPSTREAM: wifi: cfg80211: trace: remove MAC_PR_{FMT,ARG}
  ANDROID: arm64: Add support for system cache memory type
  ANDROID: fuse-bpf: Fix bpf_test_xattr testcase error
  ANDROID: fuse-bpf: Simplify and fix setting bpf program
  ANDROID: GKI: update the ABI symbol list
  ANDROID: schedutil: add vendor hook for adjusting util to freq calculation
  BACKPORT: FROMLIST: arm64: Also reset KASAN tag if page is not PG_mte_tagged
  FROMLIST: arm64: mte: Do not set PG_mte_tagged if tags were not initialized
  ANDROID: GKI: Convert USB network adpaters to modules
  ANDROID: KVM: arm64: Prevent kmemleak from accessing EL2 module sections
  ANDROID: KVM: arm64: Move addr_is_allowed_memory() check into host callback
  UPSTREAM: wifi: cfg80211: Authentication offload to user space for MLO connection in STA mode
  ANDROID: Enable CONFIG_ZONE_DEVICE
  ANDROID: abi_gki_aarch64_qcom: Add sock_gen_put
  BACKPORT: FROMLIST: Revert "scsi: ufs: core: Initialize devfreq synchronously"
  FROMLIST: staging: greybus: drop loopback test files
  ANDROID: fuse-bpf: Make fuse_test compile and pass
  ANDROID: abi_gki_aarch64_qcom: Add missing symbol to QCOM list
  ANDROID: Update ABI representation
  ANDROID: ABI: Update QCOM symbol list for display drivers
  ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data
  ANDROID: 4/26/2023 KMI update
  ANDROID: mm: Create hooks for ZONE_MOVABLE allocs
  ANDROID: zram: allow zram to allocate CMA pages
  ANDROID: mm: add cma pcp list
  ANDROID: cma: redirect page allocation to CMA
  ANDROID: GKI: fscrypt: add OEM data to struct fscrypt_operations
  ANDROID: KVM: arm64: iommu: Pass device specific flags to hypervisor
  ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
  ANDROID: vmscan: Support multiple kswapd threads per node
  ANDROID: mm: Export kswapd function
  ANDROID: gki_defconfig: enable IPV6_MROUTE_MULTIPLE_TABLES
  Revert "ANDROID: gki_defconfig: remove CONFIG_CLEANCACHE from gki_defconfig"
  ANDROID: Revert "mm: remove cleancache"
  ANDROID: dma-buf: heaps: dmabuf page pool spinlock should be spinlock_t
  ANDROID: GKI: Update db845c symbol list for dmabuf_page_pool_get_size
  ANDROID: GKI: Update virtual_device symbol list for dmabuf_page_pool_get_size
  ANDROID: dma-heap: Let system heap report total pool size
  ANDROID: dma-buf: heaps: Add a sysfs file to report total pool size.
  ANDROID: block: Prepare for preserving the zoned write order
  ANDROID: Update symbol list for Exynos SoC
  ANDROID: ABI: Update symbol list for imx
  ANDROID: db845c: Update symbol list
  ANDROID: preserve CRC for xhci symbols
  Revert "raw: use net_hash_mix() in hash function"
  Revert "raw: Fix NULL deref in raw_get_next()."
  Revert "pwm: Make .get_state() callback return an error code"
  Revert "pwm: hibvt: Explicitly set .polarity in .get_state()"
  Revert "pwm: cros-ec: Explicitly set .polarity in .get_state()"
  Revert "pwm: iqs620a: Explicitly set .polarity in .get_state()"
  Revert "pwm: sprd: Explicitly set .polarity in .get_state()"
  Revert "pwm: meson: Explicitly set .polarity in .get_state()"
  Revert "KVM: arm64: PMU: Align chained counter implementation with architecture pseudocode"
  Revert "KVM: arm64: PMU: Distinguish between 64bit counter and 64bit overflow"
  Revert "KVM: arm64: PMU: Sanitise PMCR_EL0.LP on first vcpu run"
  Revert "KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU"
  BACKPORT: KVM: arm64: Make vcpu flag updates non-preemptible
  BACKPORT: KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs
  FROMGIT: usb: dwc3: gadget: Refactor EP0 forced stall/restart into a separate API
  ANDROID: Update symbol list for mtk
  FROMGIT: usb: dwc3: gadget: Execute gadget stop after halting the controller
  UPSTREAM: scsi: ufs: core: Print trs for pending requests in MCQ mode
  UPSTREAM: scsi: ufs: core: Add trace event for MCQ
  ANDROID: ABI: update the pixel symbol list
  FROMGIT: USB: dwc3: gadget: drop dead hibernation code
  FROMGIT: usb: dwc3: gadget: Stall and restart EP0 if host is unresponsive
  FROMGIT: media: add RealVideo format RV30 and RV40
  FROMGIT: media: add Sorenson Spark video format
  ANDROID: Update ABI representation for imx symbol list updates
  ANDROID: ABI: Add clk/power related symbols for imx
  ANDROID: ABI: Add phy/pinctrl/regulator related symbols for imx
  ANDROID: ABI: Add bus/mmc/dma related symbols for imx
  ANDROID: ABI: Add display related symbols for imx
  ANDROID: ABI: Add video/camera related symbols for imx
  ANDROID: ABI: Add sensor/led/iput related symbols for imx
  ANDROID: ABI: Add usb related symbols for imx
  ANDROID: ABI: Add net related symbols for imx
  ANDROID: ABI: Add sound/soc/ related symbols for imx
  ANDROID: KVM: arm64: Clear the PTEs which are not refcounted on unmap path
  Revert "ANDROID: Add utf8_data_table for case-folding support"
  ANDROID: Add filp_open_block() for zram
  ANDROID: GKI: add init symbol list file for vivo
  FROMGIT: clocksource/drivers/timer-mediatek: Split out CPUXGPT timers
  ANDROID: dma-buf: Export is_dma_buf_file
  Linux 6.1.25
  cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods
  cgroup/cpuset: Make cpuset_fork() handle CLONE_INTO_CGROUP properly
  cgroup/cpuset: Skip spread flags update on v2
  nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD
  nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN
  cifs: fix negotiate context parsing
  i2c: ocores: generate stop condition after timeout in polling mode
  x86/rtc: Remove __init for runtime functions
  sched/fair: Fix imbalance overflow
  powerpc/papr_scm: Update the NUMA distance table for the target node
  i2c: mchp-pci1xxxx: Update Timing registers
  ubi: Fix deadlock caused by recursively holding work_sem
  ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size
  mptcp: stricter state check in mptcp_worker
  mptcp: use mptcp_schedule_work instead of open-coding it
  drm/amd/pm: correct SMU13.0.7 max shader clock reporting
  drm/amd/pm: correct SMU13.0.7 pstate profiling clock settings
  cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach()
  cgroup/cpuset: Fix partition root's cpuset.cpus update bug
  cgroup: fix display of forceidle time at root
  x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot
  scsi: ses: Handle enclosure with just a primary component gracefully
  net: phy: nxp-c45-tja11xx: fix unsigned long multiplication overflow
  net: phy: nxp-c45-tja11xx: add remove callback
  net: sfp: initialize sfp->i2c_block_size at sfp allocation
  HID: intel-ish-hid: Fix kernel panic during warm reset
  riscv: add icache flush for nommu sigreturn trampoline
  ksmbd: avoid out of bounds access in decode_preauth_ctxt()
  maple_tree: fix write memory barrier of nodes once dead for RCU mode
  tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance
  tracing: Add trace_array_puts() to write into instance
  KVM: SVM: Flush Hyper-V TLB when required
  x86/hyperv: KVM: Rename "hv_enlightenments" to "hv_vmcb_enlightenments"
  KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments
  KVM: selftests: Move "struct hv_enlightenments" to x86_64/svm.h
  x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h
  ACPI: resource: Add Medion S17413 to IRQ override quirk
  drm/amdgpu/gfx: set cg flags to enter/exit safe mode
  drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs
  drm/amdgpu: add mes resume when do gfx post soft reset
  wifi: iwlwifi: mvm: protect TXQ list manipulation
  wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
  nvme: send Identify with CNS 06h only to I/O controllers
  asymmetric_keys: log on fatal failures in PE/pkcs7
  verify_pefile: relax wrapper length check
  hwmon: (xgene) Fix ioremap and memremap leak
  hwmon: (peci/cputemp) Fix miscalculated DTS for SKX
  drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Book X90F
  ACPI: video: Add backlight=native DMI quirk for Acer Aspire 3830TG
  block: ublk_drv: mark device as LIVE before adding disk
  efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L
  i2c: hisi: Avoid redundant interrupts
  i2c: imx-lpi2c: clean rx/tx buffers upon new message
  wifi: mwifiex: mark OF related data as maybe unused
  selftests/bpf: Fix progs/find_vma_fail1.c build error.
  power: supply: axp288_fuel_gauge: Added check for negative values
  power: supply: cros_usbpd: reclassify "default case!" as debug
  power: supply: rk817: Fix unsigned comparison with less than zero
  ARM: dts: qcom: apq8026-lg-lenok: add missing reserved memory
  ARM: 9290/1: uaccess: Fix KASAN false-positives
  libbpf: Fix single-line struct definition output in btf_dump
  skbuff: Fix a race between coalescing and releasing SKBs
  net: macb: fix a memory corruption in extended buffer descriptor mode
  udp6: fix potential access to stale information
  selftests: openvswitch: adjust datapath NL message declaration
  RDMA/core: Fix GID entry ref leak when create_ah fails
  sctp: fix a potential overflow in sctp_ifwdtsn_skip
  net: qrtr: Fix an uninit variable access bug in qrtr_tx_resume()
  cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex
  net: wwan: iosm: Fix error handling path in ipc_pcie_probe()
  qlcnic: check pci_reset_function result
  drm/armada: Fix a potential double free in an error handling path
  Bluetooth: Set ISO Data Path on broadcast sink
  Bluetooth: SCO: Fix possible circular locking dependency sco_sock_getsockopt
  Bluetooth: Fix printing errors if LE Connection times out
  Bluetooth: hci_conn: Fix not cleaning up on LE Connection failure
  net: openvswitch: fix race on port output
  iavf: remove active_cvlans and active_svlans bitmaps
  iavf: refactor VLAN filter states
  bonding: fix ns validation on backup slaves
  tcp: restrict net.ipv4.tcp_app_win
  niu: Fix missing unwind goto in niu_alloc_channels()
  KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs
  KVM: arm64: Initialise hypervisor copies of host symbols unconditionally
  bpf, arm64: Fixed a BTI error on returning to patched function
  9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition
  dmaengine: apple-admac: Fix 'current_tx' not getting freed
  dmaengine: apple-admac: Set src_addr_widths capability
  dmaengine: apple-admac: Handle 'global' interrupt flags
  LoongArch, bpf: Fix jit to skip speculation barrier opcode
  bpf: tcp: Use sock_gen_put instead of sock_put in bpf_iter_tcp
  RDMA/cma: Allow UD qp_type to join multicast only
  clk: rs9: Fix suspend/resume
  RDMA/erdma: Defer probing if netdevice can not be found
  RDMA/erdma: Inline mtt entries into WQE if supported
  RDMA/erdma: Update default EQ depth to 4096 and max_send_wr to 8192
  IB/mlx5: Add support for 400G_8X lane speed
  RDMA/irdma: Add ipv4 check to irdma_find_listener()
  RDMA/irdma: Increase iWARP CM default rexmit count
  RDMA/irdma: Fix memory leak of PBLE objects
  RDMA/irdma: Do not generate SW completions for NOPs
  clk: sprd: set max_register according to mapping range
  drm/i915/dsi: fix DSS CTL register offsets for TGL+
  fbcon: set_con2fb_map needs to set con2fb_map!
  fbcon: Fix error paths in set_con2fb_map
  KVM: arm64: PMU: Restore the guest's EL0 event counting after migration
  mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  mtd: rawnand: stm32_fmc2: remove unsupported EDO mode
  mtd: rawnand: meson: fix bitmask for length in command word
  mtdblock: tolerate corrected bit-flips
  fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace
  btrfs: fix fast csum implementation detection
  btrfs: restore the thread_pool= behavior in remount for the end I/O workqueues
  Bluetooth: hci_conn: Fix possible UAF
  Bluetooth: Free potentially unfreed SCO connection
  bluetooth: btbcm: Fix logic error in forming the board name.
  Bluetooth: Fix race condition in hidp_session_thread
  Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}
  ALSA: hda/hdmi: disable KAE for Intel DG2
  ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards
  ALSA: emu10k1: don't create old pass-through playback device on Audigy
  ALSA: firewire-tascam: add missing unwind goto in snd_tscm_stream_start_duplex()
  ALSA: hda/realtek: Add quirks for Lenovo Z13/Z16 Gen2
  ALSA: hda: patch_realtek: add quirk for Asus N7601ZM
  ALSA: i2c/cs8427: fix iec958 mixer control deactivation
  ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard
  ALSA: emu10k1: fix capture interrupt handler unlinking
  drm/amd/display: Pass the right info to drm_dp_remove_payload
  Revert "pinctrl: amd: Disable and mask interrupts on resume"
  f2fs: remove unnessary comment in __may_age_extent_tree
  f2fs: allocate node blocks for atomic write block replacement
  f2fs: use cow inode data when updating atomic write
  f2fs: remove power-of-two limitation of zoned device
  f2fs: allocate trace path buffer from names_cache
  ANDROID: ABI: Update the tcpci symbols for pixel
  ANDROID: ABI: Add drm_atomic_bridge_chain_disable and drm_atomic_bridge_chain_enable in QCOM symbol list
  ANDROID: firmware/psci: Remove PSCI_1_1_FN64_MEM_PROTECT definition
  ANDROID: Add initial symbol list for Exynos SoC
  f2fs: add has_enough_free_secs()
  f2fs: relax sanity check if checkpoint is corrupted
  f2fs: refactor f2fs_gc to call checkpoint in urgent condition
  f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio
  f2fs: remove bulk remove_proc_entry() and unnecessary kobject_del()
  f2fs: support iopoll method
  Linux 6.1.24
  bpftool: Print newline before '}' for struct with padding only fields
  mm: enable maple tree RCU mode by default.
  maple_tree: add RCU lock checking to rcu callback functions
  maple_tree: add smp_rmb() to dead node detection
  maple_tree: remove extra smp_wmb() from mas_dead_leaves()
  maple_tree: fix freeing of nodes in rcu mode
  maple_tree: detect dead nodes in mas_start()
  maple_tree: refine ma_state init from mas_start()
  maple_tree: be more cautious about dead nodes
  maple_tree: fix mas_prev() and mas_find() state handling
  maple_tree: fix handle of invalidated state in mas_wr_store_setup()
  maple_tree: reduce user error potential
  maple_tree: fix potential rcu issue
  maple_tree: remove GFP_ZERO from kmem_cache_alloc() and kmem_cache_alloc_bulk()
  mm: take a page reference when removing device exclusive entries
  drm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm()
  drm/i915: Use _MMIO_PIPE() for SKL_BOTTOM_COLOR
  drm/bridge: lt9611: Fix PLL being unable to lock
  drm/i915/dp_mst: Fix payload removal during output disabling
  drm/display/dp_mst: Handle old/new payload states in drm_dp_remove_payload()
  drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset
  drm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume
  drm/amd/display: Clear MST topology if it fails to resume
  blk-throttle: Fix that bps of child could exceed bps limited in parent
  maple_tree: fix a potential concurrency bug in RCU mode
  maple_tree: fix get wrong data_end in mtree_lookup_walk()
  mm/hugetlb: fix uffd wr-protection for CoW optimization path
  mm/swap: fix swap_info_struct race between swapoff and get_swap_pages()
  ring-buffer: Fix race while reader and writer are on the same page
  drm/i915: fix race condition UAF in i915_perf_add_config_ioctl
  drm/i915: Fix context runtime accounting
  drm/nouveau/disp: Support more modes by checking with lower bpc
  drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
  ublk: read any SQE values upfront
  wifi: mt76: ignore key disable commands
  mm: vmalloc: avoid warn_alloc noise caused by fatal signal
  zsmalloc: document freeable stats
  tracing/synthetic: Make lastcmd_mutex static
  ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots()
  tracing: Free error logs of tracing instances
  tracing/osnoise: Fix notify new tracing_max_latency
  tracing/timerlat: Notify new max thread latency
  tracing/synthetic: Fix races on freeing last_cmd
  net: stmmac: Add queue reset into stmmac_xdp_open() function
  ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530
  ACPI: video: Add acpi_backlight=video quirk for Apple iMac14,1 and iMac14,2
  ACPI: video: Make acpi_backlight=video work independent from GPU driver
  ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type()
  can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos
  can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events
  can: isotp: fix race between isotp_sendsmg() and isotp_release()
  can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access
  fs: drop peer group ids under namespace lock
  ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct()
  ftrace: Mark get_lock_parent_ip() __always_inline
  perf/core: Fix the same task check in perf_event_set_output
  block: don't set GD_NEED_PART_SCAN if scan partition failed
  block: ublk: make sure that block size is set correctly
  cifs: sanitize paths in cifs_update_super_prepath.
  nvme: fix discard support without oncs
  scsi: iscsi_tcp: Check that sock is valid before iscsi_set_param()
  scsi: qla2xxx: Fix memory leak in qla2x00_probe_one()
  io_uring: fix memory leak when removing provided buffers
  io_uring: fix return value when removing provided buffers
  iio: adc: ad7791: fix IRQ flags
  blk-mq: directly poll requests
  counter: 104-quad-8: Fix Synapse action reported for Index signals
  counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
  coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug
  coresight: etm4x: Do not access TRCIDR1 for identification
  mm: kfence: fix handling discontiguous page
  mm: kfence: fix PG_slab and memcg_data clearing
  KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode
  KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection
  x86/ACPI/boot: Use FADT version to check support for online capable
  x86/acpi/boot: Correct acpi_is_processor_usable() check
  ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook
  ALSA: hda/realtek: Add quirk for Clevo X370SNW
  ksmbd: fix slab-out-of-bounds in init_smb2_rsp_hdr
  ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN
  serial: 8250: Prevent starting up DMA Rx on THRI interrupt
  dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs
  nilfs2: fix sysfs interface lifetime
  nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread()
  tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty
  tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
  tty: serial: sh-sci: Fix transmit end interrupt handler
  iio: light: cm32181: Unregister second I2C client if present
  iio: buffer: make sure O_NONBLOCK is respected
  iio: buffer: correctly return bytes written in output buffers
  iio: dac: cio-dac: Fix max DAC write value check for 12-bit
  iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip
  iio: adc: qcom-spmi-adc5: Fix the channel name
  iio: adis16480: select CONFIG_CRC32
  drivers: iio: adc: ltc2497: fix LSB shift
  USB: serial: option: add Quectel RM500U-CN modem
  USB: serial: option: add Telit FE990 compositions
  usb: typec: altmodes/displayport: Fix configure initial pin assignment
  USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs
  usb: dwc3: pci: add support for the Intel Meteor Lake-S
  usb: cdnsp: Fixes error: uninitialized symbol 'len'
  xhci: also avoid the XHCI_ZERO_64B_REGS quirk with a passthrough iommu
  xhci: Free the command allocated for setting LPM if we return early
  usb: xhci: tegra: fix sleep in atomic call
  PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y
  PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y
  cxl/pci: Handle excessive CDAT length
  cxl/pci: Handle truncated CDAT entries
  cxl/pci: Handle truncated CDAT header
  cxl/pci: Fix CDAT retrieval on big endian
  net: stmmac: check fwnode for phy device before scanning for phy
  arm64: compat: Work around uninitialized variable warning
  gve: Secure enough bytes in the first TX desc for all TCP pkts
  netlink: annotate lockless accesses to nlk->max_recvmsg_len
  ethtool: reset #lanes when lanes is omitted
  ping: Fix potentail NULL deref for /proc/net/icmp.
  raw: Fix NULL deref in raw_get_next().
  raw: use net_hash_mix() in hash function
  ice: Reset FDIR counter in FDIR init stage
  ice: fix wrong fallback logic for FDIR
  NFSD: callback request does not use correct credential for AUTH_SYS
  sunrpc: only free unix grouplist after RCU settles
  net: stmmac: fix up RX flow hash indirection table when setting channels
  net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe
  gpio: davinci: Add irq chip flag to skip set wake
  gpio: davinci: Do not clear the bank intr enable bit in save_context
  platform/x86: think-lmi: Clean up display of current_value on Thinkstation
  platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings
  platform/x86: think-lmi: Fix memory leak when showing current settings
  ipv6: Fix an uninit variable access bug in __ip6_make_skb()
  net: qrtr: Do not do DEL_SERVER broadcast after DEL_CLIENT
  sctp: check send stream number after wait_for_sndbuf
  net: dsa: mv88e6xxx: Reset mv88e6393x force WD event bit
  net: don't let netpoll invoke NAPI if in xmit context
  ALSA: hda/hdmi: Preserve the previous PCM device upon re-enablement
  icmp: guard against too small mtu
  nfsd: call op_release, even when op_func returns an error
  NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL
  wifi: brcmfmac: Fix SDIO suspend/resume regression
  l2tp: generate correct module alias strings
  net: stmmac: remove redundant fixup to support fixed-link mode
  net: stmmac: check if MAC needs to attach to a PHY
  net: phylink: add phylink_expects_phy() method
  net: qrtr: Fix a refcount bug in qrtr_recvmsg()
  wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta
  wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap()
  KVM: s390: pv: fix external interruption loop not always detected
  ASoC: codecs: lpass: fix the order or clks turn off during suspend
  pwm: meson: Explicitly set .polarity in .get_state()
  pwm: sprd: Explicitly set .polarity in .get_state()
  pwm: iqs620a: Explicitly set .polarity in .get_state()
  pwm: cros-ec: Explicitly set .polarity in .get_state()
  pwm: hibvt: Explicitly set .polarity in .get_state()
  pwm: Make .get_state() callback return an error code
  ASoC: SOF: ipc4: Ensure DSP is in D0I0 during sof_ipc4_set_get_data()
  Drivers: vmbus: Check for channel allocation before looking up relids
  gpio: GPIO_REGMAP: select REGMAP instead of depending on it
  KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU
  KVM: arm64: PMU: Sanitise PMCR_EL0.LP on first vcpu run
  KVM: arm64: PMU: Distinguish between 64bit counter and 64bit overflow
  KVM: arm64: PMU: Align chained counter implementation with architecture pseudocode
  dm: fix improper splitting for abnormal bios
  dm: change "unsigned" to "unsigned int"
  dm integrity: Remove bi_sector that's only used by commented debug code
  dm cache: Add some documentation to dm-cache-background-tracker.h
  f2fs: remove batched_trim_sections node description
  f2fs: fix to check return value of inc_valid_block_count()
  f2fs: fix to check return value of f2fs_do_truncate_blocks()
  f2fs: fix passing relative address when discard zones
  f2fs: fix potential corruption when moving a directory
  f2fs: add radix_tree_preload_end in error case
  f2fs: fix to recover quota data correctly
  f2fs: fix to check readonly condition correctly
  docs: f2fs: Correct instruction to disable checkpoint
  f2fs: fix to keep consistent i_gc_rwsem lock order
  f2fs: fix to drop all dirty pages during umount() if cp_error is set
  f2fs: fix to avoid use-after-free for cached IPU bio
  f2fs: remove unneeded in-memory i_crtime copy
  f2fs: use f2fs_hw_is_readonly() instead of bdev_read_only()
  f2fs: use common implementation of file type
  f2fs: merge lz4hc_compress_pages() to lz4_compress_pages()
  f2fs: convert to use sysfs_emit
  f2fs: set default compress option only when sb_has_compression
  f2fs: Fix system crash due to lack of free space in LFS
  f2fs: remove struct victim_selection default_v_ops
  f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block
  f2fs: fix iostat lock protection
  f2fs: fix align check for npo2
  f2fs: add compression feature check for all compress mount opt
  f2fs: convert is_extension_exist() to return bool type
  f2fs: fix scheduling while atomic in decompression path
  f2fs: preserve direct write semantics when buffering is forced
  f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages()
  f2fs: remove else in f2fs_write_cache_pages()
  f2fs: apply zone capacity to all zone type
  f2fs: fix to handle filemap_fdatawrite() error in f2fs_ioc_decompress_file/f2fs_ioc_compress_file
  f2fs: convert to MAX_SBI_FLAG instead of 32 in stat_show()
  f2fs: Fix discard bug on zoned block devices with 2MiB zone size
  f2fs: remove entire rb_entry sharing
  f2fs: factor out discard_cmd usage from general rb_tree use
  f2fs: factor out victim_entry usage from general rb_tree use
  f2fs: fix uninitialized skipped_gc_rwsem
  f2fs: handle dqget error in f2fs_transfer_project_quota()
  f2fs: convert to use bitmap API
  f2fs: export compress_percent and compress_watermark entries
  f2fs: make f2fs_sync_inode_meta() static
  f2fs: Fix f2fs_truncate_partial_nodes ftrace event

 Conflicts:
	Documentation/devicetree/bindings
	Documentation/devicetree/bindings/serial/renesas,scif.yaml
	android/abi_gki_aarch64.stg
	net/qrtr/af_qrtr.c
	net/qrtr/ns.c

Change-Id: I2b2b2f1569aa65700b2382c7ea4ea5d84c8f573c
Upstream-Build: ks_qcom-android14-6.1-keystone-qcom-release@10066587 UKQ2.230504.001
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
2023-05-15 08:16:35 -07:00
Krzysztof Kozlowski
1757621b87 iio: light: max44009: add missing OF device matching
[ Upstream commit b29c49026c3c05a11f845dba17cad0b3ba06836d ]

The driver currently matches only via i2c_device_id, but also has
of_device_id table:

  drivers/iio/light/max44009.c:545:34: error: ‘max44009_of_match’ defined but not used [-Werror=unused-const-variable=]

Fixes: 6aef699a7d ("iio: light: add driver for MAX44009")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230312153429.371702-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:27 +09:00
William Breathitt Gray
9fd4768b09 iio: addac: stx104: Fix race condition for stx104_write_raw()
commit 9740827468cea80c42db29e7171a50e99acf7328 upstream.

The priv->chan_out_states array and actual DAC value can become
mismatched if stx104_write_raw() is called concurrently. Prevent such a
race condition by utilizing a mutex.

Fixes: 97a445dad3 ("iio: Add IIO support for the DAC on the Apex Embedded Systems STX104")
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/c95c9a77fcef36b2a052282146950f23bbc1ebdc.1680790580.git.william.gray@linaro.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:03:01 +09:00
William Breathitt Gray
c38a4eb8aa iio: addac: stx104: Fix race condition when converting analog-to-digital
commit 4f9b80aefb9e2f542a49d9ec087cf5919730e1dd upstream.

The ADC conversion procedure requires several device I/O operations
performed in a particular sequence. If stx104_read_raw() is called
concurrently, the ADC conversion procedure could be clobbered. Prevent
such a race condition by utilizing a mutex.

Fixes: 4075a283ae ("iio: stx104: Add IIO support for the ADC channels")
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/2ae5e40eed5006ca735e4c12181a9ff5ced65547.1680790580.git.william.gray@linaro.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:03:01 +09:00
Patrik Dahlström
372bec6747 iio: adc: palmas_gpadc: fix NULL dereference on rmmod
[ Upstream commit 49f76c499d38bf67803438eee88c8300d0f6ce09 ]

Calling dev_to_iio_dev() on a platform device pointer is undefined and
will make adc NULL.

Signed-off-by: Patrik Dahlström <risca@dalakolonin.se>
Link: https://lore.kernel.org/r/20230313205029.1881745-1-risca@dalakolonin.se
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:02:58 +09:00
Mario Tesi
51e7fa4065 drivers:iio:stm:imu:st_lsm6dsox: reworks wakeup-source support
Moved from Kconfig to device tree the possibility to
enable the wakeup source capability.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I03100eea0dc63b0872d2dbf8bb1eb11547bf5a2b
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282314
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-03 14:23:23 +02:00
Mario Tesi
3960841dc3 drivers:iio:stm:imu:st_lsm6dsvx: reworks wakeup-source support
Moved from Kconfig to device tree the possibility to
enable the wakeup source capability.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ie1c4319030af0d17acf1d314efd719f07a0ea398
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282313
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-03 14:23:23 +02:00
Mario Tesi
4f7d4a397f drivers:iio:stm:imu:st_lsm6dsrx: reworks wakeup-source support
Moved from Kconfig to device tree the possibility to
enable the wakeup source capability.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ib0c12d1d7c2a7e03158b5b247dfdeaf9d77f1950
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282312
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-03 14:23:23 +02:00
Mario Tesi
97683cc17e drivers:iio:stm:imu:st_ism330dhcx: reworks wakeup-source support
Moved from Kconfig to device tree the possibility to
enable the wakeup source capability.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ib6c5e7dd4e7b33e821c8dc24f85a35494ff72d6d
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282311
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-03 14:23:23 +02:00
Mario Tesi
f1b054b7a1 drivers:iio:stm:imu:st_asm330lhhx: reworks wakeup-source support
Moved from Kconfig to device tree the possibility to
enable the wakeup source capability.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I3e03b2d6a8ddef0153bd205ca40e212889bac6a9
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/282310
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-03 12:07:08 +02:00
Anjelique Melendez
c0784c75e7 iio: qcom-spmi-adc5-gen3: add support for reg dumping when error seen
Add CONFIG_QCOM_SPMI_ADC5_GEN3_DEBUG_LOGGING so that when enabled register
dumps can be collected when ADC channel read times out or ADC conversion
fault is seen.

Change-Id: I06cd36e6cdf37fd9343d34483b94d3ab8b9c4bdf
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2023-05-01 10:01:03 -07:00
Dan Carpenter
f8c3eb751a iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
commit 73a428b37b9b538f8f8fe61caa45e7f243bab87c upstream.

The at91_adc_allocate_trigger() function is supposed to return error
pointers.  Returning a NULL will cause an Oops.

Fixes: 5e1a1da0f8 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/5d728f9d-31d1-410d-a0b3-df6a63a2c8ba@kili.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 14:28:43 +02:00
Brian Masney
31f7c99e36 iio: light: tsl2772: fix reading proximity-diodes from device tree
commit b1cb00d51e361cf5af93649917d9790e1623647e upstream.

tsl2772_read_prox_diodes() will correctly parse the properties from
device tree to determine which proximity diode(s) to read from, however
it didn't actually set this value on the struct tsl2772_settings. Let's
go ahead and fix that.

Reported-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/lkml/20230327120823.1369700-1-trix@redhat.com/
Fixes: 94cd1113aa ("iio: tsl2772: add support for reading proximity led settings from device tree")
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20230404011455.339454-1-bmasney@redhat.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 14:28:38 +02:00
Liang He
b263f81bd1 iio: dac: ad5755: Add missing fwnode_handle_put()
commit ffef73791574b8da872cfbf881d8e3e9955fc130 upstream.

In ad5755_parse_fw(), we should add fwnode_handle_put()
when break out of the iteration device_for_each_child_node()
as it will automatically increase and decrease the refcounter.

Fixes: 3ac27afefd ("iio:dac:ad5755: Switch to generic firmware properties and drop pdata")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20230322035627.1856421-1-windhl@126.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 14:28:37 +02:00
Madhu Ananthula
e159c77ce0 iio: qcom-spmi-adc5-gen3: Fix in adc_tm5_gen3_set_trip_temp()
Since "adc" pointer is initialized after validating
whether "prop" is valid, initializing it beforehand
is redundant. So, remove it.

Change-Id: I6f56cf8ce2a0615a97460893e9c88a530ebf0f40
Signed-off-by: Madhu Ananthula <quic_mananthu@quicinc.com>
2023-04-25 10:55:41 -07:00
Madhu Ananthula
cf1fcfbc76 iio: qcom-spmi-adc5-gen3: Update variable initializations
Initialize some variables used in tm_handler_work()
and adc_tm_disable_chan_meas_gen3() to avoid their
usage without initialization.

Change-Id: I9d597c69ac84069cdab79d89e3d1cd3ee7af2857
Signed-off-by: Madhu Ananthula <quic_mananthu@quicinc.com>
2023-04-25 10:50:02 -07:00
Nuno Sá
9f03d09b09 iio: adc: ad7791: fix IRQ flags
[ Upstream commit 0c6ef985a1fd8a74dcb5cad941ddcadd55cb8697 ]

The interrupt is triggered on the falling edge rather than being a level
low interrupt.

Fixes: da4d3d6bb9 ("iio: adc: ad-sigma-delta: Allow custom IRQ flags")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230120124645.819910-1-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-13 16:55:31 +02:00
Kai-Heng Feng
85c3acbeef iio: light: cm32181: Unregister second I2C client if present
commit 099cc90a5a62e68b2fe3a42da011ab929b98bf73 upstream.

If a second dummy client that talks to the actual I2C address was
created in probe(), there should be a proper cleanup on driver and
device removal to avoid leakage.

So unregister the dummy client via another callback.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Fixes: c1e62062ff ("iio: light: cm32181: Handle CM3218 ACPI devices with 2 I2C resources")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2152281
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20230223020059.2013993-1-kai.heng.feng@canonical.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:27 +02:00
Nuno Sá
9ba3466e63 iio: buffer: make sure O_NONBLOCK is respected
commit 3da1814184582ed0faf039275a3f02e6f69944ee upstream.

For output buffers, there's no guarantee that the buffer won't be full
in the first iteration of the loop in which case we would block
independently of userspace passing O_NONBLOCK or not. Fix it by always
checking the flag before going to sleep.

While at it (and as it's a bit related), refactored the loop so that the
stop condition is 'written != n', i.e, run the loop until all data has
been copied into the IIO buffers. This makes the code a bit simpler.

Fixes: 9eeee3b0bf ("iio: Add output buffer support")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230216101452.591805-3-nuno.sa@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:27 +02:00
Nuno Sá
1658d973b2 iio: buffer: correctly return bytes written in output buffers
commit b5184a26a28fac1d708b0bfeeb958a9260c2924c upstream.

If for some reason 'rb->access->write()' does not write the full
requested data and the O_NONBLOCK is set, we would return 'n' to
userspace which is not really truth. Hence, let's return the number of
bytes we effectively wrote.

Fixes: 9eeee3b0bf ("iio: Add output buffer support")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230216101452.591805-2-nuno.sa@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:27 +02:00
William Breathitt Gray
59d667d7ae iio: dac: cio-dac: Fix max DAC write value check for 12-bit
commit c3701185ee1973845db088d8b0fc443397ab0eb2 upstream.

The CIO-DAC series of devices only supports DAC values up to 12-bit
rather than 16-bit. Trying to write a 16-bit value results in only the
lower 12 bits affecting the DAC output which is not what the user
expects. Instead, adjust the DAC write value check to reject values
larger than 12-bit so that they fail explicitly as invalid for the user.

Fixes: 3b8df5fd52 ("iio: Add IIO support for the Measurement Computing CIO-DAC family")
Cc: stable@vger.kernel.org
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/20230311002248.8548-1-william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:27 +02:00
Lars-Peter Clausen
c723a410a4 iio: adc: ti-ads7950: Set can_sleep flag for GPIO chip
commit 363c7dc72f79edd55bf1c4380e0fbf7f1bbc2c86 upstream.

The ads7950 uses a mutex as well as SPI transfers in its GPIO callbacks.
This means these callbacks can sleep and the `can_sleep` flag should be
set.

Having the flag set will make sure that warnings are generated when calling
any of the callbacks from a potentially non-sleeping context.

Fixes: c97dce792d ("iio: adc: ti-ads7950: add GPIO support")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: David Lechner <david@lechnology.com>
Link: https://lore.kernel.org/r/20230312210933.2275376-1-lars@metafoo.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:27 +02:00