]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
8 months agoiio: light: veml6030: simplify code in write_event_config callback
Julien Stephan [Thu, 24 Oct 2024 09:11:26 +0000 (11:11 +0200)]
iio: light: veml6030: simplify code in write_event_config callback

iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to the write_event_config
callback.

Remove useless code in write_event_config callback.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241024-iio-fix-write-event-config-signature-v1-4-7d29e5a31b00@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: ltr501: simplify code in write_event_config callback
Julien Stephan [Thu, 24 Oct 2024 09:11:25 +0000 (11:11 +0200)]
iio: light: ltr501: simplify code in write_event_config callback

iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to the write_event_config
callback.

Remove useless code in write_event_config callback.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241024-iio-fix-write-event-config-signature-v1-3-7d29e5a31b00@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: bh1745: simplify code in write_event_config callback
Julien Stephan [Thu, 24 Oct 2024 09:11:23 +0000 (11:11 +0200)]
iio: light: bh1745: simplify code in write_event_config callback

iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to the write_event_config
callback.

Remove useless code in write_event_config callback.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241024-iio-fix-write-event-config-signature-v1-1-7d29e5a31b00@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: ltr501: Replace a variant of iio_get_acpi_device_name_and_data()
Andy Shevchenko [Thu, 24 Oct 2024 19:05:13 +0000 (22:05 +0300)]
iio: light: ltr501: Replace a variant of iio_get_acpi_device_name_and_data()

IIO core (ACPI part) provides a generic helper that may be used in
the driver. Replace a variant of iio_get_acpi_device_name_and_data().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-25-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: ltr501: Add LTER0303 to the supported devices
Andy Shevchenko [Thu, 24 Oct 2024 19:05:12 +0000 (22:05 +0300)]
iio: light: ltr501: Add LTER0303 to the supported devices

It has been found that the (non-vendor issued) ACPI ID for Lite-On
LTR303 is present in Microsoft catalog. Add it to the list of the
supported devices.

Link: https://www.catalog.update.microsoft.com/Search.aspx?q=lter0303
Closes: https://lore.kernel.org/r/9cdda3e0-d56e-466f-911f-96ffd6f602c8@redhat.com
Reported-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-24-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: ltr501: Drop most likely fake ACPI IDs
Andy Shevchenko [Thu, 24 Oct 2024 19:05:11 +0000 (22:05 +0300)]
iio: light: ltr501: Drop most likely fake ACPI IDs

The commits in question do not proove that ACPI IDs exist.
Quite likely it was a cargo cult addition while doing that
for DT-based enumeration. Drop most likely fake ACPI IDs.

The to be removed IDs has been checked against the following resources:
1) DuckDuckGo
2) Google
3) MS catalog: https://www.catalog.update.microsoft.com/Search.aspx
This gives no useful results in regard to DSDT, moreover, the official
vendor ID in the registry for Lite-On is LCI.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-23-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: isl29018: drop ACPI_PTR() and CONFIG_ACPI guards
Andy Shevchenko [Thu, 24 Oct 2024 19:05:10 +0000 (22:05 +0300)]
iio: light: isl29018: drop ACPI_PTR() and CONFIG_ACPI guards

The complexity of config guards needed for ACPI_PTR() is not worthwhile
for the small amount of saved data. This example was doing it correctly
but I am proposing dropping this so as to reduce chance of cut and paste
where it is done wrong.  Also drop now unneeded linux/acpi.h include and
added linux/mod_devicetable.h for struct acpi_device_id definition.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-22-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: isl29018: Replace a variant of iio_get_acpi_device_name_and_data()
Andy Shevchenko [Thu, 24 Oct 2024 19:05:09 +0000 (22:05 +0300)]
iio: light: isl29018: Replace a variant of iio_get_acpi_device_name_and_data()

IIO core (ACPI part) provides a generic helper that may be used in
the driver. Replace a variant of iio_get_acpi_device_name_and_data().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-21-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: gyro: bmg160: Replace custom implementation of iio_get_acpi_device_name()
Andy Shevchenko [Thu, 24 Oct 2024 19:05:08 +0000 (22:05 +0300)]
iio: gyro: bmg160: Replace custom implementation of iio_get_acpi_device_name()

IIO core (ACPI part) provides a generic helper that may be used in
the driver. Replace custom implementation of iio_get_acpi_device_name().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-20-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: mma9553: Replace custom implementation of iio_get_acpi_device_name()
Andy Shevchenko [Thu, 24 Oct 2024 19:05:07 +0000 (22:05 +0300)]
iio: accel: mma9553: Replace custom implementation of iio_get_acpi_device_name()

IIO core (ACPI part) provides a generic helper that may be used in
the driver. Replace custom implementation of iio_get_acpi_device_name().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-19-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: mma9551: Replace custom implementation of iio_get_acpi_device_name()
Andy Shevchenko [Thu, 24 Oct 2024 19:05:06 +0000 (22:05 +0300)]
iio: accel: mma9551: Replace custom implementation of iio_get_acpi_device_name()

IIO core (ACPI part) provides a generic helper that may be used in
the driver. Replace custom implementation of iio_get_acpi_device_name().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-18-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: drop ACPI_PTR() and move ID out of CONFIG_ACPI guards
Andy Shevchenko [Thu, 24 Oct 2024 19:05:05 +0000 (22:05 +0300)]
iio: accel: kxcjk-1013: drop ACPI_PTR() and move ID out of CONFIG_ACPI guards

The complexity of config guards needed for ACPI_PTR() is not worthwhile
for the small amount of saved data. This example was doing it correctly
but I am proposing dropping this so as to reduce chance of cut and paste
where it is done wrong. Also added linux/mod_devicetable.h for
struct acpi_device_id definition.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-17-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Replace a variant of iio_get_acpi_device_name_and_data()
Andy Shevchenko [Thu, 24 Oct 2024 19:05:04 +0000 (22:05 +0300)]
iio: accel: kxcjk-1013: Replace a variant of iio_get_acpi_device_name_and_data()

IIO core (ACPI part) provides a generic helper that may be used in
the driver. Replace a variant of iio_get_acpi_device_name_and_data().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-16-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Get rid of enum kx_chipset
Andy Shevchenko [Thu, 24 Oct 2024 19:05:03 +0000 (22:05 +0300)]
iio: accel: kxcjk-1013: Get rid of enum kx_chipset

Instead of using enum, out of which only a couple of values
are being actually used, make a comparisons against pointer
to the respective chip_info structures.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-15-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Convert ODR times array to variable in chip_info
Andy Shevchenko [Thu, 24 Oct 2024 19:05:02 +0000 (22:05 +0300)]
iio: accel: kxcjk-1013: Convert ODR times array to variable in chip_info

Convert odr_start_up_times array to the variable in chip_info.
Tweak whitespace for readablity whilst here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-14-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Move odr_start_up_times up in the code
Andy Shevchenko [Thu, 24 Oct 2024 19:05:01 +0000 (22:05 +0300)]
iio: accel: kxcjk-1013: Move odr_start_up_times up in the code

Move odr_start_up_times up in the code in a preparation of
the further cleaning up changes.

While at it, make it clear what values from enum are being used for
the respective array entries.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-13-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Start using chip_info variables instead of enum
Andy Shevchenko [Thu, 24 Oct 2024 19:05:00 +0000 (22:05 +0300)]
iio: accel: kxcjk-1013: Start using chip_info variables instead of enum

Instead of having a enum and keeping IDs as driver data pointers,
just have a chip_info struct per supported device.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-12-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Rename kxcjk1013_info
Andy Shevchenko [Thu, 24 Oct 2024 19:04:59 +0000 (22:04 +0300)]
iio: accel: kxcjk-1013: Rename kxcjk1013_info

Rename kxcjk1013_info to kxcjk1013_iio_info in preparatory of
further cleaning up changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-11-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Use local variable for regs
Andy Shevchenko [Thu, 24 Oct 2024 19:04:58 +0000 (22:04 +0300)]
iio: accel: kxcjk-1013: Use local variable for regs

Use local variable for regs in preparatory of further cleaning up changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-10-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Switch from CONFIG_PM guards to pm_ptr() etc
Andy Shevchenko [Thu, 24 Oct 2024 19:04:57 +0000 (22:04 +0300)]
iio: accel: kxcjk-1013: Switch from CONFIG_PM guards to pm_ptr() etc

Letting the compiler remove these functions when the kernel is built
without CONFIG_PM support is simpler and less error prone than the
use of #ifdef based config guards.

Removing instances of this approach from IIO also stops them being
copied into new drivers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Revert "Add support for KX022-1020"
Andy Shevchenko [Thu, 24 Oct 2024 19:04:56 +0000 (22:04 +0300)]
iio: accel: kxcjk-1013: Revert "Add support for KX022-1020"

The mentioned change effectively broke the ODR startup timeouts
settungs for KX023-1025 case. Let's revert it for now and see
how we can handle it with the better approach after switching
the driver to use data structure instead of enum.

This reverts commit d5cbe1502043124ff8af8136b80f93758c4a61e0.

Fixes: d5cbe1502043 ("iio: accel: kxcjk-1013: Add support for KX022-1020")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: kxcjk-1013: Remove redundant I²C ID
Andy Shevchenko [Thu, 24 Oct 2024 19:04:55 +0000 (22:04 +0300)]
iio: accel: kxcjk-1013: Remove redundant I²C ID

The ACPI IDs are defined in the respective ID tables. Puting them
to the I²C ID legacy table has no meaning. Remove that ID.

Fixes: 3bfa74f86006 ("iio:kxcjk-1013: Add support for SMO8500 device")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: acpi: Add iio_get_acpi_device_name_and_data() helper function
Andy Shevchenko [Thu, 24 Oct 2024 19:04:54 +0000 (22:04 +0300)]
iio: acpi: Add iio_get_acpi_device_name_and_data() helper function

A few drivers duplicate the code to retrieve ACPI device instance name.
Some of them want an associated driver data as well.

In order of deduplication introduce the common helper functions.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: acpi: Improve iio_read_acpi_mount_matrix()
Andy Shevchenko [Thu, 24 Oct 2024 19:04:53 +0000 (22:04 +0300)]
iio: acpi: Improve iio_read_acpi_mount_matrix()

By using ACPI_HANDLE() the handler argument can be retrieved directly.
Replace ACPI_COMPANION() + dereference with ACPI_HANDLE().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: imu: inv_mpu6050: Replace strange way of checking type of enumeration
Andy Shevchenko [Thu, 24 Oct 2024 19:04:52 +0000 (22:04 +0300)]
iio: imu: inv_mpu6050: Replace strange way of checking type of enumeration

When device is enumerated via ACPI the respective device node is of
ACPI device type. Use that to check for ACPI enumeration, rather than
calling for full match which is O(n) vs. O(1) for the regular check.

Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: pac1934: Replace strange way of checking type of enumeration
Andy Shevchenko [Thu, 24 Oct 2024 19:04:51 +0000 (22:04 +0300)]
iio: adc: pac1934: Replace strange way of checking type of enumeration

When device is enumerated via ACPI the respective device node is of
ACPI device type. Use that to check for ACPI enumeration, rather than
calling for full match which is O(n) vs. O(1) for the regular check.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marius Cristea <marius.cristea@microchip.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: magnetometer: bmc150: Drop dead code from the driver
Andy Shevchenko [Thu, 24 Oct 2024 19:04:50 +0000 (22:04 +0300)]
iio: magnetometer: bmc150: Drop dead code from the driver

Since there is no ACPI IDs for this driver to be served for,
drop dead ACPI bits from it completely.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: add support for AD760{7,8,9} parts
Alexandru Ardelean [Fri, 25 Oct 2024 09:59:39 +0000 (12:59 +0300)]
iio: adc: ad7606: add support for AD760{7,8,9} parts

The AD7607, AD7608 and AD7609 are some older parts of the AD7606 family.
They are hardware-only, meaning that they don't have any registers
accessible via SPI or Parallel interface.
They are more similar to the AD7605-4 part, which is supported by the
'ad7606' driver, and are configurable via GPIOs.

Like the AD7605-4 part, all 3 parts have 2 CONVST (Conversion Start) pins
(CONVST A and CONVST B). But in practice, these should be tied together to
make reading of samples easier via a serial line.

The AD7607 has an 14-bit resolution and AD7608 & AD7609 have an 18-bit
resolution. The main difference between the AD7608 & AD7609 is that the
AD7609 has a larger range (±10V & ±20V) vs the ±5V & ±10V ranges for AD7608.

However, unlike AD7605-4 part, these 3 parts have oversampling which is
configurable (like for the AD7606 in HW-mode) via GPIOs.

Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7607.pdf
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7608.pdf
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7609.pdf

Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241025095939.271811-6-aardelean@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: adc: adi,ad7606: document AD760{7,8,9} parts
Alexandru Ardelean [Fri, 25 Oct 2024 09:59:38 +0000 (12:59 +0300)]
dt-bindings: iio: adc: adi,ad7606: document AD760{7,8,9} parts

This change adds the AD7607, AD7608 & AD7609 parts to the binding doc of
the ad7606 driver.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241025095939.271811-5-aardelean@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: rework scale-available to be static
Alexandru Ardelean [Fri, 25 Oct 2024 09:59:37 +0000 (12:59 +0300)]
iio: adc: ad7606: rework scale-available to be static

The main driver for this change is the AD7607 part, which has a scale of
"1.220703" for the ±10V range. The AD7607 has a resolution of 14-bits.

So, just adding the scale-available list for that part would require some
quirks to handle just that scale value.
But to do it more neatly, the best approach is to rework the scale
available lists to have the same format as it is returned to userspace.
That way, we can also get rid of the allocation for the 'scale_avail_show'
array.

Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241025095939.271811-4-aardelean@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: use realbits for sign-extending in scan_direct
Alexandru Ardelean [Fri, 25 Oct 2024 09:59:36 +0000 (12:59 +0300)]
iio: adc: ad7606: use realbits for sign-extending in scan_direct

Currently the 'ad7606' driver supports parts with 18 and 16 bits
resolutions.
But when adding support for AD7607 (which has a 14-bit resolution) we
should check for the 'realbits' field, to be able to sign-extend correctly.

Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241025095939.271811-3-aardelean@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: fix/persist oversampling_ratio setting
Alexandru Ardelean [Fri, 25 Oct 2024 09:59:35 +0000 (12:59 +0300)]
iio: adc: ad7606: fix/persist oversampling_ratio setting

When the mutexes were reworked to guards, the caching of the
oversampling_ratio values was removed by accident.

The main effect of this change is that, after setting the
oversampling_ratio value, reading it back would result in the initial value
(of 1).
The value would get sent to the device correctly though.

Fixes 2956979dbd0d: ("iio: adc: ad7606: switch mutexes to guard")

Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241025095939.271811-2-aardelean@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: imu: bmi270: Provide chip info as configuration structure
Justin Weiss [Sun, 20 Oct 2024 22:00:06 +0000 (15:00 -0700)]
iio: imu: bmi270: Provide chip info as configuration structure

Prepare the bmi270 driver to support similar devices like the bmi260.

Signed-off-by: Justin Weiss <justin@justinweiss.com>
Link: https://patch.msgid.link/20241020220011.212395-3-justin@justinweiss.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: imu: bmi270: Remove unused FREQUENCY / SCALE attributes
Justin Weiss [Sun, 20 Oct 2024 22:00:05 +0000 (15:00 -0700)]
iio: imu: bmi270: Remove unused FREQUENCY / SCALE attributes

These attributes are not currently wired up, and will always return
EINVAL.

Fixes: 3ea51548d6b2 ("iio: imu: Add i2c driver for bmi270 imu")
Signed-off-by: Justin Weiss <justin@justinweiss.com>
Link: https://patch.msgid.link/20241020220011.212395-2-justin@justinweiss.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: Remove "default n" entries
Andy Shevchenko [Tue, 22 Oct 2024 14:36:00 +0000 (17:36 +0300)]
iio: adc: Remove "default n" entries

Linus already once did that for PDx86, don't repeat our mistakes.
TL;DR: 'n' *is* the default 'default'.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241022143600.3314241-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: Remove "default n" entries
Andy Shevchenko [Tue, 22 Oct 2024 14:36:05 +0000 (17:36 +0300)]
iio: light: Remove "default n" entries

Linus already once did that for PDx86, don't repeat our mistakes.
TL;DR: 'n' *is* the default 'default'.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241022143605.3314275-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: replace s64 __aligned(8) with aligned_s64
Jonathan Cameron [Sun, 20 Oct 2024 18:07:20 +0000 (19:07 +0100)]
iio: accel: replace s64 __aligned(8) with aligned_s64

e4ca0e59c394 ("types: Complement the aligned types with signed 64-bit one")
introduced aligned_s64. Use it for all IIO accelerometer drivers.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/20241020180720.496327-1-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: opt3001: add support for TI's opt3002 light sensor
Emil Gedenryd [Thu, 3 Oct 2024 12:22:17 +0000 (14:22 +0200)]
iio: light: opt3001: add support for TI's opt3002 light sensor

TI's opt3002 light sensor shares most properties with the opt3001
model, with the exception of supporting a wider spectrum range.

Add support for TI's opt3002 by extending the TI opt3001 driver.

Datasheet: https://www.ti.com/product/OPT3002
Signed-off-by: Emil Gedenryd <emil.gedenryd@axis.com>
Link: https://patch.msgid.link/20241003-add_opt3002-v4-2-c550dc4591b4@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: light: opt3001: add compatible for opt3002
Emil Gedenryd [Thu, 3 Oct 2024 12:22:16 +0000 (14:22 +0200)]
dt-bindings: iio: light: opt3001: add compatible for opt3002

The opt3002 is a Light-to-Digital Sensor by TI with support for wide-range
spectrum light. It shares most properties with their opt3001 model with
the exception of having a wide spectral bandwidth, ranging from 300 nm
to 1000 nm.

Add the compatible string of opt3002.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Emil Gedenryd <emil.gedenryd@axis.com>
Link: https://patch.msgid.link/20241003-add_opt3002-v4-1-c550dc4591b4@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodrivers: iio: adc: add support for ad777x family
Ramona Alexandra Nechita [Mon, 14 Oct 2024 14:32:00 +0000 (17:32 +0300)]
drivers: iio: adc: add support for ad777x family

Add support for AD7770, AD7771, AD7779 ADCs. The device is capable of
sending out data both on DOUT lines interface,as on the SDO line.
The driver currently implements only the SDO data streaming mode. SPI
communication is used alternatively for accessing registers and streaming
data. Register accesses are protected by crc8.

Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
Link: https://patch.msgid.link/20241014143204.30195-4-ramona.nechita@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoDocumentation: ABI: added filter mode doc in sysfs-bus-iio
Ramona Alexandra Nechita [Mon, 14 Oct 2024 14:31:59 +0000 (17:31 +0300)]
Documentation: ABI: added filter mode doc in sysfs-bus-iio

The filter mode / filter type property is used for ad4130
and ad7779 drivers, therefore the ABI doc file for ad4130
was removed, merging both of them in the sysfs-bus-iio.
Since one of the drivers is available from 6.1, the version
has been set to 6.1 for these attributes.

Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20241014143204.30195-3-ramona.nechita@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: adc: add ad7779 doc
Ramona Alexandra Nechita [Mon, 14 Oct 2024 14:31:58 +0000 (17:31 +0300)]
dt-bindings: iio: adc: add ad7779 doc

Add dt bindings for AD7779 8-channel, simultaneous sampling ADC
family with eight full Σ-Δ ADCs on chip and ultra-low input
current to allow direct sensor connection.

Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20241014143204.30195-2-ramona.nechita@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: Disable PWM usage for non backend version
Guillaume Stols [Tue, 15 Oct 2024 13:56:21 +0000 (13:56 +0000)]
iio: adc: ad7606: Disable PWM usage for non backend version

Since the pwm was introduced before backend, there was a mock use, with
a GPIO emulation. Now that iio backend is introduced, the mock use can
be removed.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-8-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: Add iio-backend support
Guillaume Stols [Tue, 15 Oct 2024 13:56:20 +0000 (13:56 +0000)]
iio: adc: ad7606: Add iio-backend support

- Basic support for iio backend.
- Supports IIO_CHAN_INFO_SAMP_FREQ R/W.
- Only hardware mode is available, and that IIO_CHAN_INFO_RAW is not
  supported if iio-backend mode is selected.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-7-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: Introduce num_adc_channels
Guillaume Stols [Tue, 15 Oct 2024 13:56:19 +0000 (13:56 +0000)]
iio: adc: ad7606: Introduce num_adc_channels

This variable determines how many hardware channels has the chip,
oppositely to the num_channels that can contain more channels, e.g a
timestamp channel in our case. Introducing this variable avoids
decreasing the former num_channels variable when reading the ADC's
channels, and clarifies a bit the code.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-6-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: Add compatibility to fw_nodes
Guillaume Stols [Tue, 15 Oct 2024 13:56:18 +0000 (13:56 +0000)]
iio: adc: ad7606: Add compatibility to fw_nodes

On the parallel version, the current implementation is only compatible
with id tables and won't work with fw_nodes, this commit intends to fix
it.

Doing so required to declare ad7606_chip_info structures in the .h file
so to make them accessible to all the driver files that can set a
pointer to the corresponding chip as the driver data.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-5-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7606: Add PWM support for conversion trigger
Guillaume Stols [Tue, 15 Oct 2024 13:56:17 +0000 (13:56 +0000)]
iio: adc: ad7606: Add PWM support for conversion trigger

Until now, the conversion were triggered by setting high the GPIO
connected to the convst pin. This commit gives the possibility to
connect the convst pin to a PWM.
Connecting a PWM allows to have a better control on the samplerate,
but it must be handled with care, as it is completely decorrelated of
the driver's busy pin handling.
Hence it is not recommended to be used "as is" but must be exploited
in conjunction with IIO backend, and for now only a mock functionality
is enabled, i.e PWM never swings, but is used as a GPIO, i.e duty_cycle
== period equals high state, duty_cycle == 0 equals low state.

This mock functionality will be disabled after the IIO backend usecase
is introduced.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-4-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoDocumentation: iio: Document ad7606 driver
Guillaume Stols [Tue, 15 Oct 2024 13:56:16 +0000 (13:56 +0000)]
Documentation: iio: Document ad7606 driver

The Analog Devices Inc. AD7606 (and similar chips) are complex ADCs that
will benefit from a detailed driver documentation.

This documents the current features supported by the driver.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-3-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: adc: ad7606: Add iio backend bindings
Guillaume Stols [Tue, 15 Oct 2024 13:56:15 +0000 (13:56 +0000)]
dt-bindings: iio: adc: ad7606: Add iio backend bindings

Add the required properties for iio-backend support, as well as an
example and the conditions to mutually exclude interruption and
conversion trigger with iio-backend.
The iio-backend's function is to controls the communication, and thus the
interruption pin won't be available anymore.
As a consequence, the conversion pin must be controlled externally since
we will miss information about when every single conversion cycle (i.e
conversion + data transfer) ends, hence a PWM is introduced to trigger
the conversions.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-2-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: adc: ad7606: Remove spi-cpha from required
Guillaume Stols [Tue, 15 Oct 2024 13:56:14 +0000 (13:56 +0000)]
dt-bindings: iio: adc: ad7606: Remove spi-cpha from required

The documentation is erroneously stating that spi-cpha is required, and
the example is erroneously setting both spi-cpol and spi-cpha. According
to the datasheet, only cpol should be set.

On zedboard for instance, setting the devicetree as in the example will
simply not work.

Fixes: 416f882c3b40 ("dt-bindings: iio: adc: Migrate AD7606 documentation to yaml")
Fixes: 6e33a125df66 ("dt-bindings: iio: adc: Add docs for AD7606 ADC")
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-1-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: addac: ad74413r: simplify with cleanup.h
Nuno Sa [Wed, 16 Oct 2024 14:22:01 +0000 (16:22 +0200)]
iio: addac: ad74413r: simplify with cleanup.h

Make use of mutex guard() and IIO iio_device_claim_direct_scoped() to
simplify code and error handling.

While at it, use devm_mutex_init() to initialize the mutex.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241016-dev-ad74413r-minor-improv-v1-3-13c9c769237d@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: addac: ad74413r: use devm_regulator_get_enable_read_voltage()
Nuno Sa [Wed, 16 Oct 2024 14:22:00 +0000 (16:22 +0200)]
iio: addac: ad74413r: use devm_regulator_get_enable_read_voltage()

It's highly unlikely for the converter ref voltage to change at runtime.
Hence, let's read the voltage and save it (instead of the regulator
struct). While at it, simplify the code by using
devm_regulator_get_enable_read_voltage().

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241016-dev-ad74413r-minor-improv-v1-2-13c9c769237d@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: addac: ad74413r: drop reset_gpio from struct ad74413r_state
Nuno Sa [Wed, 16 Oct 2024 14:21:59 +0000 (16:21 +0200)]
iio: addac: ad74413r: drop reset_gpio from struct ad74413r_state

We just need the reset gpio during probe so there's no need to keep it
in our state struct. Hence, move devm_gpiod_get_optional() into
ad74413r_reset() and use a local struct gpio_desc.

While at it, request the gpio in the asserted state (GPIOD_OUT_HIGH) so
that we already perform the reset while requesting the gpio saving us a
call to gpiod_set_value_cansleep().

Also, explicitly include <gpio/consumer.h> for
devm_gpiod_get_optional().

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241016-dev-ad74413r-minor-improv-v1-1-13c9c769237d@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: veml6070: use field to set integration time
Javier Carrasco [Thu, 17 Oct 2024 21:39:26 +0000 (23:39 +0200)]
iio: light: veml6070: use field to set integration time

Define the integration time within the configuration register as a field
to easy its handling as an index, preparing the driver to support
configurable integration times.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241017-veml6070-integration-time-v1-2-3507d17d562a@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: light: veml6070: use unsigned int instead of unsigned
Javier Carrasco [Thu, 17 Oct 2024 21:39:25 +0000 (23:39 +0200)]
iio: light: veml6070: use unsigned int instead of unsigned

Trivial modification to use the recommended keyword 'int' after
'unsigned' for unsigned integers.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241017-veml6070-integration-time-v1-1-3507d17d562a@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: adc: ad7192: properly check spi_get_device_match_data()
Nuno Sa [Mon, 14 Oct 2024 15:01:21 +0000 (17:01 +0200)]
iio: adc: ad7192: properly check spi_get_device_match_data()

spi_get_device_match_data() can return a NULL pointer. Hence, let's
check for it.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241014-fix-error-check-v1-1-089e1003d12f@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: pressure: bmp280: Move bmp085 interrupt to new configuration
Vasileios Amoiridis [Thu, 17 Oct 2024 23:30:22 +0000 (01:30 +0200)]
iio: pressure: bmp280: Move bmp085 interrupt to new configuration

This commit intends to add the old BMP085 sensor to the new IRQ interface
of the driver for consistence. No functional changes intended.

The BMP085 sensor is equivalent with the BMP180 with the only difference of
BMP085 having an extra interrupt pin to inform about an End of Conversion.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20241017233022.238250-5-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: pressure: bmp280: Add data ready trigger support
Vasileios Amoiridis [Thu, 17 Oct 2024 23:30:21 +0000 (01:30 +0200)]
iio: pressure: bmp280: Add data ready trigger support

The BMP3xx and BMP5xx sensors have an interrupt pin which can be used as
a trigger for when there are data ready in the sensor for pick up.

This use case is used along with NORMAL_MODE in the sensor, which allows
the sensor to do consecutive measurements depending on the ODR rate value.

The trigger pin can be configured to be open-drain or push-pull and either
rising or falling edge.

No support is added yet for interrupts for FIFO, WATERMARK and out of range
values.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20241017233022.238250-4-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices
Vasileios Amoiridis [Thu, 17 Oct 2024 23:30:20 +0000 (01:30 +0200)]
dt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices

Add interrupt options for BMP3xx and BMP5xx devices as well.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20241017233022.238250-3-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: pressure: bmp280: Use sleep and forced mode for oneshot captures
Vasileios Amoiridis [Thu, 17 Oct 2024 23:30:19 +0000 (01:30 +0200)]
iio: pressure: bmp280: Use sleep and forced mode for oneshot captures

Add forced mode support in sensors BMP28x, BME28x, BMP3xx and BMP58x.
Sensors BMP18x and BMP085 are old and do not support this feature so
their operation is not affected at all.

Essentially, up to now, the rest of the sensors were used in normal mode
all the time. This means that they are continuously doing measurements
even though these measurements are not used. Even though the sensor does
provide PM support, to cover all the possible use cases, the sensor needs
to go into sleep mode and wake up whenever necessary.

The idea is that the sensor is by default in sleep mode, wakes up in
forced mode when a oneshot capture is requested, or in normal mode
when the buffer is enabled. The difference lays in the fact that in
forced mode, the sensor does only one conversion and goes back to sleep
while in normal mode, the sensor does continuous measurements with the
frequency that was set in the ODR registers.

The bmpX_chip_config() functions which are responsible for applying
the requested configuration to the sensor, are modified accordingly
in order to set the sensor by default in sleep mode.

DEEP STANDBY, Low Power NORMAL and CONTINUOUS modes, supported only by
the BMP58x version, are not added.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20241017233022.238250-2-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: accel: adxl355: Fix typo "accelaration"
WangYuli [Thu, 17 Oct 2024 09:22:21 +0000 (17:22 +0800)]
iio: accel: adxl355: Fix typo "accelaration"

There is a spelling mistake of 'accelaration' in comments which
should be 'acceleration'.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
Link: https://patch.msgid.link/9F137828F9F185FD+20241017092221.361511-1-wangyuli@uniontech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: dac: ad8460: add SPI device match table
David Lechner [Fri, 18 Oct 2024 21:44:48 +0000 (16:44 -0500)]
iio: dac: ad8460: add SPI device match table

Add SPI device match table for ADI AD8460 DAC. As described in [1], this
is required for the module to automatically load, even when using DT.

[1]: https://lore.kernel.org/all/20210921192149.50740-1-broonie@kernel.org/

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241018-iio-dac-ad8460-add-spi-match-table-v1-1-84a5f903bf50@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: gyro: list adis16137 in Kconfig description
Yo-Jung (Leo) Lin [Sat, 19 Oct 2024 03:42:05 +0000 (11:42 +0800)]
iio: gyro: list adis16137 in Kconfig description

The adis16136 driver also supports the adis16137 model, but it is not
mentioned in the Kconfig help. Add it to the description in Kconfig.

Signed-off-by: Yo-Jung Lin (Leo) <0xff07@gmail.com>
Link: https://patch.msgid.link/20241019034213.429464-1-0xff07@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: dac: ad8460: fix DT compatible
David Lechner [Fri, 18 Oct 2024 21:24:01 +0000 (16:24 -0500)]
iio: dac: ad8460: fix DT compatible

Fix the DT compatible string in the of_device_id table to match the
binding documentation. There should not be a space after the comma.

Fixes: a976ef24c625 ("iio: dac: support the ad8460 Waveform DAC")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241018-iio-adc-ad8460-fix-dt-compatible-v1-1-058231638527@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: magnetometer: bmc150_magn: Drop most likely fake ACPI IDs
Andy Shevchenko [Fri, 18 Oct 2024 14:58:05 +0000 (17:58 +0300)]
iio: magnetometer: bmc150_magn: Drop most likely fake ACPI IDs

The commits in question do not proove that ACPI IDs exist.
Quite likely it was a cargo cult addition while doing that
for DT-based enumeration. Drop most likely fake ACPI IDs.

The to be removed IDs has been checked against the following resources:
1) DuckDuckGo
2) Google
3) MS catalog: https://www.catalog.update.microsoft.com/Search.aspx
This gives no useful results in regard to DSDT, moreover, the official
vendor IDs in the registry for Bosh are BSG and BOSC.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/20241018145805.2181682-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: gyro: bmg160: Drop most likely fake ACPI IDs
Andy Shevchenko [Fri, 18 Oct 2024 14:57:32 +0000 (17:57 +0300)]
iio: gyro: bmg160: Drop most likely fake ACPI IDs

The commits in question do not proove that ACPI IDs exist.
Quite likely it was a cargo cult addition while doing that
for DT-based enumeration. Drop most likely fake ACPI IDs.

The to be removed IDs has been checked against the following resources:
1) DuckDuckGo
2) Google
3) MS catalog: https://www.catalog.update.microsoft.com/Search.aspx
This gives no useful results in regard to DSDT, moreover, the official
vendor IDs in the registry for Bosh are BSG and BOSC.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/20241018145732.2181309-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoiio: imu: smi240: add driver
Shen Jianping [Fri, 18 Oct 2024 13:52:34 +0000 (15:52 +0200)]
iio: imu: smi240: add driver

add the iio driver for bosch imu smi240. The smi240 is a combined
three axis angular rate and three axis acceleration sensor module
with a measurement range of +/-300°/s and up to 16g. A synchronous
acc and gyro sampling can be triggered by setting the capture bit
in spi read command.

Implemented features:
* raw data access for each axis through sysfs
* tiggered buffer for continuous sampling
* synchronous acc and gyro data from tiggered buffer

Signed-off-by: Shen Jianping <Jianping.Shen@de.bosch.com>
Link: https://patch.msgid.link/20241018135234.5446-3-Jianping.Shen@de.bosch.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agodt-bindings: iio: imu: smi240: add Bosch smi240
Shen Jianping [Fri, 18 Oct 2024 13:52:33 +0000 (15:52 +0200)]
dt-bindings: iio: imu: smi240: add Bosch smi240

add devicetree binding for Bosch imu smi240.
The smi240 is a combined three axis angular rate and
three axis acceleration sensor module.

* The smi240 requires VDD and VDDIO
* Provides only spi interface.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Shen Jianping <Jianping.Shen@de.bosch.com>
Link: https://patch.msgid.link/20241018135234.5446-2-Jianping.Shen@de.bosch.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
8 months agoMerge 6.12-rc4 into char-misc-next
Greg Kroah-Hartman [Mon, 21 Oct 2024 06:42:22 +0000 (08:42 +0200)]
Merge 6.12-rc4 into char-misc-next

We need the iio fixes from 6.12-rc4 in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agoLinux 6.12-rc4
Linus Torvalds [Sun, 20 Oct 2024 22:19:38 +0000 (15:19 -0700)]
Linux 6.12-rc4

8 months agoMerge tag 'for-net-2024-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/bluet...
Linus Torvalds [Sun, 20 Oct 2024 21:08:17 +0000 (14:08 -0700)]
Merge tag 'for-net-2024-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

Pull bluetooth fixes from Luiz Augusto Von Dentz:

 - ISO: Fix multiple init when debugfs is disabled

 - Call iso_exit() on module unload

 - Remove debugfs directory on module init failure

 - btusb: Fix not being able to reconnect after suspend

 - btusb: Fix regression with fake CSR controllers 0a12:0001

 - bnep: fix wild-memory-access in proto_unregister

Note: normally the bluetooth fixes go through the networking tree, but
this missed the weekly merge, and two of the commits fix regressions
that have caused a fair amount of noise and have now hit stable too:

  https://lore.kernel.org/all/4e1977ca-6166-4891-965e-34a6f319035f@leemhuis.info/

So I'm pulling it directly just to expedite things and not miss yet
another -rc release. This is not meant to become a new pattern.

* tag 'for-net-2024-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
  Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001
  Bluetooth: bnep: fix wild-memory-access in proto_unregister
  Bluetooth: btusb: Fix not being able to reconnect after suspend
  Bluetooth: Remove debugfs directory on module init failure
  Bluetooth: Call iso_exit() on module unload
  Bluetooth: ISO: Fix multiple init when debugfs is disabled

8 months agoMerge tag 'pinctrl-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Sun, 20 Oct 2024 20:55:46 +0000 (13:55 -0700)]
Merge tag 'pinctrl-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "Mostly error path fixes, but one pretty serious interrupt problem in
  the Ocelot driver as well:

   - Fix two error paths and a missing semicolon in the Intel driver

   - Add a missing ACPI ID for the Intel Panther Lake

   - Check return value of devm_kasprintf() in the Apple and STM32
     drivers

   - Add a missing mutex_destroy() in the aw9523 driver

   - Fix a double free in cv1800_pctrl_dt_node_to_map() in the Sophgo
     driver

   - Fix a double free in ma35_pinctrl_dt_node_to_map_func() in the
     Nuvoton driver

   - Fix a bug in the Ocelot interrupt handler making the system hang"

* tag 'pinctrl-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: ocelot: fix system hang on level based interrupts
  pinctrl: nuvoton: fix a double free in ma35_pinctrl_dt_node_to_map_func()
  pinctrl: sophgo: fix double free in cv1800_pctrl_dt_node_to_map()
  pinctrl: intel: platform: Add Panther Lake to the list of supported
  pinctrl: aw9523: add missing mutex_destroy
  pinctrl: stm32: check devm_kasprintf() returned value
  pinctrl: apple: check devm_kasprintf() returned value
  pinctrl: intel: platform: use semicolon instead of comma in ncommunities assignment
  pinctrl: intel: platform: fix error path in device_for_each_child_node()

8 months agoMerge tag 'char-misc-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sun, 20 Oct 2024 20:10:44 +0000 (13:10 -0700)]
Merge tag 'char-misc-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull misc driver fixes from Greg KH:
 "Here are a number of small char/misc/iio driver fixes for 6.12-rc4:

   - loads of small iio driver fixes for reported problems

   - parport driver out-of-bounds fix

   - Kconfig description and MAINTAINERS file updates

  All of these, except for the Kconfig and MAINTAINERS file updates have
  been in linux-next all week. Those other two are just documentation
  changes and will have no runtime issues and were merged on Friday"

* tag 'char-misc-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (39 commits)
  misc: rtsx: list supported models in Kconfig help
  MAINTAINERS: Remove some entries due to various compliance requirements.
  misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for OTP device
  misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for EEPROM device
  parport: Proper fix for array out-of-bounds access
  iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig
  iio: frequency: {admv4420,adrf6780}: format Kconfig entries
  iio: adc: ad4695: Add missing Kconfig select
  iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
  iioc: dac: ltc2664: Fix span variable usage in ltc2664_channel_config()
  iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig
  iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig
  iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig
  iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig
  iio: frequency: adf4377: add missing select REMAP_SPI in Kconfig
  iio: resolver: ad2s1210: add missing select (TRIGGERED_)BUFFER in Kconfig
  iio: resolver: ad2s1210 add missing select REGMAP in Kconfig
  iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: pressure: bm1390: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  ...

8 months agoMerge tag 'tty-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 20 Oct 2024 20:03:30 +0000 (13:03 -0700)]
Merge tag 'tty-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.12-rc4:

   - qcom-geni serial driver fixes, wow what a mess of a UART chip that
     thing is...

   - vt infoleak fix for odd font sizes

   - imx serial driver bugfix

   - yet-another n_gsm ldisc bugfix, slowly chipping down the issues in
     that piece of code

  All of these have been in linux-next for over a week with no reported
  issues"

* tag 'tty-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: qcom-geni: rename suspend functions
  serial: qcom-geni: drop unused receive parameter
  serial: qcom-geni: drop flip buffer WARN()
  serial: qcom-geni: fix rx cancel dma status bit
  serial: qcom-geni: fix receiver enable
  serial: qcom-geni: fix dma rx cancellation
  serial: qcom-geni: fix shutdown race
  serial: qcom-geni: revert broken hibernation support
  serial: qcom-geni: fix polled console initialisation
  serial: imx: Update mctrl old_status on RTSD interrupt
  tty: n_gsm: Fix use-after-free in gsm_cleanup_mux
  vt: prevent kernel-infoleak in con_font_get()

8 months agoMerge tag 'usb-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 20 Oct 2024 19:57:53 +0000 (12:57 -0700)]
Merge tag 'usb-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB driver fixes from Greg KH:
 "Here are some small USB driver fixes and new device ids for 6.12-rc4:

   - xhci driver fixes for a number of reported issues

   - new usb-serial driver ids

   - dwc3 driver fixes for reported problems.

   - usb gadget driver fixes for reported problems

   - typec driver fixes

   - MAINTAINER file updates

  All of these have been in linux-next this week with no reported issues"

* tag 'usb-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: option: add Telit FN920C04 MBIM compositions
  USB: serial: option: add support for Quectel EG916Q-GL
  xhci: dbc: honor usb transfer size boundaries.
  usb: xhci: Fix handling errors mid TD followed by other errors
  xhci: Mitigate failed set dequeue pointer commands
  xhci: Fix incorrect stream context type macro
  USB: gadget: dummy-hcd: Fix "task hung" problem
  usb: gadget: f_uac2: fix return value for UAC2_ATTRIBUTE_STRING store
  usb: dwc3: core: Fix system suspend on TI AM62 platforms
  xhci: tegra: fix checked USB2 port number
  usb: dwc3: Wait for EndXfer completion before restoring GUSB2PHYCFG
  usb: typec: qcom-pmic-typec: fix sink status being overwritten with RP_DEF
  usb: typec: altmode should keep reference to parent
  MAINTAINERS: usb: raw-gadget: add bug tracker link
  MAINTAINERS: Add an entry for the LJCA drivers

8 months agoMerge tag 'x86_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 20 Oct 2024 19:04:32 +0000 (12:04 -0700)]
Merge tag 'x86_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

 - Explicitly disable the TSC deadline timer when going idle to address
   some CPU errata in that area

 - Do not apply the Zenbleed fix on anything else except AMD Zen2 on the
   late microcode loading path

 - Clear CPU buffers later in the NMI exit path on 32-bit to avoid
   register clearing while they still contain sensitive data, for the
   RDFS mitigation

 - Do not clobber EFLAGS.ZF with VERW on the opportunistic SYSRET exit
   path on 32-bit

 - Fix parsing issues of memory bandwidth specification in sysfs for
   resctrl's memory bandwidth allocation feature

 - Other small cleanups and improvements

* tag 'x86_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic: Always explicitly disarm TSC-deadline timer
  x86/CPU/AMD: Only apply Zenbleed fix for Zen2 during late microcode load
  x86/bugs: Use code segment selector for VERW operand
  x86/entry_32: Clear CPU buffers after register restore in NMI return
  x86/entry_32: Do not clobber user EFLAGS.ZF
  x86/resctrl: Annotate get_mem_config() functions as __init
  x86/resctrl: Avoid overflow in MB settings in bw_validate()
  x86/amd_nb: Add new PCI ID for AMD family 1Ah model 20h

8 months agoMerge tag 'irq_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 20 Oct 2024 18:44:07 +0000 (11:44 -0700)]
Merge tag 'irq_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

 - Fix a case for sifive-plic where an interrupt gets disabled *and*
   masked and remains masked when it gets reenabled later

 - Plug a small race in GIC-v4 where userspace can force an affinity
   change of a virtual CPU (vPE) in its unmapping path

 - Do not mix the two sets of ocelot irqchip's registers in the mask
   calculation of the main interrupt sticky register

- Other smaller fixlets and cleanups

* tag 'irq_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/renesas-rzg2l: Fix missing put_device
  irqchip/riscv-intc: Fix SMP=n boot with ACPI
  irqchip/sifive-plic: Unmask interrupt in plic_irq_enable()
  irqchip/gic-v4: Don't allow a VMOVP on a dying VPE
  irqchip/sifive-plic: Return error code on failure
  irqchip/riscv-imsic: Fix output text of base address
  irqchip/ocelot: Comment sticky register clearing code
  irqchip/ocelot: Fix trigger register address
  irqchip: Remove obsolete config ARM_GIC_V3_ITS_PCI

8 months agoMerge tag 'sched_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 20 Oct 2024 18:30:56 +0000 (11:30 -0700)]
Merge tag 'sched_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduling fixes from Borislav Petkov:

 - Add PREEMPT_RT maintainers

 - Fix another aspect of delayed dequeued tasks wrt determining their
   state, i.e., whether they're runnable or blocked

 - Handle delayed dequeued tasks and their migration wrt PSI properly

 - Fix the situation where a delayed dequeue task gets enqueued into a
   new class, which should not happen

 - Fix a case where memory allocation would happen while the runqueue
   lock is held, which is a no-no

 - Do not over-schedule when tasks with shorter slices preempt the
   currently running task

 - Make sure delayed to deque entities are properly handled before
   unthrottling

 - Other smaller cleanups and improvements

* tag 'sched_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  MAINTAINERS: Add an entry for PREEMPT_RT.
  sched/fair: Fix external p->on_rq users
  sched/psi: Fix mistaken CPU pressure indication after corrupted task state bug
  sched/core: Dequeue PSI signals for blocked tasks that are delayed
  sched: Fix delayed_dequeue vs switched_from_fair()
  sched/core: Disable page allocation in task_tick_mm_cid()
  sched/deadline: Use hrtick_enabled_dl() before start_hrtick_dl()
  sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running
  sched: Fix sched_delayed vs cfs_bandwidth

8 months agoMerge tag 'for-linus-6.12a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 20 Oct 2024 18:25:58 +0000 (11:25 -0700)]
Merge tag 'for-linus-6.12a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fix from Juergen Gross:
 "A single fix for a build failure introduced this merge window"

* tag 'for-linus-6.12a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen: Remove dependency between pciback and privcmd

8 months agoMerge tag 'dma-mapping-6.12-2024-10-20' of git://git.infradead.org/users/hch/dma...
Linus Torvalds [Sun, 20 Oct 2024 17:56:42 +0000 (10:56 -0700)]
Merge tag 'dma-mapping-6.12-2024-10-20' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fix from Christoph Hellwig:
 "Just another small tracing fix from Sean"

* tag 'dma-mapping-6.12-2024-10-20' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: fix tracing dma_alloc/free with vmalloc'd memory

8 months agoMerge tag 'io_uring-6.12-20241019' of git://git.kernel.dk/linux
Linus Torvalds [Sun, 20 Oct 2024 00:04:52 +0000 (17:04 -0700)]
Merge tag 'io_uring-6.12-20241019' of git://git.kernel.dk/linux

Pull one more io_uring fix from Jens Axboe:
 "Fix for a regression introduced in 6.12-rc2, where a condition check
  was negated and hence -EAGAIN would bubble back up up to userspace
  rather than trigger a retry condition"

* tag 'io_uring-6.12-20241019' of git://git.kernel.dk/linux:
  io_uring/rw: fix wrong NOWAIT check in io_rw_init_file()

8 months agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 19 Oct 2024 19:52:19 +0000 (12:52 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Fixes all in drivers. The largest is the mpi3mr which corrects a phy
  count limit that should only apply to the controller but was being
  incorrectly applied to expander phys"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: target: core: Fix null-ptr-deref in target_alloc_device()
  scsi: mpi3mr: Validate SAS port assignments
  scsi: ufs: core: Set SDEV_OFFLINE when UFS is shut down
  scsi: ufs: core: Requeue aborted request
  scsi: ufs: core: Fix the issue of ICU failure

8 months agoMerge tag 'ftrace-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sat, 19 Oct 2024 19:42:14 +0000 (12:42 -0700)]
Merge tag 'ftrace-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull ftrace fixes from Steven Rostedt:
 "A couple of fixes to function graph infrastructure:

   - Fix allocation of idle shadow stack allocation during hotplug

     If function graph tracing is started when a CPU is offline, if it
     were come online during the trace then the idle task that
     represents the CPU will not get a shadow stack allocated for it.
     This means all function graph hooks that happen while that idle
     task is running (including in interrupt mode) will have all its
     events dropped.

     Switch over to the CPU hotplug mechanism that will have any newly
     brought on line CPU get a callback that can allocate the shadow
     stack for its idle task.

   - Fix allocation size of the ret_stack_list array

     When function graph tracing converted over to allowing more than
     one user at a time, it had to convert its shadow stack from an
     array of ret_stack structures to an array of unsigned longs. The
     shadow stacks are allocated in batches of 32 at a time and assigned
     to every running task. The batch is held by the ret_stack_list
     array.

     But when the conversion happened, instead of allocating an array of
     32 pointers, it was allocated as a ret_stack itself (PAGE_SIZE).
     This ret_stack_list gets passed to a function that iterates over
     what it believes is its size defined by the
     FTRACE_RETSTACK_ALLOC_SIZE macro (which is 32).

     Luckily (PAGE_SIZE) is greater than 32 * sizeof(long), otherwise
     this would have been an array overflow. This still should be fixed
     and the ret_stack_list should be allocated to the size it is
     expected to be as someday it may end up being bigger than
     SHADOW_STACK_SIZE"

* tag 'ftrace-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  fgraph: Allocate ret_stack_list with proper size
  fgraph: Use CPU hotplug mechanism to initialize idle shadow stacks

8 months agoMerge tag 'ipe-pr-20241018' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe
Linus Torvalds [Sat, 19 Oct 2024 18:48:14 +0000 (11:48 -0700)]
Merge tag 'ipe-pr-20241018' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe

Pull ipe fixes from Fan Wu:
 "This addresses several issues identified by Luca when attempting to
  enable IPE on Debian and systemd:

   - address issues with IPE policy update errors and policy update
     version check, improving the clarity of error messages for better
     understanding by userspace programs.

   - enable IPE policies to be signed by secondary and platform
     keyrings, facilitating broader use across general Linux
     distributions like Debian.

   - updates the IPE entry in the MAINTAINERS file to reflect the new
     tree URL and my updated email from kernel.org"

* tag 'ipe-pr-20241018' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe:
  MAINTAINERS: update IPE tree url and Fan Wu's email
  ipe: fallback to platform keyring also if key in trusted keyring is rejected
  ipe: allow secondary and platform keyrings to install/update policies
  ipe: also reject policy updates with the same version
  ipe: return -ESTALE instead of -EINVAL on update when new policy has a lower version

8 months agoMerge tag 'input-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 19 Oct 2024 17:18:03 +0000 (10:18 -0700)]
Merge tag 'input-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a fix for Zinitix driver to not fail probing if the property enabling
   touch keys functionality is not defined. Support for touch keys was
   added in 6.12 merge window so this issue does not affect users of
   released kernels

 - a couple new vendor/device IDs in xpad driver to enable support for
   more hardware

* tag 'input-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: zinitix - don't fail if linux,keycodes prop is absent
  Input: xpad - add support for MSI Claw A1M
  Input: xpad - add support for 8BitDo Ultimate 2C Wireless Controller

8 months agoMerge tag '9p-for-6.12-rc4' of https://github.com/martinetd/linux
Linus Torvalds [Sat, 19 Oct 2024 15:44:10 +0000 (08:44 -0700)]
Merge tag '9p-for-6.12-rc4' of https://github.com/martinetd/linux

Pull 9p fixes from Dominique Martinet:
 "Mashed-up update that I sat on too long:

   - fix for multiple slabs created with the same name

   - enable multipage folios

   - theorical fix to also look for opened fids by inode if none was
     found by dentry"

[ Enabling multi-page folios should have been done during the merge
  window, but it's a one-liner, and the actual meat of the enablement
  is in netfs and already in use for other filesystems...  - Linus ]

* tag '9p-for-6.12-rc4' of https://github.com/martinetd/linux:
  9p: Avoid creating multiple slab caches with the same name
  9p: Enable multipage folios
  9p: v9fs_fid_find: also lookup by inode if not found dentry

8 months agoMerge tag 'rust-fixes-6.12-2' of https://github.com/Rust-for-Linux/linux
Linus Torvalds [Sat, 19 Oct 2024 15:32:47 +0000 (08:32 -0700)]
Merge tag 'rust-fixes-6.12-2' of https://github.com/Rust-for-Linux/linux

Pull rust fixes from Miguel Ojeda:
 "Toolchain and infrastructure:

   - Fix several issues with the 'rustc-option' macro. It includes a
     refactor from Masahiro of three '{cc,rust}-*' macros, which is not
     a fix but avoids repeating the same commands (which would be
     several lines in the case of 'rustc-option').

   - Fix conditions for 'CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS'. It
     includes the addition of 'CONFIG_RUSTC_LLVM_VERSION', which is not
     a fix but is needed for the actual fix.

  And a trivial grammar fix"

* tag 'rust-fixes-6.12-2' of https://github.com/Rust-for-Linux/linux:
  cfi: fix conditions for HAVE_CFI_ICALL_NORMALIZE_INTEGERS
  kbuild: rust: add `CONFIG_RUSTC_LLVM_VERSION`
  kbuild: fix issues with rustc-option
  kbuild: refactor cc-option-yn, cc-disable-warning, rust-option-yn macros
  lib/Kconfig.debug: fix grammar in RUST_BUILD_ASSERT_ALLOW

8 months agoio_uring/rw: fix wrong NOWAIT check in io_rw_init_file()
Jens Axboe [Sat, 19 Oct 2024 15:16:51 +0000 (09:16 -0600)]
io_uring/rw: fix wrong NOWAIT check in io_rw_init_file()

A previous commit improved how !FMODE_NOWAIT is dealt with, but
inadvertently negated a check whilst doing so. This caused -EAGAIN to be
returned from reading files with O_NONBLOCK set. Fix up the check for
REQ_F_SUPPORT_NOWAIT.

Reported-by: Julian Orth <ju.orth@gmail.com>
Link: https://github.com/axboe/liburing/issues/1270
Fixes: f7c913438533 ("io_uring/rw: allow pollable non-blocking attempts for !FMODE_NOWAIT")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
8 months agoMerge tag 'iio-for-6.13a-take2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Sat, 19 Oct 2024 07:33:36 +0000 (09:33 +0200)]
Merge tag 'iio-for-6.13a-take2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: 1st set of new device support, features and cleanup for 6.13

Changes in take2:
- Additional patch to drop the accidentally added empty file.
- Tidy up of a duplicate include.

Two merges of other trees.

6.12-rc2:
To pull in the move of unaligned.h from include/asm to include/linux
This was to resolve issues in linux-next.

pwm/duty_offset-for6.13-rc1@
PWM infrastructure that is use di the AD7625 ADC driver.

New device support
==================

adi,ad7173
- Add support for the AD4113 8 channel ADC.
adi,ad7606
- Add support for the AD7606C-16 and AD7606C-18 which have higher precision
  and support bipolar and differential channels. A lot of driver
  rework was needed to add the additional flexibility needed to support
  these parts.
adi,ad7625
- New driver supporting AD7625, AD7626, AD7960 and AD7961 LVDS connected
  ADCs. Interface uses a combination of a PWM control and an IIO backend
  (currently a custom FPGA IP).
adi,ad8460
- New driver for the ad8460 Waveform DAC. This high speed device is
  driven by a custom IP via a DMAEngine buffer.
bosch,bmi270
- New driver for this 6-axis IMU. A later patch adds SPI support.
gehc,pmc-adc
- New driver for this GE Healthcare ADC 16-channel 16 bit ADC.
invensense,mpu6050
- Add support for IAM-20680HT and IAM-20680HP variants of the IAM-20680
  IMU that have better specifications in various ways including larger
  FIFO sizes.
vishay,vl6030
- Support the veml7700, a stripped down veml6030 ambient light sensor.
- Support the veml6035 ambient light sensor.

Features
========

liteon,ltr390
- Allow configuration of sampling frequency
- Support suspend and resume
- Add interrupt support including threshold events + control over
  event reporting persistence.
st,vl53l0x
- Add support for continuous mode via IIO buffer support and a dataready
  trigger.
ti,tmp0006
- Add triggered buffer support using data ready interrupt.
vishay,vl6030
- Add regulator control support.
vishay,vl6070
- Add regulator control support.
vishay,vl6180
- Allow configuration of waiting between continuous samples.
- Use the interrupt, if available, for single shot captures
- Support continuous mode via the IIO triggered buffer interfaces.

Cleanups and minor fixes
========================

tools/event monitor
- Free dev_dir_name.
treewide
- Introduce aligned_s64 type for timestamps to replace
  s64 __aligned(8). Initial use in a few drivers - many others to follow.
- Use dev_get_platform_data() instead of open-coding the access.
- InvenSense email address and maintainer updates to reflect
  move to the tdk domain after acquisition.
- Switch platform drivers from remove_new() back to remove() now all
  rework this was enabling is done.
- More use of device_for_each_child_node_scoped() to remove need for manual
  caling of fwnode_handle_put() in early exits from the loop.
- Use IIO_MAP() macro to replace some open-coded versions.
- Constify struct iio_map arrays.
- Use irq_get_trigger_type(irq) rather than
  irqd_get_trigger_type(irq_get_irq_data(irq);
core
- unsigned to unsigned int.
adi,ad3552r
- Fix to low a limit on max SPI clock speed. No rush to upstream this
  one as the binding that uses the higher speed will merge via this
  tree once ready.
adi,ad5770r
- Use get_unaligned_le16() instead of open-coding. Note this caused
  a merge issue in linux-next as unaligned.h has moved.
adi,ad7606
- Use read_avail() callback to handle the various _available attributes.
- Wrap up all data related to channel scaling into a single structure as
  the use of this gets more complex for the -16 and -18 parts.
adi,adf4371
- Use chip_info structures and spi_get_device_match_data()
- Drop spi_set_drvdata() as unused.
- Reduce scope of struct clock as only touched in probe().
- Use dev_err_probe() where appropriate.
adi,axi-dac
- Improve register naming to make field and register association clearer.
- Fix a wrong register bit.
amlogic,meson8-saradc
- Allow the meson8-saradc to have the amlogic,hhi-sysctrl property.
bosch,bmp280
- Use u8 for the DMA buffer to avoid implication of other types given it
  can contain be24 data.
- Use unsigned types to store raw values to make it clear they cannot be
  negative.
- Drop unnecessary check for errors after IIR filter update.
- Support soft reset to get device to know state on driver load.
- Use bulk reads to retrieve the humidity calibration data.
dynaimage,al3010
- Make sure to powerdown device in error paths.
invensense,icm42600
- Add missing i2c_device-id tables.
kionix,kmx61
- Drop ACPI IDs that are not associated with valid ACPI vendor IDs
  and for which there is no evidence they are in use in real devices.
liteon,ltrf261a
- Document a bad compatible that we are supporting because it is in
  the wild in the Valve Steam Deck via ACPI PRP0001.
maxim,max1363
- Use get_unaligned_be16() instead of open-coding. Note this caused
  a merge issue in linux-next as unaligned.h has moved.
mediatek,mt6360
- Use get_unaligned_be16() instead of open-coding. Note this caused
  a merge issue in linux-next as unaligned.h has moved.
microchip,pac1921
- Drop various unnecessary type casts that were suggested by
  Wconversion compiler warnings which we do not use in IIO.
  Remove them because they hurt readability in cases where it is clear
  not overflow can occur.
rohm,rpr0521
- Use iio_poll_func_store_time() rather than open-coding a similar solution.
semtech,sx9324
- Make sx_common_get_raw_register() local to the only code that uses it.
- Drop unnecessary acpi.h include.
st,vl53l0x
- Check the part ID register and print an info message if it is not what
  is expected.
vishay,veml6030
- Fix DT binding file name to include vishay
- Use regmap_set_bits() for case where all bits are set.
- Use dev_err_probe() where appropriate.
- Add missing delay after powering up in resume path.
- Drop a processed accessor for the white channel as there is no public
  information to allow a specific scale to be established.
- Use read_avail() to replace explicit custom _available attributes.
vishay,veml6070
- Use guard() to allow early returns.
- Add a devm callback to unregister the i2c device.
- Use devm_iio_device_register() to simplify removal code.

Various other minor improvements not called out explicitly.

* tag 'iio-for-6.13a-take2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (161 commits)
  iio: imu: bmi270: Remove duplicated include in bmi270_i2c.c
  iio: adc: ad7606: Drop spurious empty file.
  iio: light: rpr0521: Use generic iio_pollfunc_store_time()
  iio: light: vl6180: Add support for Continuous Mode
  iio: light: vl6180: Added Interrupt support for single shot access
  iio: light: vl6180: Add configurable inter-measurement period support
  MAINTAINERS: add entry for VEML6030 ambient light sensor driver
  iio: light: veml6030: add support for veml7700
  dt-bindings: iio: light: veml6030: add veml7700
  iio: light: veml6035: fix read_avail in no_irq case for veml6035
  iio: dac: adi-axi-dac: update register names
  iio: dac: adi-axi-dac: fix wrong register bitfield
  docs: iio: new docs for ad7625 driver
  iio: adc: ad7625: add driver
  dt-bindings: iio: adc: add AD762x/AD796x ADCs
  iio: Convert unsigned to unsigned int
  iio: pressure: bmp280: Fix uninitialized variable
  iio: Switch back to struct platform_driver::remove()
  iio: imu: bmi323: remove redundant register definition
  iio: frequency: adf4371: make use of dev_err_probe()
  ...

8 months agofgraph: Allocate ret_stack_list with proper size
Steven Rostedt [Sat, 19 Oct 2024 01:52:12 +0000 (21:52 -0400)]
fgraph: Allocate ret_stack_list with proper size

The ret_stack_list is an array of ret_stack shadow stacks for the function
graph usage. When the first function graph is enabled, all tasks in the
system get a shadow stack. The ret_stack_list is a 32 element array of
pointers to these shadow stacks. It allocates the shadow stack in batches
(32 stacks at a time), assigns them to running tasks, and continues until
all tasks are covered.

When the function graph shadow stack changed from an array of
ftrace_ret_stack structures to an array of longs, the allocation of
ret_stack_list went from allocating an array of 32 elements to just a
block defined by SHADOW_STACK_SIZE. Luckily, that's defined as PAGE_SIZE
and is much more than enough to hold 32 pointers. But it is way overkill
for the amount needed to allocate.

Change the allocation of ret_stack_list back to a kcalloc() of
FTRACE_RETSTACK_ALLOC_SIZE pointers.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20241018215212.23f13f40@rorschach
Fixes: 42675b723b484 ("function_graph: Convert ret_stack to a series of longs")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
8 months agofgraph: Use CPU hotplug mechanism to initialize idle shadow stacks
Steven Rostedt [Sat, 19 Oct 2024 01:43:00 +0000 (21:43 -0400)]
fgraph: Use CPU hotplug mechanism to initialize idle shadow stacks

The function graph infrastructure allocates a shadow stack for every task
when enabled. This includes the idle tasks. The first time the function
graph is invoked, the shadow stacks are created and never freed until the
task exits. This includes the idle tasks.

Only the idle tasks that were for online CPUs had their shadow stacks
created when function graph tracing started. If function graph tracing is
enabled and a CPU comes online, the idle task representing that CPU will
not have its shadow stack created, and all function graph tracing for that
idle task will be silently dropped.

Instead, use the CPU hotplug mechanism to allocate the idle shadow stacks.
This will include idle tasks for CPUs that come online during tracing.

This issue can be reproduced by:

 # cd /sys/kernel/tracing
 # echo 0 > /sys/devices/system/cpu/cpu1/online
 # echo 0 > set_ftrace_pid
 # echo function_graph > current_tracer
 # echo 1 > options/funcgraph-proc
 # echo 1 > /sys/devices/system/cpu/cpu1
 # grep '<idle>' per_cpu/cpu1/trace | head

Before, nothing would show up.

After:
 1)    <idle>-0    |   0.811 us    |                        __enqueue_entity();
 1)    <idle>-0    |   5.626 us    |                      } /* enqueue_entity */
 1)    <idle>-0    |               |                      dl_server_update_idle_time() {
 1)    <idle>-0    |               |                        dl_scaled_delta_exec() {
 1)    <idle>-0    |   0.450 us    |                          arch_scale_cpu_capacity();
 1)    <idle>-0    |   1.242 us    |                        }
 1)    <idle>-0    |   1.908 us    |                      }
 1)    <idle>-0    |               |                      dl_server_start() {
 1)    <idle>-0    |               |                        enqueue_dl_entity() {
 1)    <idle>-0    |               |                          task_contending() {

Note, if tracing stops and restarts, the old way would then initialize
the onlined CPUs.

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/20241018214300.6df82178@rorschach
Fixes: 868baf07b1a25 ("ftrace: Fix memory leak with function graph and cpu hotplug")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
8 months agoMerge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Linus Torvalds [Fri, 18 Oct 2024 23:27:14 +0000 (16:27 -0700)]
Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Pull bpf fixes from Daniel Borkmann:

 - Fix BPF verifier to not affect subreg_def marks in its range
   propagation (Eduard Zingerman)

 - Fix a truncation bug in the BPF verifier's handling of
   coerce_reg_to_size_sx (Dimitar Kanaliev)

 - Fix the BPF verifier's delta propagation between linked registers
   under 32-bit addition (Daniel Borkmann)

 - Fix a NULL pointer dereference in BPF devmap due to missing rxq
   information (Florian Kauer)

 - Fix a memory leak in bpf_core_apply (Jiri Olsa)

 - Fix an UBSAN-reported array-index-out-of-bounds in BTF parsing for
   arrays of nested structs (Hou Tao)

 - Fix build ID fetching where memory areas backing the file were
   created with memfd_secret (Andrii Nakryiko)

 - Fix BPF task iterator tid filtering which was incorrectly using pid
   instead of tid (Jordan Rome)

 - Several fixes for BPF sockmap and BPF sockhash redirection in
   combination with vsocks (Michal Luczaj)

 - Fix riscv BPF JIT and make BPF_CMPXCHG fully ordered (Andrea Parri)

 - Fix riscv BPF JIT under CONFIG_CFI_CLANG to prevent the possibility
   of an infinite BPF tailcall (Pu Lehui)

 - Fix a build warning from resolve_btfids that bpf_lsm_key_free cannot
   be resolved (Thomas Weißschuh)

 - Fix a bug in kfunc BTF caching for modules where the wrong BTF object
   was returned (Toke Høiland-Jørgensen)

 - Fix a BPF selftest compilation error in cgroup-related tests with
   musl libc (Tony Ambardar)

 - Several fixes to BPF link info dumps to fill missing fields (Tyrone
   Wu)

 - Add BPF selftests for kfuncs from multiple modules, checking that the
   correct kfuncs are called (Simon Sundberg)

 - Ensure that internal and user-facing bpf_redirect flags don't overlap
   (Toke Høiland-Jørgensen)

 - Switch to use kvzmalloc to allocate BPF verifier environment (Rik van
   Riel)

 - Use raw_spinlock_t in BPF ringbuf to fix a sleep in atomic splat
   under RT (Wander Lairson Costa)

* tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: (38 commits)
  lib/buildid: Handle memfd_secret() files in build_id_parse()
  selftests/bpf: Add test case for delta propagation
  bpf: Fix print_reg_state's constant scalar dump
  bpf: Fix incorrect delta propagation between linked registers
  bpf: Properly test iter/task tid filtering
  bpf: Fix iter/task tid filtering
  riscv, bpf: Make BPF_CMPXCHG fully ordered
  bpf, vsock: Drop static vsock_bpf_prot initialization
  vsock: Update msg_count on read_skb()
  vsock: Update rx_bytes on read_skb()
  bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock
  selftests/bpf: Add asserts for netfilter link info
  bpf: Fix link info netfilter flags to populate defrag flag
  selftests/bpf: Add test for sign extension in coerce_subreg_to_size_sx()
  selftests/bpf: Add test for truncation after sign extension in coerce_reg_to_size_sx()
  bpf: Fix truncation bug in coerce_reg_to_size_sx()
  selftests/bpf: Assert link info uprobe_multi count & path_size if unset
  bpf: Fix unpopulated path_size when uprobe_multi fields unset
  selftests/bpf: Fix cross-compiling urandom_read
  selftests/bpf: Add test for kfunc module order
  ...

8 months agoMerge tag 'linux_kselftest-fixes-6.12-rc4' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Fri, 18 Oct 2024 23:11:17 +0000 (16:11 -0700)]
Merge tag 'linux_kselftest-fixes-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fix from Shuah Khan:

 - fix test makefile to install tests directory without which the test
   fails with errors

* tag 'linux_kselftest-fixes-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftest: hid: add the missing tests directory

8 months agoInput: zinitix - don't fail if linux,keycodes prop is absent
Nikita Travkin [Fri, 4 Oct 2024 16:17:30 +0000 (21:17 +0500)]
Input: zinitix - don't fail if linux,keycodes prop is absent

When initially adding the touchkey support, a mistake was made in the
property parsing code. The possible negative errno from
device_property_count_u32() was never checked, which was an oversight
left from converting to it from the of_property as part of the review
fixes.

Re-add the correct handling of the absent property, in which case zero
touchkeys should be assumed, which would disable the feature.

Reported-by: Jakob Hauser <jahau@rocketmail.com>
Tested-by: Jakob Hauser <jahau@rocketmail.com>
Fixes: 075d9b22c8fe ("Input: zinitix - add touchkey support")
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Tested-by: Yassine Oudjana <y.oudjana@protonmail.com>
Link: https://lore.kernel.org/r/20241004-zinitix-no-keycodes-v2-1-876dc9fea4b6@trvn.ru
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoMerge tag 'block-6.12-20241018' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 18 Oct 2024 22:53:00 +0000 (15:53 -0700)]
Merge tag 'block-6.12-20241018' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Keith:
     - Fix target passthrough identifier (Nilay)
     - Fix tcp locking (Hannes)
     - Replace list with sbitmap for tracking RDMA rsp tags (Guixen)
     - Remove unnecessary fallthrough statements (Tokunori)
     - Remove ready-without-media support (Greg)
     - Fix multipath partition scan deadlock (Keith)
     - Fix concurrent PCI reset and remove queue mapping (Maurizio)
     - Fabrics shutdown fixes (Nilay)

 - Fix for a kerneldoc warning (Keith)

 - Fix a race with blk-rq-qos and wakeups (Omar)

 - Cleanup of checking for always-set tag_set (SurajSonawane2415)

 - Fix for a crash with CPU hotplug notifiers (Ming)

 - Don't allow zero-copy ublk on unprivileged device (Ming)

 - Use array_index_nospec() for CDROM (Josh)

 - Remove dead code in drbd (David)

 - Tweaks to elevator loading (Breno)

* tag 'block-6.12-20241018' of git://git.kernel.dk/linux:
  cdrom: Avoid barrier_nospec() in cdrom_ioctl_media_changed()
  nvme: use helper nvme_ctrl_state in nvme_keep_alive_finish function
  nvme: make keep-alive synchronous operation
  nvme-loop: flush off pending I/O while shutting down loop controller
  nvme-pci: fix race condition between reset and nvme_dev_disable()
  ublk: don't allow user copy for unprivileged device
  blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race
  nvme-multipath: defer partition scanning
  blk-mq: setup queue ->tag_set before initializing hctx
  elevator: Remove argument from elevator_find_get
  elevator: do not request_module if elevator exists
  drbd: Remove unused conn_lowest_minor
  nvme: disable CC.CRIME (NVME_CC_CRIME)
  nvme: delete unnecessary fallthru comment
  nvmet-rdma: use sbitmap to replace rsp free list
  block: Fix elevator_get_default() checking for NULL q->tag_set
  nvme: tcp: avoid race between queue_lock lock and destroy
  nvmet-passthru: clear EUID/NGUID/UUID while using loop target
  block: fix blk_rq_map_integrity_sg kernel-doc

8 months agoMerge tag 'io_uring-6.12-20241018' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 18 Oct 2024 22:38:37 +0000 (15:38 -0700)]
Merge tag 'io_uring-6.12-20241018' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a regression this merge window where cloning of registered
   buffers didn't take into account the dummy_ubuf

 - Fix a race with reading how many SQRING entries are available,
   causing userspace to need to loop around io_uring_sqring_wait()
   rather than being able to rely on SQEs being available when it
   returned

 - Ensure that the SQPOLL thread is TASK_RUNNING before running
   task_work off the cancelation exit path

* tag 'io_uring-6.12-20241018' of git://git.kernel.dk/linux:
  io_uring/sqpoll: ensure task state is TASK_RUNNING when running task_work
  io_uring/rsrc: ignore dummy_ubuf for buffer cloning
  io_uring/sqpoll: close race on waiting for sqring entries

8 months agoInput: xpad - add support for MSI Claw A1M
John Edwards [Thu, 10 Oct 2024 23:09:23 +0000 (23:09 +0000)]
Input: xpad - add support for MSI Claw A1M

Add MSI Claw A1M controller to xpad_device match table when in xinput mode.
Add MSI VID as XPAD_XBOX360_VENDOR.

Signed-off-by: John Edwards <uejji@uejji.net>
Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Reviewed-by: Christopher Snowhill <kode54@gmail.com>
Link: https://lore.kernel.org/r/20241010232020.3292284-4-uejji@uejji.net
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoMAINTAINERS: update IPE tree url and Fan Wu's email
Fan Wu [Wed, 16 Oct 2024 23:43:05 +0000 (16:43 -0700)]
MAINTAINERS: update IPE tree url and Fan Wu's email

Update Integrity Policy Enforcement (IPE) LSM tree url and
maintainer's email to the newly issued kernel.org tree/email.

Signed-off-by: Fan Wu <wufan@kernel.org>
8 months agoipe: fallback to platform keyring also if key in trusted keyring is rejected
Luca Boccassi [Fri, 27 Sep 2024 08:23:44 +0000 (10:23 +0200)]
ipe: fallback to platform keyring also if key in trusted keyring is rejected

If enabled, we fallback to the platform keyring if the trusted keyring
doesn't have the key used to sign the ipe policy. But if pkcs7_verify()
rejects the key for other reasons, such as usage restrictions, we do not
fallback. Do so, following the same change in dm-verity.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Suggested-by: Serge Hallyn <serge@hallyn.com>
[FW: fixed some line length issues and a typo in the commit message]
Signed-off-by: Fan Wu <wufan@kernel.org>
8 months agoMerge tag 'v6.12-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 18 Oct 2024 18:37:12 +0000 (11:37 -0700)]
Merge tag 'v6.12-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Fix possible double free setting xattrs

 - Fix slab out of bounds with large ioctl payload

 - Remove three unused functions, and an unused variable that could be
   confusing

* tag 'v6.12-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Remove unused functions
  smb/client: Fix logically dead code
  smb: client: fix OOBs when building SMB2_IOCTL request
  smb: client: fix possible double free in smb2_set_ea()