]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 months agoMerge tag 'iio-for-6.12b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 8 Sep 2024 11:23:57 +0000 (13:23 +0200)]
Merge tag 'iio-for-6.12b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: 2nd set of new device support features and cleanup for 6.12

Late pull request as I was planing to include another series that
is waiting for a fix to end up in char-misc-next.  That can wait
for next cycle.

Includes one immutable branch merge from MFD to get a necessary header
change.

Usual mix of a few new drivers, additional device support for existing
drivers, new features and a bunch of cleanup across tree.

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

asahi-kasei,ak8975
- A few minor fixes as precursors to support for the AK09118 magnetometer
  that is very similar to the already supported AK09112
awinic,aw96103
- New driver for this capacitive proximity sensor.
x-powers,axp202
- Add support for the axp717 (including merge of MFD immutable branch).
sophgo,saradc
- New driver for this SOC ADC.

Features
========

adi,ad4695
- Add calibration support.
bosch,bmi323
- Ensure device is in lowest power state on suspend.

Cleanup and minor fixes
=======================
treewide
- Start to standardize formatting of id tables (ADC drivers done so far).
adi,ad5449
- Drop platform data support as long unused in upstream kernel.
bosch,bmc150
- Use fwnode_irq_get_by_name() in place of of_ variant.
- Use ACPI_HANDLE() to get the handle directly rather than via
  ACPI_COMPANION()
google,cros_ec_mkbp_proximity
- Include mod_devicetable.h instead of broader of.h
mirochip,mcp320x
- Drop vendorless compatible entries as not needed for backwards
  compatibility and should not be used in new boards.
st,lsm6dsx
- Use iio_read_acpi_mount_matrix() helper instead of open coding the
  same.
- Drop some unnecessary dev_fwnode() calls to check if a fwnode is
  available.  All the calls made handle this anyway.
xilinx,ams
- Use device_for_each_child_node_scoped() to avoid manual release of
  fwnode handle.

tools,generic-buffer
- Handle failure to allocate trigger name.
- Cleanup .*.cmd files if present.

* tag 'iio-for-6.12b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (28 commits)
  iio: adc: axp20x_adc: add support for AXP717 ADC
  dt-bindings: iio: adc: Add AXP717 compatible
  iio: adc: axp20x_adc: Add adc_en1 and adc_en2 to axp_data
  tools: iio: rm .*.cmd when make clean
  iio: adc: standardize on formatting for id match tables
  iio: proximity: aw96103: Add support for aw96103/aw96105 proximity sensor
  dt-bindings: iio: aw96103: Add bindings for aw96103/aw96105 sensor
  iio: adc: sophgo-saradc: Add driver for Sophgo CV1800B SARADC
  dt-bindings: iio: adc: sophgo,cv1800b-saradc: Add Sophgo CV1800B SARADC
  tools/iio: Add memory allocation failure check for trigger_name
  iio: imu: st_lsm6dsx: Remove useless dev_fwnode() calls
  iio: imu: st_lsm6dsx: Use iio_read_acpi_mount_matrix() helper
  iio: adc: mcp320x: Drop vendorless compatible strings
  iio: dac: ad5449: drop support for platform data
  iio: adc: xilinx-ams: use device_* to iterate over device child nodes
  iio: ABI: document ad4695 new attributes
  doc: iio: ad4695: update for calibration support
  iio: adc: ad4695: implement calibration support
  iio: adc: ad4695: add 2nd regmap for 16-bit registers
  iio: bmi323: peripheral in lowest power state on suspend
  ...

12 months agoiio: adc: axp20x_adc: add support for AXP717 ADC
Chris Morgan [Wed, 21 Aug 2024 21:54:53 +0000 (16:54 -0500)]
iio: adc: axp20x_adc: add support for AXP717 ADC

Add support for the AXP717 ADC. The AXP717 differs from other ADCs
in this series by utilizing a 14 bit ADC for all channels (a full 16
bits with the first 2 digits reserved). It also differs by lacking a
battery discharge current channel.

Note that while the current charge channel itself is included in this
driver for the AXP717 and listed in the datasheet, no scale or offset
was given for this channel. For now no scale or offset is provided in
this driver.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://patch.msgid.link/20240821215456.962564-13-macroalpha82@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: adc: Add AXP717 compatible
Chris Morgan [Wed, 21 Aug 2024 21:54:49 +0000 (16:54 -0500)]
dt-bindings: iio: adc: Add AXP717 compatible

Add compatible binding for the axp717.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://patch.msgid.link/20240821215456.962564-9-macroalpha82@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: axp20x_adc: Add adc_en1 and adc_en2 to axp_data
Chris Morgan [Wed, 21 Aug 2024 21:54:42 +0000 (16:54 -0500)]
iio: adc: axp20x_adc: Add adc_en1 and adc_en2 to axp_data

Add the register for adc_en1 and adc_en2 to the axp_data struct. This
allows us to specify a different register to enable the adc channels
for different devices such as the AXP717.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240821215456.962564-2-macroalpha82@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoMerge remote-tracking branch 'mfd/ib-mfd-for-iio-power-6.12' into togreg
Jonathan Cameron [Sat, 7 Sep 2024 13:26:34 +0000 (14:26 +0100)]
Merge remote-tracking branch 'mfd/ib-mfd-for-iio-power-6.12' into togreg

12 months agow1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Uwe Kleine-König [Fri, 6 Sep 2024 14:11:33 +0000 (16:11 +0200)]
w1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0

This driver doesn't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240725160909.326143-2-u.kleine-koenig@baylibre.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240906141135.72080-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agoMerge tag 'icc-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov...
Greg Kroah-Hartman [Fri, 6 Sep 2024 17:17:16 +0000 (19:17 +0200)]
Merge tag 'icc-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 6.12

This pull request contains the interconnect changes for the 6.12-rc1 merge
window. It contains new drivers and fixes with the following highlights:

Driver changes:
- New driver for MSM8976 platforms
- New driver for MSM8937 platforms
- Enable sync_state for SM8250 platforms
- Enable QoS support for QCS404
- Add ab_coeff bandwidth adjustments for MSM8953
- Drop the unsupported yet DISP nodes on SM8350 platforms
- Fix missed num_nodes initialization in icc-clk driver
- Misc DT and documentation fixes

Signed-off-by: Georgi Djakov <djakov@kernel.org>
* tag 'icc-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  dt-bindings: interconnect: qcom: Do not require reg for sc8180x virt NoCs
  dt-bindings: interconnect: qcom-bwmon: Document SA8775p bwmon compatibles
  dt-bindings: interconnect: qcom: msm8953: Fix 'See also' in description
  interconnect: qcom: msm8953: Add ab_coeff
  dt-bindings: interconnect: qcom: msm8939: Fix example
  interconnect: qcom: qcs404: Add regmaps and more bus descriptions
  interconnect: qcom: qcs404: Mark AP-owned nodes as such
  interconnect: qcom: Add MSM8937 interconnect provider driver
  interconnect: qcom: sm8250: Enable sync_state
  dt-bindings: interconnect: qcom,sm8350: drop DISP nodes
  interconnect: qcom: sm8350: drop DISP nodes
  dt-bindings: interconnect: qcom: Add Qualcomm MSM8937 NoC
  interconnect: qcom: Add MSM8976 interconnect provider driver
  dt-bindings: interconnect: qcom: Add Qualcomm MSM8976 NoC
  interconnect: icc-clk: Add missed num_nodes initialization
  dt-bindings: interconnect: qcom,rpmh: correct sm8150 camnoc

12 months agotools: iio: rm .*.cmd when make clean
zhangjiao [Thu, 29 Aug 2024 05:33:09 +0000 (13:33 +0800)]
tools: iio: rm .*.cmd when make clean

rm .*.cmd when make clean

Signed-off-by: zhangjiao <zhangjiao2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240829053309.10563-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: standardize on formatting for id match tables
Jonathan Cameron [Sun, 18 Aug 2024 18:09:12 +0000 (19:09 +0100)]
iio: adc: standardize on formatting for id match tables

This is a frequent minor comment in reviews, so start cleaning up
existing drivers in the hope we get fewer cases of cut and paste.

There are not kernel wide rules for these, but for IIO the style
that I prefer (and hence most common) is:

- Space after { and before }
- No comma after terminator { }

This may cause merge conflicts but they should be trivial to resolve
hence I have not broken this into per driver patches.

Link: https://patch.msgid.link/20240818180912.719399-1-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: proximity: aw96103: Add support for aw96103/aw96105 proximity sensor
shuaijie wang [Tue, 27 Aug 2024 08:02:29 +0000 (08:02 +0000)]
iio: proximity: aw96103: Add support for aw96103/aw96105 proximity sensor

AW96103 is a low power consumption capacitive touch and proximity controller.
Each channel can be independently config as sensor input, shield output.

Channel Information:
  aw96103: 3-channel
  aw96105: 5-channel

Signed-off-by: shuaijie wang <wangshuaijie@awinic.com>
Link: https://patch.msgid.link/20240827080229.1431784-3-wangshuaijie@awinic.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoMerge tag 'mhi-for-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani...
Greg Kroah-Hartman [Thu, 5 Sep 2024 14:20:47 +0000 (16:20 +0200)]
Merge tag 'mhi-for-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next

Manivannan writes:

MHI Host
========

core
----

- Used const qualifier for 'mhi_bus_type' to place it onto the read-only memory
  segment.

pci_generic
-----------

- Fixed the Telit FE990A modem name as it was advertising the wrong product
  name, thereby confusing the users.

- Added Netprisma LCUR57 and FCUN69 modems based on Qcom SDX24 and SDX6X SoCs.

- Updated the EDL (Emergency Download) firmware path for the Foxconn modems.
  The patch that added the modem support mistakenly specified the generic EDL
  firmware path common for Qcom based modems. But they won't work.

- Enabled the EDL trigger for all Foxconn modems to update the modem firmware.

* tag 'mhi-for-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
  bus: mhi: host: pci_generic: Enable EDL trigger for Foxconn modems
  bus: mhi: host: pci_generic: Update EDL firmware path for Foxconn modems
  bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69
  bus: mhi: host: make mhi_bus_type const
  bus: mhi: host: pci_generic: Fix the name for the Telit FE990A

12 months agobus: mhi: host: pci_generic: Enable EDL trigger for Foxconn modems
Slark Xiao [Thu, 25 Jul 2024 02:29:41 +0000 (10:29 +0800)]
bus: mhi: host: pci_generic: Enable EDL trigger for Foxconn modems

All Foxconn modems support generic EDL trigger to flash the firmware.
Hence, enable the EDL trigger using mhi_pci_dev_info::edl_trigger.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240725022941.65948-2-slark_xiao@163.com
[mani: Reworded the subject and description]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12 months agobus: mhi: host: pci_generic: Update EDL firmware path for Foxconn modems
Slark Xiao [Thu, 25 Jul 2024 02:29:40 +0000 (10:29 +0800)]
bus: mhi: host: pci_generic: Update EDL firmware path for Foxconn modems

Foxconn uses a unique firmware for their MHI based modems. So the generic
firmware from Qcom won't work. Hence, update the EDL firmware path to
include the 'foxconn' subdirectory based on the modem SoC so that the
Foxconn specific firmware could be used.

Respective firmware will be upstreamed to linux-firmware repo.

Cc: stable@vger.kernel.org # 6.11
Fixes: bf30a75e6e00 ("bus: mhi: host: Add support for Foxconn SDX72 modems")
Signed-off-by: Slark Xiao <slark_xiao@163.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240725022941.65948-1-slark_xiao@163.com
[mani: Reworded the subject and description]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12 months agodt-bindings: iio: aw96103: Add bindings for aw96103/aw96105 sensor
shuaijie wang [Tue, 27 Aug 2024 08:02:28 +0000 (08:02 +0000)]
dt-bindings: iio: aw96103: Add bindings for aw96103/aw96105 sensor

Add device tree bindings for aw96103/aw96105 proximity sensor.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: shuaijie wang <wangshuaijie@awinic.com>
Link: https://patch.msgid.link/20240827080229.1431784-2-wangshuaijie@awinic.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: sophgo-saradc: Add driver for Sophgo CV1800B SARADC
Thomas Bonnefille [Thu, 29 Aug 2024 12:31:51 +0000 (14:31 +0200)]
iio: adc: sophgo-saradc: Add driver for Sophgo CV1800B SARADC

This adds a driver for the Sophgo CV1800B SARADC.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Link: https://patch.msgid.link/20240829-sg2002-adc-v5-2-aacb381e869b@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: adc: sophgo,cv1800b-saradc: Add Sophgo CV1800B SARADC
Thomas Bonnefille [Thu, 29 Aug 2024 12:31:50 +0000 (14:31 +0200)]
dt-bindings: iio: adc: sophgo,cv1800b-saradc: Add Sophgo CV1800B SARADC

The Sophgo CV1800B SARADC is a Successive Approximation ADC that can be
found in the Sophgo CV1800B SoC.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20240829-sg2002-adc-v5-1-aacb381e869b@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agotools/iio: Add memory allocation failure check for trigger_name
Zhu Jun [Wed, 28 Aug 2024 09:31:29 +0000 (02:31 -0700)]
tools/iio: Add memory allocation failure check for trigger_name

Added a check to handle memory allocation failure for `trigger_name`
and return `-ENOMEM`.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240828093129.3040-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: imu: st_lsm6dsx: Remove useless dev_fwnode() calls
Andy Shevchenko [Mon, 26 Aug 2024 21:22:40 +0000 (00:22 +0300)]
iio: imu: st_lsm6dsx: Remove useless dev_fwnode() calls

The device property APIs designed that way that they will return an error when
there is no valid fwnode provided. Moreover, the check for NULL of dev_fwnode()
is not fully correct as in some (currently rare) cases it may contain an error
pointer. This is not a problem anyway (see keyword 'valid' above) that's why
the code works properly even without this change.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240826212344.866928-3-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: imu: st_lsm6dsx: Use iio_read_acpi_mount_matrix() helper
Andy Shevchenko [Mon, 26 Aug 2024 21:22:39 +0000 (00:22 +0300)]
iio: imu: st_lsm6dsx: Use iio_read_acpi_mount_matrix() helper

Replace the duplicate ACPI "ROTM" data parsing code with the new
shared iio_read_acpi_mount_matrix() helper.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240826212344.866928-2-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: mcp320x: Drop vendorless compatible strings
Rob Herring (Arm) [Mon, 26 Aug 2024 19:17:28 +0000 (14:17 -0500)]
iio: adc: mcp320x: Drop vendorless compatible strings

The vendorless compatible strings are deprecated and weren't retained
when the binding was converted to schema. As a result, they are listed
as undocumented when running "make dt_compatible_check". Rather than add
them back to the schema, let's just drop them as they are unnecessary.
Furthermore, they are unnecessary as the SPI matching will strip the
vendor prefix on compatible string and match that against the
spi_device_id table.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240826191728.1415189-1-robh@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: dac: ad5449: drop support for platform data
Bartosz Golaszewski [Wed, 14 Aug 2024 09:26:29 +0000 (11:26 +0200)]
iio: dac: ad5449: drop support for platform data

There are no longer any users of the platform data struct. Remove
support for it from the driver.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://patch.msgid.link/20240814092629.9862-1-brgl@bgdev.pl
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: xilinx-ams: use device_* to iterate over device child nodes
Javier Carrasco [Tue, 20 Aug 2024 19:02:26 +0000 (21:02 +0200)]
iio: adc: xilinx-ams: use device_* to iterate over device child nodes

Use `device_for_each_child_node_scoped()` in `ams_parse_firmware()`
to explicitly state device child node access, and simplify the child
node handling as it is not required outside the loop.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Link: https://patch.msgid.link/20240820-device_child_node_access-v3-1-1ee09bdedb9e@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: ABI: document ad4695 new attributes
David Lechner [Tue, 20 Aug 2024 15:58:38 +0000 (10:58 -0500)]
iio: ABI: document ad4695 new attributes

The ad4695 driver now supports calibration using the
in_voltageY_calib{scale,bias}[_available] attributes.

Only one of these was documented before. This adds rest.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240820-ad4695-gain-offset-v1-4-c8f6e3b47551@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodoc: iio: ad4695: update for calibration support
David Lechner [Tue, 20 Aug 2024 15:58:37 +0000 (10:58 -0500)]
doc: iio: ad4695: update for calibration support

Calibration support has been added to the ad4695 driver, so update the
documentation to reflect this.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240820-ad4695-gain-offset-v1-3-c8f6e3b47551@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad4695: implement calibration support
David Lechner [Tue, 20 Aug 2024 15:58:36 +0000 (10:58 -0500)]
iio: adc: ad4695: implement calibration support

The AD4695 has a calibration feature that allows the user to compensate
for variations in the analog front end. This implements this feature in
the driver using the standard `calibgain` and `calibbias` attributes.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240820-ad4695-gain-offset-v1-2-c8f6e3b47551@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad4695: add 2nd regmap for 16-bit registers
David Lechner [Tue, 20 Aug 2024 15:58:35 +0000 (10:58 -0500)]
iio: adc: ad4695: add 2nd regmap for 16-bit registers

The AD4695 and similar chips have some multibyte registers that have
to be read/written in a single operation. So we need to add a 2nd regmap
for these registers.

These registers are removed from the 8-bit regmap allowable ranges and
AD4695_MAX_REG is dropped since it would be ambiguous now.

debugfs register access is also updated to automatically use the correct
regmap depending on the register address.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240820-ad4695-gain-offset-v1-1-c8f6e3b47551@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: bmi323: peripheral in lowest power state on suspend
Denis Benato [Sat, 24 Aug 2024 14:11:22 +0000 (16:11 +0200)]
iio: bmi323: peripheral in lowest power state on suspend

The bmi323 is mounted on some devices that are powered
by an internal battery: help in reducing system overall power drain
while the system is in s2idle or the imu driver is not loaded
by resetting it in its lowest power draining state.

Signed-off-by: Denis Benato <benato.denis96@gmail.com>
Link: https://patch.msgid.link/20240824141122.334620-2-benato.denis96@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: accel: bmc150: Improve bmc150_apply_bosc0200_acpi_orientation()
Andy Shevchenko [Fri, 23 Aug 2024 23:01:07 +0000 (02:01 +0300)]
iio: accel: bmc150: Improve bmc150_apply_bosc0200_acpi_orientation()

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

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240823230107.745900-1-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: accel: bmc150: use fwnode_irq_get_byname()
Andy Shevchenko [Fri, 23 Aug 2024 23:00:56 +0000 (02:00 +0300)]
iio: accel: bmc150: use fwnode_irq_get_byname()

Use the generic fwnode_irq_get_byname() in place of of_irq_get_byname()
to get the IRQ number from the interrupt pin.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240823230056.745872-1-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: proximity: cros_ec_mkbp_proximity: Switch to including mod_devicetable.h for...
Andy Shevchenko [Fri, 23 Aug 2024 22:07:18 +0000 (01:07 +0300)]
iio: proximity: cros_ec_mkbp_proximity: Switch to including mod_devicetable.h for struct of_device_id definition

of.h was only included for this definition, so include the correct header
instead.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240823220718.743596-1-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: magnetometer: ak8975: Add AK09118 support
Danila Tikhonov [Sun, 18 Aug 2024 22:29:42 +0000 (00:29 +0200)]
iio: magnetometer: ak8975: Add AK09118 support

Add additional AK09118 to the magnetometer driver which has the same
register mapping and scaling as the AK09112 device.

Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://patch.msgid.link/20240819-ak09918-v4-4-f0734d14cfb9@mainlining.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: magnetometer: Add ak09118
Danila Tikhonov [Sun, 18 Aug 2024 22:29:41 +0000 (00:29 +0200)]
dt-bindings: iio: magnetometer: Add ak09118

Document asahi-kasei,ak09918 compatible as a fallback compatible,
ak09918 is register compatible with ak09912.

Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20240819-ak09918-v4-3-f0734d14cfb9@mainlining.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: magnetometer: ak8975: Fix reading for ak099xx sensors
Barnabás Czémán [Sun, 18 Aug 2024 22:29:40 +0000 (00:29 +0200)]
iio: magnetometer: ak8975: Fix reading for ak099xx sensors

Move ST2 reading with overflow handling after measurement data
reading.
ST2 register read have to be read after read measurment data,
because it means end of the reading and realease the lock on the data.
Remove ST2 read skip on interrupt based waiting because ST2 required to
be read out at and of the axis read.

Fixes: 57e73a423b1e ("iio: ak8975: add ak09911 and ak09912 support")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://patch.msgid.link/20240819-ak09918-v4-2-f0734d14cfb9@mainlining.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: magnetometer: ak8975: Relax failure on unknown id
Barnabás Czémán [Sun, 18 Aug 2024 22:29:39 +0000 (00:29 +0200)]
iio: magnetometer: ak8975: Relax failure on unknown id

Relax failure when driver gets an unknown device id for
allow probe for register compatible devices.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://patch.msgid.link/20240819-ak09918-v4-1-f0734d14cfb9@mainlining.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agomisc: tsl2550: replace simple_strtoul to kstrtoul
Hongbo Li [Fri, 30 Aug 2024 08:03:11 +0000 (16:03 +0800)]
misc: tsl2550: replace simple_strtoul to kstrtoul

The function simple_strtoul performs no error checking
in scenarios where the input value overflows the intended
output variable.

We can replace the use of the simple_strtoul with the safer
alternatives kstrtoul.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240830080311.3545307-1-lihongbo22@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agomisc: lis3lv02d: Fix incorrect of_get_property() usage
Rob Herring (Arm) [Wed, 28 Aug 2024 13:18:51 +0000 (08:18 -0500)]
misc: lis3lv02d: Fix incorrect of_get_property() usage

The usage of of_get_property() is wrong. What's returned in "val" is
the property's length, not the value. Fix this by using the preferred
typed of_property_read_u32() function instead.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240828131851.3631855-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agopps: add an error check in parport_attach
Ma Ke [Wed, 28 Aug 2024 13:18:14 +0000 (21:18 +0800)]
pps: add an error check in parport_attach

In parport_attach, the return value of ida_alloc is unchecked, witch leads
to the use of an invalid index value.

To address this issue, index should be checked. When the index value is
abnormal, the device should be freed.

Found by code review, compile tested only.

Cc: stable@vger.kernel.org
Fixes: fb56d97df70e ("pps: client: use new parport device model")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Link: https://lore.kernel.org/r/20240828131814.3034338-1-make24@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agodt-bindings: nvmem: sfp: add ref to nvmem-deprecated-cells.yaml
Frank Li [Mon, 2 Sep 2024 14:29:52 +0000 (15:29 +0100)]
dt-bindings: nvmem: sfp: add ref to nvmem-deprecated-cells.yaml

Add ref nvmem-deprecated-cells.yaml to support old style binding.

Fix below CHECK_DTBS warning.
efuse@1e80000: Unevaluated properties are not allowed ('unique-id@1c' was unexpected)

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agonvmem: Fix misspelling
Matthew Wilcox [Mon, 2 Sep 2024 14:29:51 +0000 (15:29 +0100)]
nvmem: Fix misspelling

There is no function called kstrbool().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agonvmem: sunplus-ocotp: Use devm_platform_ioremap_resource_byname() helper function
Zhang Zekun [Mon, 2 Sep 2024 14:29:50 +0000 (15:29 +0100)]
nvmem: sunplus-ocotp: Use devm_platform_ioremap_resource_byname() helper function

platform_get_resource_byname() and devm_ioremap_resource() can be
replaced by devm_platform_ioremap_resource_byname(), which can
simplify the code logic a bit, No functional change here.

Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agodt-bindings: nvmem: st,stm32-romem: add missing "unevaluatedProperties" on child...
Krzysztof Kozlowski [Mon, 2 Sep 2024 14:29:49 +0000 (15:29 +0100)]
dt-bindings: nvmem: st,stm32-romem: add missing "unevaluatedProperties" on child nodes

All nodes need an explicit additionalProperties or unevaluatedProperties
unless a $ref has one that's false.  Fixing this for STM32
Factory-programmed data binding needs referencing fixed layout schema
for children.  Add reference to the NVMEM deprecated cells for the
schema to be complete.

This fixes dt_binding_check warning:

  st,stm32-romem.yaml: ^.*@[0-9a-f]+$: Missing additionalProperties/unevaluatedProperties constraint

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agodt-bindings: nvmem: convert U-Boot env to a layout
Rafał Miłecki [Mon, 2 Sep 2024 14:29:46 +0000 (15:29 +0100)]
dt-bindings: nvmem: convert U-Boot env to a layout

U-Boot environment variables can be stored in various data sources. MTD
is just one of available options. Refactor DT binding into a layout so
it can be used with UBI volumes and other NVMEM devices.

Link: https://lore.kernel.org/all/20231221173421.13737-1-zajec5@gmail.com/
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agonvmem: imx-ocotp-ele: support i.MX95
Peng Fan [Mon, 2 Sep 2024 14:29:45 +0000 (15:29 +0100)]
nvmem: imx-ocotp-ele: support i.MX95

i.MX95 OCOTP has same accessing method, so add an entry for i.MX95, but
some fuse has ECC feature, so only read out the lower 16bits for ECC fuses.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agodt-bindings: nvmem: imx-ocotp: support i.MX95
Peng Fan [Mon, 2 Sep 2024 14:29:44 +0000 (15:29 +0100)]
dt-bindings: nvmem: imx-ocotp: support i.MX95

Add i.MX95 ocotp compatible string

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902142952.71639-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agodt-bindings: misc: qcom,fastrpc: document new domain ID
Bartosz Golaszewski [Mon, 2 Sep 2024 14:18:21 +0000 (15:18 +0100)]
dt-bindings: misc: qcom,fastrpc: document new domain ID

Add "cdsp1" as the new supported label for the CDSP1 fastrpc domain.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902141821.70656-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agomisc: fastrpc: Add support for cdsp1 remoteproc
Ling Xu [Mon, 2 Sep 2024 14:18:20 +0000 (15:18 +0100)]
misc: fastrpc: Add support for cdsp1 remoteproc

The fastrpc supports 4 remoteproc. There are some products which
support cdsp1 remoteproc. Add changes to support cdsp1 remoteproc.

Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
[Bartosz: ported to mainline]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240902141821.70656-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agodt-bindings: misc: qcom,fastrpc: increase the max number of iommus
Bartosz Golaszewski [Mon, 2 Sep 2024 14:18:19 +0000 (15:18 +0100)]
dt-bindings: misc: qcom,fastrpc: increase the max number of iommus

The fastrpc components on the SA8775P SoC can require up to 10 IOMMU
entries. Bump the maxItems.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240902141821.70656-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agoslimbus: generate MODULE_ALIAS() from MODULE_DEVICE_TABLE()
Masahiro Yamada [Mon, 2 Sep 2024 14:10:04 +0000 (15:10 +0100)]
slimbus: generate MODULE_ALIAS() from MODULE_DEVICE_TABLE()

Commit 9e663f4811c6 ("slimbus: core: add support to uevent") added the
MODALIAS=slim:* uevent variable, but modpost does not generate the
corresponding MODULE_ALIAS().

To support automatic module loading, slimbus drivers still need to
manually add MODULE_ALIAS("slim:<manf_id>:<prod_code>:*"), as seen in
sound/soc/codecs/wcd9335.c.

To automate this, make modpost generate the proper MODULE_ALIAS() from
MODULE_DEVICE_TABLE(slim, ).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240902141004.70048-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agoslimbus: qcom-ngd-ctrl: use 'time_left' variable with wait_for_completion_timeout()
Wolfram Sang [Mon, 2 Sep 2024 14:10:03 +0000 (15:10 +0100)]
slimbus: qcom-ngd-ctrl: use 'time_left' variable with wait_for_completion_timeout()

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

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

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

Fix to the proper variable type 'unsigned long' while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240902141004.70048-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agoslimbus: qcom-ctrl: use 'time_left' variable with wait_for_completion_timeout()
Wolfram Sang [Mon, 2 Sep 2024 14:10:02 +0000 (15:10 +0100)]
slimbus: qcom-ctrl: use 'time_left' variable with wait_for_completion_timeout()

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

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

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

Fix to the proper variable type 'unsigned long' while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240902141004.70048-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agoslimbus: messaging: use 'time_left' variable with wait_for_completion_timeout()
Wolfram Sang [Mon, 2 Sep 2024 14:10:01 +0000 (15:10 +0100)]
slimbus: messaging: use 'time_left' variable with wait_for_completion_timeout()

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

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

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

Fix to the proper variable type 'unsigned long' while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240902141004.70048-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agobinder: fix typo in comment
Ruffalo Lavoisier [Mon, 2 Sep 2024 13:07:32 +0000 (22:07 +0900)]
binder: fix typo in comment

Correct spelling on 'currently' in comment

Signed-off-by: Ruffalo Lavoisier <RuffaloLavoisier@gmail.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20240902130732.46698-1-RuffaloLavoisier@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 months agoMerge tag 'fpga-for-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Tue, 3 Sep 2024 10:08:18 +0000 (12:08 +0200)]
Merge tag 'fpga-for-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next

Xu writes:

FPGA Manager changes for 6.12-rc1

FPGA unit test:

- Macro's change improves fpga tests using deferred actions

FPGA vendor drivers:

- Wolfram's change renames confusing variables for Altera & Xilinx
  drivers.

All patches have been reviewed on the mailing list, and have been in the
last linux-next releases (as part of our for-next branch).

Signed-off-by: Xu Yilun <yilun.xu@intel.com>
* tag 'fpga-for-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
  fpga: zynq-fpga: Rename 'timeout' variable as 'time_left'
  fpga: socfpga: Rename 'timeout' variable as 'time_left'
  fpga: Simplify and improve fpga region test using deferred actions
  fpga: Simplify and improve fpga bridge test using deferred actions
  fpga: Simplify and improve fpga mgr test using deferred actions

12 months agoMerge tag 'coresight-next-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Tue, 3 Sep 2024 10:07:03 +0000 (12:07 +0200)]
Merge tag 'coresight-next-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next

Suzuki writes:

coresight: updates for Linux v6.12

CoreSight/hwtracing subsystem updates targeting Linux v6.12:
 - Miscellaneous fixes and cleanups
 - TraceID allocation per sink, allowing system with > 110 cores for
   perf tracing.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
  coresight: Make trace ID map spinlock local to the map
  coresight: Emit sink ID in the HW_ID packets
  coresight: Remove pending trace ID release mechanism
  coresight: Use per-sink trace ID maps for Perf sessions
  coresight: Make CPU id map a property of a trace ID map
  coresight: Expose map arguments in trace ID API
  coresight: Move struct coresight_trace_id_map to common header
  coresight: Clarify comments around the PID of the sink owner
  coresight: Remove unused ETM Perf stubs
  coresight: tmc: sg: Do not leak sg_table
  Coresight: Set correct cs_mode for dummy source to fix disable issue
  Coresight: Set correct cs_mode for TPDM to fix disable issue
  coresight: cti: use device_* to iterate over device child nodes

12 months agoMerge tag 'iio-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Tue, 3 Sep 2024 09:32:16 +0000 (11:32 +0200)]
Merge tag 'iio-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-testing

Jonathan writes:

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

Includes a merge of spi-mos-config branch from spi.git that brings
support needed for the AD4000 driver.

Lots of new device support this time including 9 new drivers and substantial
changes to add new support to several more.

New device support
------------------

Given we have a lot of new support, I've subcategorized them:

Substantial changes, or new driver
**********************************

adi,ad4000
- New driver for this high speed ADC.
adi,ad4695
- New driver supporting AD4690, AD4696, AD4697 and AD4698 ADCs.
- Follow up series added triggered buffer support.
adi,ad7380
- Add support for single ended parts, AD7386, ADC7387, AD7388 and -4 variants.
  (driver previously only support differential parts).
  These variants have an additional front end MUX so only half the channels
  can be sampled efficiently.
adi,ad9467
- Refactor and extend driver to support ad9643, ad9449 and ad9652 high speed
  ADCs.
adi,adxl380
- New driver for this low power accelerometer.
adi,ltc2664
- New driver supporting LTC2664 and LTC2672 DACs.
microchip,pac1921
- New driver for this power/current monitor chip.
rohm,bh1745
- New driver for this RGBC colour sensor.
rohm,bu27034anuc
- The original bu27034 was canceled before mass production, so the
  driver is modified to support the BU27034ANUC which had some significant
  differences.  DT compatible changed to avoid chance of old driver ever
  binding to real hardware.
sciosense,ens210
- New driver for ens210, ens210a, ens211, ens212, ens213a, and ens215
  temperature and humidity sensors (all register compatible up to some
  conversion time differences)
sensiron,sdp500
- New driver for this differential pressure sensor.
tyhx,hx9023s
- New driver to support this capacitive proximity sensor.

Minor changes to support new devices
************************************

adi,adf4377
- Add support for the single output adf4378.
kionix,kxcjk-1013
- Add support for KX022-1020 accelerometer (binding and ID table only)
liteon,ltrf216a
- Add support for ltr-308.  A few minor differences in features set
rockchip,saradc
- Add ID for rk3576-saradc
sensortek,stk3310
- Add ID for stk3013 proximity sensor which (despite documentation) has
  an ambient light sensor and is compatible with existing parts.

Documentation updates
---------------------

Generalize ABI docs for shunt resistor attribute
Improve calibscale and calibbias related documentation.  A couple of follow
up patches to resolve duplicate documentation that resulted.

New core features
-----------------

backend
- Add option for debugfs - useful for test pattern control
- Use this for both adi-axi-adc and adi-axi-dac
trigger suspend
- Add functions to allow triggers to be suspended. This avoids problems
  when a device enters suspend to idle with a sysfs trigger. Use it for now
  in the bmi323 only.

New driver features
-------------------

adi,ad7192
- Add option to be a clock provider (+ additional clock config options)
adi,ad7380
- Add documentation for this fairly new driver.
adi,ad9461
- Provide control of test modes and backend validation blocks used
  to identify problems (via debugfs)
adi,ad9739
- Add backend debugfs and docs for what is provided via adi-axi-dac
avago,apds9960
- Add proximity and gesture calibration offset control
bosch,bmp280
- Triggered buffer support including adding raw+scale output for sysfs.
liteon,ltr390
- Add configuration of integration time and scale.
stm,dfsdm
- Convert this SD modulator driver to backend framework and add support
  for channel scaling + modern channel bindings.

Treewide cleanup
----------------

iio_dev->masklength: Making it private.
- Provide access function to read the core compute channel mask length
  and a macro to iterate over elements in the active_scan_mask.
- Enables marking masklength __private preventing drivers from
  writing it without triggering a build warning whilst minimizing overhead
  in what are typically hot paths.
- Convert all drivers and finally mark it private.
  Merge conflicts resolved in drivers applied after this point.
Constify regmap_bus
- These are never modified, so mark them const.

Core cleanup
------------

backend
- A few late breaking bits of feedback (unused variable, error messages)
dma-buffer
- Namespace exports.
core
- Drop unused assignment.

Driver cleanup
--------------

adi,ad4695
- Fixing binding to reflect that common-mode-channel is a scalar.
adi,ad7280a
- Use __free(kfree) to simplify freeing of receive buffer.
adi,ad7606
- Various dt-binding cleanup and improvements.
- Fix oversampling related gpio handling.
- Make polarity of standby gpio match documentation.
- use guard() to simplify lock handling.
adi,ad7768
- Use device_for_each_child_node_scoped() instead of fwnode equivalent.
adi,ad7124
- Reduce SPI transfers by avoiding separate writes to different fields
  in the same register.
- Start the ADC in idle mode.
adi,adis
- Drop ifdefs in favor of IS_ENABLED.
adi,admv8818
- Fix wrong ABI docs.
asahi-kasei,ak8975
- Drop a prefix free compatible accidentally added recently.
aspeed,adc
- Use of_property_present() instead of of_find_property() to see if the
  property is there or not.
atmel,at91,
- Use __free(kfree) to simplify freeing of channel related array.
bosch,bma400
- Use __free(kfree) to simplify freeing a locally allocated string.
bosch,bmc150
- Add missing mount-matrix binding docs.
bosch,bme680
- Fix read/write to ensure multiple necessary sequential reads without
  device configuration change.
- Drop unnecessary type casts and use more appropriate data types.
- Drop some left over ACPI code as ACPI support was removed due to invalid
  IDs (and no known users).
- Sort headers consistently.
- Avoid unnecessary duplicate read and redundant read of gas config.
- Use bulk reads to get calibration data.
- Reorder allocation of IIO device to be prior to device init.
- Add remaining read/write buffers to the union used already for all others.
- Tidy up error checks for consistency of style, including dev_err_probe()
- Bring the device startup procedure inline with the vendor code.
- Reorder code so mode forcing is more obvious occurring where needed.
- Tidy up data locality in reading functions so no magic data is stored
  in state structures just to get it across function calls.
- Make a local lookup table static to avoid placing it on the stack.
bosch,bmp280
- Fix BME280 regmap to not include registers it doesn't have.
- Wait a little longer after config to allow for maximum possible necessary
  wait.
- Reorganize headers.
- Make conversion_time_max array static to avoid placing it on the stack.
maxim,max1363
- Use __free(kfree) to simplify freeing transmission buffer.
microchip,mcp3964
- Use devm_regulator_get_enable_read_voltage()
microchip,mcp3911
- Use devm_regulator_get_enable_read_voltage()
microchip,mcp4728
- Use devm_regulator_get_enable_read_voltage()
microchip,mcp4922
- Use devm_regulator_get_enable_read_voltage() and devm_* to allow
  dropping of explicit remove() callback.
onnn,noa1305
- Various tidy up.
- Provide available scale values.
- Make integration time configurable.
- Fix up integration time look up (/2 error)
ti,dac7311
- Check if spi_setup() succeeded.
ti,tsc2046
- Use __free(kfree) to simplify freeing rx and tx buffers.
- Use devm_regulator_get_enable_read_voltage()

Various minor fixes not called out explicitly.

* tag 'iio-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (250 commits)
  drivers:iio:Fix the NULL vs IS_ERR() bug for debugfs_create_dir()
  iio: sgp40: retain documentation in driver
  iio: ABI: remove duplicate in_resistance_calibbias
  dt-bindings: iio: st,stm32-adc: add top-level constraints
  iio: ABI: add missing calibbias attributes
  iio: ABI: add missing calibscale attributes
  iio: ABI: sort calibscale attributes
  iio: ABI: document calibscale_available attributes
  iio: light: ltr390: Calculate 'counts_per_uvi' dynamically
  iio: light: ltr390: Add ALS channel and support for gain and resolution
  doc: iio: ad4695: document buffered read
  iio: adc: ad4695: implement triggered buffer
  iio: proximity: hx9023s: Fix error code in hx9023s_property_get()
  iio: light: noa1305: Fix up integration time look up
  iio: humidity: Add support for ENS210
  dt-bindings: iio: humidity: add ENS210 sensor family
  iio: imu: adis16460: drop ifdef around CONFIG_DEBUG_FS
  iio: imu: adis16400: drop ifdef around CONFIG_DEBUG_FS
  iio: imu: adis16480: drop ifdef around CONFIG_DEBUG_FS
  iio: imu: adis16475: drop ifdef around CONFIG_DEBUG_FS
  ...

12 months agomfd: axp20x: Add ADC, BAT, and USB cells for AXP717
Chris Morgan [Wed, 21 Aug 2024 21:54:52 +0000 (16:54 -0500)]
mfd: axp20x: Add ADC, BAT, and USB cells for AXP717

Add support for the AXP717 PMIC to utilize the ADC (for reading
voltage, current, and temperature information from the PMIC) as well
as the USB charger and battery.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20240821215456.962564-12-macroalpha82@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agobus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69
Mank Wang [Tue, 27 Aug 2024 01:58:33 +0000 (01:58 +0000)]
bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69

Add Netprisma LCUR57 and FCUN69 hardware revision:

LCUR57:
02:00.0 Unassigned class [ff00]: Device 203e:1000
Subsystem: Device 203e:1000

FCUN69:
02:00.0 Unassigned class [ff00]: Device 203e:1001
Subsystem: Device 203e:1001

Both of these modules create IP interfaces through MBIM.
And these modules can be checked for successful recognition through the
following command:
$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/0 [NetPrisma] LCUR57-WWD

$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/0 [NetPrisma] FCUN69-WWD

Signed-off-by: Mank Wang <mank.wang@netprisma.us>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/PH7PR22MB30386647BE2D813B502226CF81942@PH7PR22MB3038.namprd22.prod.outlook.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12 months agobus: mhi: host: make mhi_bus_type const
Kunwu Chan [Fri, 23 Aug 2024 03:11:28 +0000 (11:11 +0800)]
bus: mhi: host: make mhi_bus_type const

Now that the driver core can properly handle constant struct bus_type,
move the mhi_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240823031129.49010-1-kunwu.chan@linux.dev
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12 months agobus: mhi: host: pci_generic: Fix the name for the Telit FE990A
Fabio Porcedda [Tue, 20 Aug 2024 08:04:39 +0000 (10:04 +0200)]
bus: mhi: host: pci_generic: Fix the name for the Telit FE990A

Add a mhi_pci_dev_info struct specific for the Telit FE990A modem in
order to use the correct product name.

Cc: stable@vger.kernel.org # 6.1+
Fixes: 0724869ede9c ("bus: mhi: host: pci_generic: add support for Telit FE990 modem")
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240820080439.837666-1-fabio.porcedda@gmail.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12 months agoMerge branch 'icc-sm8350' into icc-next
Georgi Djakov [Sun, 25 Aug 2024 22:36:44 +0000 (01:36 +0300)]
Merge branch 'icc-sm8350' into icc-next

A set of fixes that target stability of the SM8350 platform.

* icc-sm8350
  interconnect: qcom: sm8350: drop DISP nodes
  dt-bindings: interconnect: qcom,sm8350: drop DISP nodes
  interconnect: qcom: sm8250: Enable sync_state

Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-0-1149dd8399fe@linaro.org/
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agoMerge branch 'icc-misc' into icc-next
Georgi Djakov [Sun, 25 Aug 2024 22:36:14 +0000 (01:36 +0300)]
Merge branch 'icc-misc' into icc-next

This series introduce new ICC drivers for some legacy socs
while at it also updates a bit of qcs404 driver which seems
to not receive much attention lately.

* icc-misc
  dt-bindings: interconnect: qcom: Add Qualcomm MSM8976 NoC
  interconnect: qcom: Add MSM8976 interconnect provider driver
  dt-bindings: interconnect: qcom: Add Qualcomm MSM8937 NoC
  interconnect: qcom: Add MSM8937 interconnect provider driver
  interconnect: qcom: qcs404: Mark AP-owned nodes as such
  interconnect: qcom: qcs404: Add regmaps and more bus descriptions
  dt-bindings: interconnect: qcom: msm8939: Fix example
  interconnect: qcom: msm8953: Add ab_coeff
  dt-bindings: interconnect: qcom: msm8953: Fix 'See also' in description

Link: https://lore.kernel.org/all/20240709102728.15349-1-a39.skl@gmail.com/
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom: Do not require reg for sc8180x virt NoCs
Georgi Djakov [Tue, 30 Jul 2024 14:10:16 +0000 (17:10 +0300)]
dt-bindings: interconnect: qcom: Do not require reg for sc8180x virt NoCs

The virtual interconnect providers do not have their own IO address space,
but this is not documented in the DT schema and the following warnings are
reported by dtbs_check:

sc8180x-lenovo-flex-5g.dtb: interconnect-camnoc-virt: 'reg' is a required property
sc8180x-lenovo-flex-5g.dtb: interconnect-mc-virt: 'reg' is a required property
sc8180x-lenovo-flex-5g.dtb: interconnect-qup-virt: 'reg' is a required property
sc8180x-primus.dtb: interconnect-camnoc-virt: 'reg' is a required property
sc8180x-primus.dtb: interconnect-mc-virt: 'reg' is a required property
sc8180x-primus.dtb: interconnect-qup-virt: 'reg' is a required property

Fix this by adding them to the list of compatibles that do not require
the reg property.

Link: https://lore.kernel.org/r/20240730141016.1142608-1-djakov@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom-bwmon: Document SA8775p bwmon compatibles
Tengfei Fan [Tue, 30 Jul 2024 07:16:10 +0000 (15:16 +0800)]
dt-bindings: interconnect: qcom-bwmon: Document SA8775p bwmon compatibles

Document the compatibles used to describe the bwmons present on the
SA8775p platform.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Link: https://lore.kernel.org/r/20240730-add_sa8775p_bwmon-v1-1-f4f878da29ae@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom: msm8953: Fix 'See also' in description
Adam Skladowski [Tue, 9 Jul 2024 10:22:54 +0000 (12:22 +0200)]
dt-bindings: interconnect: qcom: msm8953: Fix 'See also' in description

"See also" in description seems to be wrongly defined,
make it inline with other yamls.

Fixes: 791ed23f735b ("dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC")
Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240709102728.15349-10-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: msm8953: Add ab_coeff
Adam Skladowski [Tue, 9 Jul 2024 10:22:53 +0000 (12:22 +0200)]
interconnect: qcom: msm8953: Add ab_coeff

BIMC and SNOC-MM on downstream feature
qcom,util-fact which translates to ab_coeff, add it.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-9-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom: msm8939: Fix example
Adam Skladowski [Tue, 9 Jul 2024 10:22:52 +0000 (12:22 +0200)]
dt-bindings: interconnect: qcom: msm8939: Fix example

For now example list snoc_mm as children of bimc which is obviously
not valid, drop bimc and move snoc_mm into snoc.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240709102728.15349-8-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: qcs404: Add regmaps and more bus descriptions
Adam Skladowski [Tue, 9 Jul 2024 10:22:51 +0000 (12:22 +0200)]
interconnect: qcom: qcs404: Add regmaps and more bus descriptions

Currently we are lacking descriptions of regmaps, bus clocks
and types of busses, provide them.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-7-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: qcs404: Mark AP-owned nodes as such
Adam Skladowski [Tue, 9 Jul 2024 10:22:50 +0000 (12:22 +0200)]
interconnect: qcom: qcs404: Mark AP-owned nodes as such

When driver was upstreamed it seems ap_owned nodes were not available,
bring them now.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-6-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: Add MSM8937 interconnect provider driver
Adam Skladowski [Tue, 9 Jul 2024 10:22:49 +0000 (12:22 +0200)]
interconnect: qcom: Add MSM8937 interconnect provider driver

Add driver for interconnect busses found in MSM8937 based platforms.
The topology consists of four NoCs that are partially controlled by a
RPM processor.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-5-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: sm8250: Enable sync_state
Dmitry Baryshkov [Sun, 4 Aug 2024 05:40:12 +0000 (08:40 +0300)]
interconnect: qcom: sm8250: Enable sync_state

Enable the generic icc sync_state callback to ensure interconnect votes
are actually taken into account, instead of being forced to the maximum
value.

Fixes: b95b668eaaa2 ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-8-1149dd8399fe@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom,sm8350: drop DISP nodes
Dmitry Baryshkov [Sun, 4 Aug 2024 05:40:10 +0000 (08:40 +0300)]
dt-bindings: interconnect: qcom,sm8350: drop DISP nodes

Vendor msm-5.x kernels declared duplicate indices for some of display
nodes to be used by separate display RSC and BCM voters. As it is not
clear how this separate BCM should be modelled upstream and the device
trees do not use these indices, drop them for now.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-6-1149dd8399fe@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: sm8350: drop DISP nodes
Dmitry Baryshkov [Sun, 4 Aug 2024 05:40:08 +0000 (08:40 +0300)]
interconnect: qcom: sm8350: drop DISP nodes

The msm-5.x kernels have additional display RSC and separate display BCM
voter. Since upstream kernel doesn't yet provide display RSC, we end up
duplicating several nodes, which can result in incorrect votes being
cast. Drop *_DISP nodes.

Fixes: d26a56674497 ("interconnect: qcom: Add SM8350 interconnect provider driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-4-1149dd8399fe@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom: Add Qualcomm MSM8937 NoC
Adam Skladowski [Tue, 9 Jul 2024 10:22:48 +0000 (12:22 +0200)]
dt-bindings: interconnect: qcom: Add Qualcomm MSM8937 NoC

Add bindings for Qualcomm MSM8937 Network-On-Chip interconnect devices.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240709102728.15349-4-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: qcom: Add MSM8976 interconnect provider driver
Adam Skladowski [Tue, 9 Jul 2024 10:22:47 +0000 (12:22 +0200)]
interconnect: qcom: Add MSM8976 interconnect provider driver

Add driver for interconnect busses found in MSM8976 based platforms.
The topology consists of four NoCs that are partially controlled by a
RPM processor.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-3-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom: Add Qualcomm MSM8976 NoC
Adam Skladowski [Tue, 9 Jul 2024 10:22:46 +0000 (12:22 +0200)]
dt-bindings: interconnect: qcom: Add Qualcomm MSM8976 NoC

Add bindings for Qualcomm MSM8976 Network-On-Chip interconnect devices.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240709102728.15349-2-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agointerconnect: icc-clk: Add missed num_nodes initialization
Kees Cook [Tue, 16 Jul 2024 21:48:23 +0000 (14:48 -0700)]
interconnect: icc-clk: Add missed num_nodes initialization

With the new __counted_by annotation, the "num_nodes" struct member must
be set before accessing the "nodes" array. This initialization was done
in other places where a new struct icc_onecell_data is allocated, but this
case in icc_clk_register() was missed. Set "num_nodes" after allocation.

Fixes: dd4904f3b924 ("interconnect: qcom: Annotate struct icc_onecell_data with __counted_by")
Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240716214819.work.328-kees@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodt-bindings: interconnect: qcom,rpmh: correct sm8150 camnoc
Rayyan Ansari [Tue, 16 Jul 2024 14:47:38 +0000 (15:47 +0100)]
dt-bindings: interconnect: qcom,rpmh: correct sm8150 camnoc

The sm8150 camnoc interconnect was mistakenly documented as
"qcom,sm8150-camnoc-noc", for which there is no reference to in
drivers or device tree.

Correct this to "qcom,sm8150-camnoc-virt".

Signed-off-by: Rayyan Ansari <rayyan.ansari@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240716144738.109823-1-rayyan.ansari@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
12 months agodrivers:iio:Fix the NULL vs IS_ERR() bug for debugfs_create_dir()
Yang Ruibin [Wed, 21 Aug 2024 08:39:08 +0000 (04:39 -0400)]
drivers:iio:Fix the NULL vs IS_ERR() bug for debugfs_create_dir()

The debugfs_create_dir() function returns error pointers.
It never returns NULL. So use IS_ERR() to check it.

Signed-off-by: Yang Ruibin <11162571@vivo.com>
Link: https://patch.msgid.link/20240821083911.3411-1-11162571@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: sgp40: retain documentation in driver
Andreas Klinger [Wed, 21 Aug 2024 07:53:56 +0000 (09:53 +0200)]
iio: sgp40: retain documentation in driver

Retain documentation on how the voc index is actually calculated in
driver code as it'll be removed in Documentation.

This is a follow up on patch "[PATCH] iio: ABI: remove duplicate
in_resistance_calibbias" from David.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Link: https://patch.msgid.link/ZsWdFOIkDtEB9WGO@mail.your-server.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: ABI: remove duplicate in_resistance_calibbias
David Lechner [Tue, 20 Aug 2024 15:18:24 +0000 (10:18 -0500)]
iio: ABI: remove duplicate in_resistance_calibbias

In commit 0f718e10da81 ("iio: ABI: add missing calibbias attributes"),
the in_resistance_calibbias attribute was added to the main IIO ABI
documentation. This attribute is was already documented in
sysfs-bus-iio-chemical-sgp40. This resulted in a duplicate entry that is
causing documentation build warnings.

This removes the attribute from the sgp40 documentation in favor of the
main IIO ABI documentation since this attribute fits the established
pattern of standard IIO attributes.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/linux-next/20240820134739.50c771cb@canb.auug.org.au/
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240820-iio-abi-remove-dup-in_resistance_calibbias-v1-1-e64e58cabb14@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: st,stm32-adc: add top-level constraints
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:29:51 +0000 (19:29 +0200)]
dt-bindings: iio: st,stm32-adc: add top-level constraints

Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:".  Add missing top-level constraints
for clock-names.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20240818172951.121983-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
13 months agocoresight: Make trace ID map spinlock local to the map
James Clark [Mon, 22 Jul 2024 10:11:59 +0000 (11:11 +0100)]
coresight: Make trace ID map spinlock local to the map

Reduce contention on the lock by replacing the global lock with one for
each map.

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-18-james.clark@linaro.org
13 months agocoresight: Emit sink ID in the HW_ID packets
James Clark [Mon, 22 Jul 2024 10:11:58 +0000 (11:11 +0100)]
coresight: Emit sink ID in the HW_ID packets

For Perf to be able to decode when per-sink trace IDs are used, emit the
sink that's being written to for each ETM.

Perf currently errors out if it sees a newer packet version so instead
of bumping it, add a new minor version field. This can be used to
signify new versions that have backwards compatible fields. Considering
this change is only for high core count machines, it doesn't make sense
to make a breaking change for everyone.

Signed-off-by: James Clark <james.clark@arm.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-17-james.clark@linaro.org
13 months agocoresight: Remove pending trace ID release mechanism
James Clark [Mon, 22 Jul 2024 10:11:57 +0000 (11:11 +0100)]
coresight: Remove pending trace ID release mechanism

Pending the release of IDs was a way of managing concurrent sysfs and
Perf sessions in a single global ID map. Perf may have finished while
sysfs hadn't, and Perf shouldn't release the IDs in use by sysfs and
vice versa.

Now that Perf uses its own exclusive ID maps, pending release doesn't
result in any different behavior than just releasing all IDs when the
last Perf session finishes. As part of the per-sink trace ID change, we
would have still had to make the pending mechanism work on a per-sink
basis, due to the overlapping ID allocations, so instead of making that
more complicated, just remove it.

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-16-james.clark@linaro.org
13 months agocoresight: Use per-sink trace ID maps for Perf sessions
James Clark [Mon, 22 Jul 2024 10:11:56 +0000 (11:11 +0100)]
coresight: Use per-sink trace ID maps for Perf sessions

This will allow sessions with more than CORESIGHT_TRACE_IDS_MAX ETMs
as long as there are fewer than that many ETMs connected to each sink.

Each sink owns its own trace ID map, and any Perf session connecting to
that sink will allocate from it, even if the sink is currently in use by
other users. This is similar to the existing behavior where the dynamic
trace IDs are constant as long as there is any concurrent Perf session
active. It's not completely optimal because slightly more IDs will be
used than necessary, but the optimal solution involves tracking the PIDs
of each session and allocating ID maps based on the session owner. This
is difficult to do with the combination of per-thread and per-cpu modes
and some scheduling issues. The complexity of this isn't likely to worth
it because even with multiple users they'd just see a difference in the
ordering of ID allocations rather than hitting any limits (unless the
hardware does have too many ETMs connected to one sink).

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-15-james.clark@linaro.org
13 months agocoresight: Make CPU id map a property of a trace ID map
James Clark [Mon, 22 Jul 2024 10:11:55 +0000 (11:11 +0100)]
coresight: Make CPU id map a property of a trace ID map

The global CPU ID mappings won't work for per-sink ID maps so move it to
the ID map struct. coresight_trace_id_release_all_pending() is hard
coded to operate on the default map, but once Perf sessions use their
own maps the pending release mechanism will be deleted. So it doesn't
need to be extended to accept a trace ID map argument at this point.

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Tested-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-14-james.clark@linaro.org
13 months agocoresight: Expose map arguments in trace ID API
James Clark [Mon, 22 Jul 2024 10:11:54 +0000 (11:11 +0100)]
coresight: Expose map arguments in trace ID API

The trace ID API is currently hard coded to always use the global map.
Add public versions that allow the map to be passed in so that Perf
mode can use per-sink maps. Keep the non-map versions so that sysfs
mode can continue to use the default global map.

System ID functions are unchanged because they will always use the
default map.

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Tested-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-13-james.clark@linaro.org
13 months agocoresight: Move struct coresight_trace_id_map to common header
James Clark [Mon, 22 Jul 2024 10:11:53 +0000 (11:11 +0100)]
coresight: Move struct coresight_trace_id_map to common header

The trace ID maps will need to be created and stored by the core and
Perf code so move the definition up to the common header.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Tested-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-12-james.clark@linaro.org
13 months agocoresight: Clarify comments around the PID of the sink owner
James Clark [Mon, 22 Jul 2024 10:11:52 +0000 (11:11 +0100)]
coresight: Clarify comments around the PID of the sink owner

"Process being monitored" and "pid of the process to monitor" imply that
this would be the same PID if there were two sessions targeting the same
process. But this is actually the PID of the process that did the Perf
event open call, rather than the target of the session. So update the
comments to make this clearer.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Tested-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-11-james.clark@linaro.org
13 months agocoresight: Remove unused ETM Perf stubs
James Clark [Mon, 22 Jul 2024 10:11:51 +0000 (11:11 +0100)]
coresight: Remove unused ETM Perf stubs

This file is never included anywhere if CONFIG_CORESIGHT is not set so
they are unused and aren't currently compile tested with any config so
remove them.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Tested-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-10-james.clark@linaro.org
13 months agocoresight: tmc: sg: Do not leak sg_table
Suzuki K Poulose [Tue, 2 Jul 2024 13:28:46 +0000 (14:28 +0100)]
coresight: tmc: sg: Do not leak sg_table

Running perf with cs_etm on Juno triggers the following kmemleak warning !

:~# cat /sys/kernel/debug/kmemleak
 unreferenced object 0xffffff8806b6d720 (size 96):
 comm "perf", pid 562, jiffies 4297810960
 hex dump (first 32 bytes):
 38 d8 13 07 88 ff ff ff 00 d0 9e 85 c0 ff ff ff  8...............
 00 10 00 88 c0 ff ff ff 00 f0 ff f7 ff 00 00 00  ................
 backtrace (crc 1dbf6e00):
 [<ffffffc08107381c>] kmemleak_alloc+0xbc/0xd8
 [<ffffffc0802f9798>] kmalloc_trace_noprof+0x220/0x2e8
 [<ffffffc07bb71948>] tmc_alloc_sg_table+0x48/0x208 [coresight_tmc]
 [<ffffffc07bb71cbc>] tmc_etr_alloc_sg_buf+0xac/0x240 [coresight_tmc]
 [<ffffffc07bb72538>] tmc_alloc_etr_buf.constprop.0+0x1f0/0x260 [coresight_tmc]
 [<ffffffc07bb7280c>] alloc_etr_buf.constprop.0.isra.0+0x74/0xa8 [coresight_tmc]
 [<ffffffc07bb72950>] tmc_alloc_etr_buffer+0x110/0x260 [coresight_tmc]
 [<ffffffc07bb38afc>] etm_setup_aux+0x204/0x3b0 [coresight]
 [<ffffffc08025837c>] rb_alloc_aux+0x20c/0x318
 [<ffffffc08024dd84>] perf_mmap+0x2e4/0x7a0
 [<ffffffc0802cceb0>] mmap_region+0x3b0/0xa08
 [<ffffffc0802cd8a8>] do_mmap+0x3a0/0x500
 [<ffffffc080295328>] vm_mmap_pgoff+0x100/0x1d0
 [<ffffffc0802cadf8>] ksys_mmap_pgoff+0xb8/0x110
 [<ffffffc080020688>] __arm64_sys_mmap+0x38/0x58
 [<ffffffc080028fc0>] invoke_syscall.constprop.0+0x58/0x100

This due to the fact that we do not free the "sg_table" itself while
freeing up  the SG table and data pages. Fix this by freeing the sg_table
in tmc_free_sg_table().

Fixes: 99443ea19e8b ("coresight: Add generic TMC sg table framework")
Cc: Mike Leach <mike.leach@linaro.org>
Cc: James Clark <james.clark@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20240702132846.1677261-1-suzuki.poulose@arm.com
13 months agoCoresight: Set correct cs_mode for dummy source to fix disable issue
Jie Gan [Mon, 12 Aug 2024 04:28:44 +0000 (12:28 +0800)]
Coresight: Set correct cs_mode for dummy source to fix disable issue

The coresight_disable_source_sysfs function should verify the
mode of the coresight device before disabling the source.
However, the mode for the dummy source device is always set to
CS_MODE_DISABLED, resulting in the check consistently failing.
As a result, dummy source cannot be properly disabled.

Configure CS_MODE_SYSFS/CS_MODE_PERF during the enablement.
Configure CS_MODE_DISABLED during the disablement.

Fixes: 9d3ba0b6c056 ("Coresight: Add coresight dummy driver")
Signed-off-by: Jie Gan <quic_jiegan@quicinc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240812042844.2890115-1-quic_jiegan@quicinc.com
13 months agoCoresight: Set correct cs_mode for TPDM to fix disable issue
Jie Gan [Mon, 12 Aug 2024 04:30:43 +0000 (12:30 +0800)]
Coresight: Set correct cs_mode for TPDM to fix disable issue

The coresight_disable_source_sysfs function should verify the
mode of the coresight device before disabling the source.

However, the mode for the TPDM device is always set to
CS_MODE_DISABLED, resulting in the check consistently failing.
As a result, TPDM cannot be properly disabled.

Configure CS_MODE_SYSFS/CS_MODE_PERF during the enablement.
Configure CS_MODE_DISABLED during the disablement.

Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver")
Signed-off-by: Jie Gan <quic_jiegan@quicinc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240812043043.2890694-1-quic_jiegan@quicinc.com
13 months agocoresight: cti: use device_* to iterate over device child nodes
Javier Carrasco [Thu, 8 Aug 2024 15:12:37 +0000 (17:12 +0200)]
coresight: cti: use device_* to iterate over device child nodes

Drop the manual access to the fwnode of the device to iterate over its
child nodes. `device_for_each_child_node` macro provides direct access
to the child nodes, and given that they are only required within the
loop, the scoped variant of the macro can be used.

Use the `device_for_each_child_node_scoped` macro to iterate over the
direct child nodes of the device.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240808-device_child_node_access-v2-1-fc757cc76650@gmail.com
13 months agoMerge 6.11-rc4 into char-misc-next
Greg Kroah-Hartman [Mon, 19 Aug 2024 04:02:26 +0000 (06:02 +0200)]
Merge 6.11-rc4 into char-misc-next

We need the char/misc fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 months agoLinux 6.11-rc4
Linus Torvalds [Sun, 18 Aug 2024 20:17:27 +0000 (13:17 -0700)]
Linux 6.11-rc4

13 months agoMerge tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 18 Aug 2024 17:19:49 +0000 (10:19 -0700)]
Merge tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are two driver fixes for regressions from 6.11-rc1 due to the
  driver core change making a structure in a driver core callback const.

  These were missed by all testing EXCEPT for what Bart happened to be
  running, so I appreciate the fixes provided here for some
  odd/not-often-used driver subsystems that nothing else happened to
  catch.

  Both of these fixes have been in linux-next all week with no reported
  issues"

* tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  mips: sgi-ip22: Fix the build
  ARM: riscpc: ecard: Fix the build

13 months agoMerge tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sun, 18 Aug 2024 17:16:34 +0000 (10:16 -0700)]
Merge tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc fixes from Greg KH:
 "Here are some small char/misc fixes for 6.11-rc4 to resolve reported
  problems. Included in here are:

   - fastrpc revert of a change that broke userspace

   - xillybus fixes for reported issues

  Half of these have been in linux-next this week with no reported
  problems, I don't know if the last bit of xillybus driver changes made
  it in, but they are 'obviously correct' so will be safe :)"

* tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  char: xillybus: Check USB endpoints when probing device
  char: xillybus: Refine workqueue handling
  Revert "misc: fastrpc: Restrict untrusted app to attach to privileged PD"
  char: xillybus: Don't destroy workqueue from work item running on it

13 months agoMerge tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 18 Aug 2024 17:10:48 +0000 (10:10 -0700)]
Merge tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.11-rc4 to
  resolve some reported problems. Included in here are:

   - conmakehash.c userspace build issues

   - fsl_lpuart driver fix

   - 8250_omap revert for reported regression

   - atmel_serial rts flag fix

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

* tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  Revert "serial: 8250_omap: Set the console genpd always on if no console suspend"
  tty: atmel_serial: use the correct RTS flag.
  tty: vt: conmakehash: remove non-portable code printing comment header
  tty: serial: fsl_lpuart: mark last busy before uart_add_one_port

13 months agoMerge tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 18 Aug 2024 16:59:06 +0000 (09:59 -0700)]
Merge tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt driver fixes from Greg KH:
 "Here are some small USB and Thunderbolt driver fixes for 6.11-rc4 to
  resolve some reported issues. Included in here are:

   - thunderbolt driver fixes for reported problems

   - typec driver fixes

   - xhci fixes

   - new device id for ljca usb driver

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

* tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration
  usb: misc: ljca: Add Lunar Lake ljca GPIO HID to ljca_gpio_hids[]
  Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET"
  usb: typec: ucsi: Fix the return value of ucsi_run_command()
  usb: xhci: fix duplicate stall handling in handle_tx_event()
  usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
  thunderbolt: Mark XDomain as unplugged when router is removed
  thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write()