platform/kernel/linux-rpi.git
19 months agodrivers: mcb: fix resource leak in mcb_probe()
Zhengchao Shao [Fri, 2 Dec 2022 09:38:49 +0000 (01:38 -0800)]
drivers: mcb: fix resource leak in mcb_probe()

When probe hook function failed in mcb_probe(), it doesn't put the device.
Compiled test only.

Fixes: 7bc364097a89 ("mcb: Acquire reference to device in probe")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Link: https://lore.kernel.org/r/9f87de36bfb85158b506cb78c6fc9db3f6a3bad1.1669624063.git.johannes.thumshirn@wdc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 months agoMerge tag 'icc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc...
Greg Kroah-Hartman [Wed, 30 Nov 2022 17:41:36 +0000 (18:41 +0100)]
Merge tag 'icc-6.2-rc1' of git://git./linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 6.2

These are the interconnect changes for the 6.2-rc1 merge window consisting
of new drivers to enable both L3 and DDR scaling on sc8280xp platforms.
There are also a few miscellaneous fixes.

New osm-l3 driver:
- interconnect: qcom: osm-l3: Use platform-independent node ids
- interconnect: qcom: osm-l3: Squash common descriptors
- interconnect: qcom: osm-l3: Add per-core EPSS L3 support
- interconnect: qcom: osm-l3: Simplify osm_l3_set()
- dt-bindings: interconnect: Add sm8350, sc8280xp and generic OSM L3 compatibles
- dt-bindings: interconnect: qcom,msm8998-bwmon: Add sc8280xp bwmon instances

Fixes:
 - interconnect: qcom: icc-rpm: Remove redundant dev_err call
 - interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm
 - interconnect: qcom: sc7180: drop double space
 - interconnect: qcom: sc8180x: constify pointer to qcom_icc_node

Signed-off-by: Georgi Djakov <djakov@kernel.org>
* tag 'icc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: qcom: sc8180x: constify pointer to qcom_icc_node
  interconnect: qcom: sc7180: drop double space
  interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm
  interconnect: qcom: icc-rpm: Remove redundant dev_err call
  dt-bindings: interconnect: qcom,msm8998-bwmon: Add sc8280xp bwmon instances
  dt-bindings: interconnect: Add sm8350, sc8280xp and generic OSM L3 compatibles
  interconnect: qcom: osm-l3: Simplify osm_l3_set()
  interconnect: qcom: osm-l3: Add per-core EPSS L3 support
  interconnect: qcom: osm-l3: Squash common descriptors
  interconnect: qcom: osm-l3: Use platform-independent node ids
  dt-bindings: interconnect: qcom,msm8998-bwmon: Correct SC7280 CPU compatible

19 months agoMerge tag 'coresight-next-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Tue, 29 Nov 2022 12:22:45 +0000 (13:22 +0100)]
Merge tag 'coresight-next-v6.2' of git://git./linux/kernel/git/coresight/linux into char-misc-next

Suzuki writes:

coresight: Update for v6.2

CoreSight updatesfor v6.2 includes :

 - Support for ETMv4 probing on hotplugged CPUs
 - Fix TRBE driver for cpuhp state refcounting
 - Fix CTI driver NULL pointer dereferencing
 - Fix comment for repeated word

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
  coresight: etm4x: fix repeated words in comments
  coresight: cti: Fix null pointer error on CTI init before ETM
  coresight: trbe: remove cpuhp instance node before remove cpuhp state
  coresight: etm4x: add CPU hotplug support for probing

19 months agoMerge tag 'misc-habanalabs-next-2022-11-23' of https://git.kernel.org/pub/scm/linux...
Greg Kroah-Hartman [Tue, 29 Nov 2022 12:19:29 +0000 (13:19 +0100)]
Merge tag 'misc-habanalabs-next-2022-11-23' of https://git./linux/kernel/git/ogabbay/linux into char-misc-next

Oded writes:

This tag contains habanalabs driver changes for v6.2:

- New feature of graceful hard-reset. Instead of immediately killing the
  user-process when a command submission times out, we wait a bit and give
  the user-process notification and let it try to close things gracefully,
  with the ability to retrieve debug information.

- Enhance the EventFD mechanism. Add new events such as access to illegal
  address (RAZWI), page fault, device unavailable. In addition, change the
  event workqueue to be handled in a single-threaded workqueue.

- Allow the control device to work during reset of the ASIC, to enable
  monitoring applications to continue getting the data.

- Add handling for Gaudi2 with PCI revision 2.

- Reduce severity of prints due to power/thermal events.

- Change how we use the h/w to perform memory scrubbing in Gaudi2.

- Multiple bug fixes, refactors and renames.

* tag 'misc-habanalabs-next-2022-11-23' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (63 commits)
  habanalabs: fix VA range calculation
  habanalabs: fail driver load if EEPROM errors detected
  habanalabs: make print of engines idle mask more readable
  habanalabs: clear non-released encapsulated signals
  habanalabs: don't put context in hl_encaps_handle_do_release_sob()
  habanalabs: print context refcount value if hard reset fails
  habanalabs: add RMWREG32_SHIFTED to set a val within a mask
  habanalabs: fix rc when new CPUCP opcodes are not supported
  habanalabs/gaudi2: added memset for the cq_size register
  habanalabs: added return value check for hl_fw_dynamic_send_clear_cmd()
  habanalabs: increase the size of busy engines mask
  habanalabs/gaudi2: change memory scrub mechanism
  habanalabs: extend process wait timeout in device fine
  habanalabs: check schedule_hard_reset correctly
  habanalabs: reset device if still in use when released
  habanalabs/gaudi2: return to reset upon SM SEI BRESP error
  habanalabs/gaudi2: don't enable entries in the MSIX_GW table
  habanalabs/gaudi2: remove redundant firmware version check
  habanalabs/gaudi: fix print for firmware-alive event
  habanalabs: fix print for out-of-sync and pkt-failure events
  ...

19 months agocoresight: etm4x: fix repeated words in comments
Jilin Yuan [Wed, 19 Oct 2022 12:49:53 +0000 (20:49 +0800)]
coresight: etm4x: fix repeated words in comments

Delete the redundant word 'the'.

Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20221019124953.45885-1-yuanjilin@cdjrlc.com
19 months agocoresight: cti: Fix null pointer error on CTI init before ETM
Mike Leach [Wed, 23 Nov 2022 19:38:18 +0000 (19:38 +0000)]
coresight: cti: Fix null pointer error on CTI init before ETM

When CTI is discovered first then the function
coresight_set_assoc_ectdev_mutex() is called to set the association
between CTI and ETM device. Recent lockdep fix passes a null pointer.

This patch passes the correct pointer.

Before patch: log of boot oops sequence with CTI discovered first:

[   12.424091]  cs_system_cfg: CoreSight Configuration manager initialised
[   12.483474] coresight cti_sys0: CTI initialized
[   12.488109] coresight cti_sys1: CTI initialized
[   12.503594] coresight cti_cpu0: CTI initialized
[   12.517877] coresight-cpu-debug 850000.debug: Coresight debug-CPU0 initialized
[   12.523479] coresight-cpu-debug 852000.debug: Coresight debug-CPU1 initialized
[   12.529926] coresight-cpu-debug 854000.debug: Coresight debug-CPU2 initialized
[   12.541808] coresight stm0: STM32 initialized
[   12.544421] coresight-cpu-debug 856000.debug: Coresight debug-CPU3 initialized
[   12.585639] coresight cti_cpu1: CTI initialized
[   12.614028] coresight cti_cpu2: CTI initialized
[   12.631679] CSCFG registered etm0
[   12.633920] coresight etm0: CPU0: etm v4.0 initialized
[   12.656392] coresight cti_cpu3: CTI initialized

...

[   12.708383] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000348

...

[   12.755094] Internal error: Oops: 0000000096000044 [#1] SMP
[   12.761817] Modules linked in: coresight_etm4x(+) coresight_tmc coresight_cpu_debug coresight_replicator coresight_funnel coresight_cti coresight_tpiu coresight_stm coresight
[   12.767210] CPU: 3 PID: 1346 Comm: systemd-udevd Not tainted 6.1.0-rc3tid-v6tid-v6-235166-gf7f7d7a2204a-dirty #498
[   12.782827] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[   12.793154] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   12.800010] pc : coresight_set_assoc_ectdev_mutex+0x30/0x50 [coresight]
[   12.806694] lr : coresight_set_assoc_ectdev_mutex+0x30/0x50 [coresight]

...

[   12.885064] Call trace:
[   12.892352]  coresight_set_assoc_ectdev_mutex+0x30/0x50 [coresight]
[   12.894693]  cti_add_assoc_to_csdev+0x144/0x1b0 [coresight_cti]
[   12.900943]  coresight_register+0x2c8/0x320 [coresight]
[   12.906844]  etm4_add_coresight_dev.isra.27+0x148/0x280 [coresight_etm4x]
[   12.912056]  etm4_probe+0x144/0x1c0 [coresight_etm4x]
[   12.918998]  etm4_probe_amba+0x40/0x78 [coresight_etm4x]
[   12.924032]  amba_probe+0x11c/0x1f0

After patch: similar log

[   12.444467]  cs_system_cfg: CoreSight Configuration manager initialised
[   12.456329] coresight-cpu-debug 850000.debug: Coresight debug-CPU0 initialized
[   12.456754] coresight-cpu-debug 852000.debug: Coresight debug-CPU1 initialized
[   12.469672] coresight-cpu-debug 854000.debug: Coresight debug-CPU2 initialized
[   12.476098] coresight-cpu-debug 856000.debug: Coresight debug-CPU3 initialized
[   12.532409] coresight stm0: STM32 initialized
[   12.533708] coresight cti_sys0: CTI initialized
[   12.539478] coresight cti_sys1: CTI initialized
[   12.550106] coresight cti_cpu0: CTI initialized
[   12.633931] coresight cti_cpu1: CTI initialized
[   12.634664] coresight cti_cpu2: CTI initialized
[   12.638090] coresight cti_cpu3: CTI initialized
[   12.721136] CSCFG registered etm0

...

[   12.762643] CSCFG registered etm1
[   12.762666] coresight etm1: CPU1: etm v4.0 initialized
[   12.776258] CSCFG registered etm2
[   12.776282] coresight etm2: CPU2: etm v4.0 initialized
[   12.784357] CSCFG registered etm3
[   12.785455] coresight etm3: CPU3: etm v4.0 initialized

Error can also be triggered by manually starting the modules using modprobe
in the following order:

root@linaro-developer:/home/linaro/cs-mods# modprobe coresight
root@linaro-developer:/home/linaro/cs-mods# modprobe coresight-cti
root@linaro-developer:/home/linaro/cs-mods# modprobe coresight-etm4x

Tested on Dragonboard DB410c
Applies to coresight/next

Fixes: 23722fb46725 ("coresight: Fix possible deadlock with lock dependency")
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20221123193818.6253-1-mike.leach@linaro.org
19 months agocoresight: trbe: remove cpuhp instance node before remove cpuhp state
Yang Shen [Tue, 22 Nov 2022 09:03:55 +0000 (17:03 +0800)]
coresight: trbe: remove cpuhp instance node before remove cpuhp state

cpuhp_state_add_instance() and cpuhp_state_remove_instance() should
be used in pairs. Or there will lead to the warn on
cpuhp_remove_multi_state() since the cpuhp_step list is not empty.

The following is the error log with 'rmmod coresight-trbe':
Error: Removing state 215 which has instances left.
Call trace:
  __cpuhp_remove_state_cpuslocked+0x144/0x160
  __cpuhp_remove_state+0xac/0x100
  arm_trbe_device_remove+0x2c/0x60 [coresight_trbe]
  platform_remove+0x34/0x70
  device_remove+0x54/0x90
  device_release_driver_internal+0x1e4/0x250
  driver_detach+0x5c/0xb0
  bus_remove_driver+0x64/0xc0
  driver_unregister+0x3c/0x70
  platform_driver_unregister+0x20/0x30
  arm_trbe_exit+0x1c/0x658 [coresight_trbe]
  __arm64_sys_delete_module+0x1ac/0x24c
  invoke_syscall+0x50/0x120
  el0_svc_common.constprop.0+0x58/0x1a0
  do_el0_svc+0x38/0xd0
  el0_svc+0x2c/0xc0
  el0t_64_sync_handler+0x1ac/0x1b0
  el0t_64_sync+0x19c/0x1a0
 ---[ end trace 0000000000000000 ]---

Fixes: 3fbf7f011f24 ("coresight: sink: Add TRBE driver")
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Yang Shen <shenyang39@huawei.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20221122090355.23533-1-shenyang39@huawei.com
19 months agoMerge tag 'counter-fixes-for-6.1b' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Mon, 28 Nov 2022 18:17:56 +0000 (19:17 +0100)]
Merge tag 'counter-fixes-for-6.1b' of git://git./linux/kernel/git/wbg/counter into char-misc-next

William writes:

Second set of Counter fixes for 6.1

One change for stm32-lptimer-cnt fixing a check on arr and cmp registers
update to ensure both registers are properly written before ending the
loop.

* tag 'counter-fixes-for-6.1b' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
  counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update

19 months agoMerge tag 'iio-fixes-for-6.1d' of https://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sun, 27 Nov 2022 14:05:05 +0000 (15:05 +0100)]
Merge tag 'iio-fixes-for-6.1d' of https://git./linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

4th set of IIO fixes for 6.1

Single patch fixing a memory leak in an error path.
Fine to queue either for 6.2 if too late for 6.1

* tag 'iio-fixes-for-6.1d' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
  iio: fix memory leak in iio_device_register_eventset()
  dt-bindings: iio: adc: Remove the property "aspeed,trim-data-valid"
  iio: adc: aspeed: Remove the trim valid dts property.
  iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
  iio: accel: bma400: Fix memory leak in bma400_get_steps_reg()
  iio: light: rpr0521: add missing Kconfig dependencies
  iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
  iio: health: afe4403: Fix oob read in afe4403_read_raw
  iio: light: apds9960: fix wrong register for gesture gain

19 months agoMerge tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 27 Nov 2022 13:40:05 +0000 (14:40 +0100)]
Merge tag 'iio-for-6.2b' of https://git./linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

2nd set of IIO new device support, cleanups etc for 6.2

Includes a few late breaking fixes for old issues.

Contains a large set of conversions from i2c probe() to probe_new()
as part of an attempt to finally get rid of the old style probe().

New devices support
* adi,ad74115
  - New driver for this complex input/output device with 16 bit ADCs,
    14 bit DACs amongst other features.
  - A few tidy ups / removal of unused data patches followed.
* adi,adf4377
  - New driver for this dual output integer-N phased locked loop and VCO
    chip.
* maxim,max30208
  - New driver for this high accuracy digital temperature sensor.
* st,lsm6dsx
  - Support for LSM6DS016IS (chip specific data)
  - Support for ISM330IS (id entry only)

Minor cleanups etc
* adi,adis
  - Fix a deadlock on device instance specific mutex.
  - Tidy up by calling unlocked form of __adis_initial_startup() in all
    cases and dropping the locked version.
* adi,ad4130
  - Reference spi-peripehral-props.yaml in the dt-binding.
* adi,ad74413r
  - Fix a bug brought on by integer promotion of signed value to unsigned type.
  - Add an spi_device_id table to allow module autoloading to work.
  - Add support for reset pin.
* adi,ad7606_par
  - devm_platform_get_and_ioremap_resource() instead of opencoding.
* adi,ad7923
  - Add dt-bindings docs for ad7927 via a fallback to ad7928 and do similar
    for ad7924.
* adi,ltc2983
  - Drop a now unneeded $ref for -nanoamp property as dt-schema no covers this
    unit.
* maxim,max11410
  - Fix mask due to repeated use of VREFN instead of one of them being VREFP.
* qcom,spmi-iadc
  - Add fallback compatibles to dt-binding.
* renesas,rzg2l
  - Document use for RZ/Five SoC.
* st,stm32-adc
  - Improved calibration support with error logging and a debugfs
    interface to read back the result.
* ti,adc128s052
  - Fix an issue with missing data members in the adc128_of_match table that
    meant all device were being handled as adc128s052 ADCs.

* tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (178 commits)
  iio: addac: ad74413r: fix blank line after declaration warning
  iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl
  dt-bindings: iio: imu: st_lsm6dsx: add ism330is
  iio: imu: st_lsm6dsx: add support to ISM330IS
  iio: frequency: adf4377: add support for ADF4377
  dt-bindings: iio: frequency: add adf4377 doc
  dt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml
  dt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties
  dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC
  iio: adc128s052: add proper .data members in adc128_of_match table
  iio: adc: stm32-adc: add debugfs to read raw calibration result
  iio: adc: stm32-adc: improve calibration error log
  iio: adc: stm32-adc: smart calibration support
  iio: addac: ad74413r: add support for reset-gpio
  dt-bindings: iio: ad74413r: add optional reset-gpios
  iio: addac: ad74413r: add spi_device_id table
  dt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles
  dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is
  iio: imu: st_lsm6dsx: add support to LSM6DSO16IS
  iio: addac: add AD74115 driver
  ...

19 months agocounter: stm32-lptimer-cnt: fix the check on arr and cmp registers update
Fabrice Gasnier [Wed, 23 Nov 2022 13:36:09 +0000 (14:36 +0100)]
counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update

The ARR (auto reload register) and CMP (compare) registers are
successively written. The status bits to check the update of these
registers are polled together with regmap_read_poll_timeout().
The condition to end the loop may become true, even if one of the register
isn't correctly updated.
So ensure both status bits are set before clearing them.

Fixes: d8958824cf07 ("iio: counter: Add support for STM32 LPTimer")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20221123133609.465614-1-fabrice.gasnier@foss.st.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
20 months agomisc: fastrpc: Add dma_mask to fastrpc_channel_ctx
Abel Vesa [Fri, 25 Nov 2022 07:14:05 +0000 (07:14 +0000)]
misc: fastrpc: Add dma_mask to fastrpc_channel_ctx

dma_set_mask_and_coherent only updates the mask to which the device
dma_mask pointer points to. Add a dma_mask to the channel ctx and set
the device dma_mask to point to that, otherwise the dma_set_mask will
return an error and the dma_set_coherent_mask will be skipped too.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Add mmap request assigning for static PD pool
Abel Vesa [Fri, 25 Nov 2022 07:14:04 +0000 (07:14 +0000)]
misc: fastrpc: Add mmap request assigning for static PD pool

If the mmap request is to add pages and thre are VMIDs associated with
that context, do a call to SCM to reassign that memory. Do not do this
for remote heap allocation, that is done on init create static process
only.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Safekeep mmaps on interrupted invoke
Abel Vesa [Fri, 25 Nov 2022 07:14:03 +0000 (07:14 +0000)]
misc: fastrpc: Safekeep mmaps on interrupted invoke

If the userspace daemon is killed in the middle of an invoke (e.g.
audiopd listerner invoke), we need to skip the unmapping on device
release, otherwise the DSP will crash. So lets safekeep all the maps
only if there is in invoke interrupted, by attaching them to the channel
context (which is resident until RPMSG driver is removed), and free them
on RPMSG driver remove.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Add support for audiopd
Abel Vesa [Fri, 25 Nov 2022 07:14:02 +0000 (07:14 +0000)]
misc: fastrpc: Add support for audiopd

In order to be able to start the adsp listener for audiopd using adsprpcd,
we need to add the corresponding ioctl for creating a static process.
On that ioctl call we need to allocate the heap. Allocating the heap needs
to be happening only once and needs to be kept between different device
open calls, so attach it to the channel context to make sure that remains
until the RPMSG driver is removed. Then, if there are any VMIDs associated
with the static ADSP process, do a call to SCM to assign it.
And then, send all the necessary info related to heap to the DSP.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Rework fastrpc_req_munmap
Abel Vesa [Fri, 25 Nov 2022 07:14:01 +0000 (07:14 +0000)]
misc: fastrpc: Rework fastrpc_req_munmap

Move the lookup of the munmap request to the fastrpc_req_munmap and pass
on only the buf to the lower level fastrpc_req_munmap_impl. That way
we can use the lower level fastrpc_req_munmap_impl on error path in
fastrpc_req_mmap to free the buf without searching for the munmap
request it belongs to.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail
Abel Vesa [Fri, 25 Nov 2022 07:14:00 +0000 (07:14 +0000)]
misc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail

Move the kref_init right after the allocation so that we can use
fastrpc_map_put on any following error case.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Add fastrpc_remote_heap_alloc
Abel Vesa [Fri, 25 Nov 2022 07:13:59 +0000 (07:13 +0000)]
misc: fastrpc: Add fastrpc_remote_heap_alloc

Split fastrpc_buf_alloc in such a way it allows allocation of remote
heap too and add fastrpc_remote_heap_alloc to do so.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Add reserved mem support
Abel Vesa [Fri, 25 Nov 2022 07:13:58 +0000 (07:13 +0000)]
misc: fastrpc: Add reserved mem support

The reserved mem support is needed for CMA heap support, which will be
used by AUDIOPD.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agomisc: fastrpc: Rename audio protection domain to root
Abel Vesa [Fri, 25 Nov 2022 07:13:57 +0000 (07:13 +0000)]
misc: fastrpc: Rename audio protection domain to root

The AUDIO_PD will be done via static pd, so the proper name here is
actually ROOT_PD.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agodt-bindings: misc: qcom,fastrpc: increase allowed iommus entries
Abel Vesa [Fri, 25 Nov 2022 07:13:56 +0000 (07:13 +0000)]
dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries

The fastrpc components on the SM8550 SoC can require up to 3 IOMMU
entries, this bumps the maxItems to 3 for this purpose.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoMerge tag 'iio-for-6.2a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Fri, 25 Nov 2022 17:35:16 +0000 (18:35 +0100)]
Merge tag 'iio-for-6.2a-take2' of https://git./linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

1st set of IIO new device support, feature and cleanup for 6.2 (take2)

We have finally managed to take the mlock mutex entirely private so as
to avoid it being used for multiple purposes.  Now it is just used to
protect device mode transitions (typically to and from buffered capture).

Includes merge of an immutable i2c branch to get the new
i2c_client_get_device_id() (thanks to Wolfram for providing the branch).

Based on rc3 to pick up some precursor fixes from early in the cycle and
avoid an unnecessarily messy history.

New device support
* adi,ad4310
  - New driver to support this very flexible measurement device including
    a 24 bit ADC. Later fix for documentation build issue.
* adi,adxl355
  - Add support of the ADXL359 accelerometer.
* adi,ltc2983
  - Support additional variants of the temperatures sensor:
    LTC2984 with an EEPROM
    LTC2985, LTC2986 with only 10 channels.
* invensense,icm42600
  - Add support for icm42631 (needed only ID and WHOAMI)
* kionix,kx022a
  - New driver for this 3 axis accelerometer.
* maxim,max11401
  - New driver to support this 24-bit 10 channel ADC.
    Includes some new ABI to support configuration of notch filters.
* mediatek,mt6370
  - Add new driver to support the ADC part of the mt6370.
* st,lsm6dsx
  - Add support for LSM6DSV accelerometer and gyroscope. Simple additional
    of chip specific data and IDs.
  - Add support for LSM6DSV16X accelerometer and gyroscope.  Compatible with
    features currently implemented for the LSM6DSV.
* st,stm32-adc
  - Add support for stm32pm13x SoCs.

core / subsystem wide:
 - Add new IIO_STATIC_CONST_DEVICE_ATTR() which is a dance necessary to
   allow for the wrapping of attributes in the code that duplicates them
   for multiple buffers.
 - Harden against future issues with expectation that all buffer attributes
   are iio_dev_attrs by changing the code to take an array of pointers
   of the correct type.
 - Last transitions of drivers to local locks rather than missuses of mlock.
 - Add an iio_device_claim_buffer_mode() callback to avoid a race in the
   max30100 driver without directly using mlock.
 - Move mlock to the opaque IIO device structure to prevent misuse.
 - Add missing spi_device_id tables to support auto loading of modules.
 - Update some ADI maintainers in DT bindings.
 - A few more moves of bus drivers and core module sets to export
   name spaces.
 - Extensive use of new devm_regulator_get_enable() and friends.
 - Switch a bunch of i2c drivers to probe_new() including the bmp280
   which makes use of the new i2c_client_get_device_id() helper to
   simplify this change.

dt-bindings:
 - More use of spi-peripheral-props.yaml.

Features
* freescale,mpl115
  - Use runtime PM to implement shutdown GPIO support.
* melexis,mlx90632
  - More sophisticated runtime power management
  - Provide access to sampling frequency.
  - Trivial follow up fixes.
* microchip,mcp3911
  - Support control of PGA.
* st,lsm6dsx
  - Add support for software triggers for cases where the IRQ lines
    are not wired up.
* vishay,vcnl4000
  - Add control of integration time.

Minor cleanups and fixes
* adi,ad4130
  - Improve ABI documentation formatting.
  - Kconfig dependency fixup.
* adi,ad5758
  - Minor dt binding fix.
* adi,ad9834
  - Tidy up line breaks.
* adi,ade7854
  - Minor improvement in code clarity by replacing a ternary.
* adi,admv8818
  - Harden code against hardware returning wrong values.
* adi,adxl355
  - Warn only if unknown device ID detected to allow for fall back
    device tree compatibles on future devices.
* adi,ltc2983
  - dt-bindings clarifications and general improvements.
  - Ensure DMA safe buffer for bulk writes without relying on current
    regmap implementation choices.
* avago,adps9960
  - Fix up a disconnect between event enable attributes and what was
    enabled.
* bosch,bma400
  - Switch to dev_err_probe() from open coded EPROBE_DEFER handling.
* cosmic,cc10001
  - Fully devm managed probe() and related tidying up.
* meas,ms5611
  - Add an example of spi-max-frequency.
* meleixs,mlx90632
  - Tidy up confusing error return value.
  - Style improvements.
* multiplexer
  - Switch to dev_err_probe() from open coded EPROBE_DEFER handling.
* qcom,spmi-vadc
  - Minor dt binding improvements.
* rockchip,saradc
  - Add ID for rv1126.
* semtech,sx9360
  - Add SAMM0208 ACPI ID. Doesn't appear to be a valid vendor prefix
    but is in the wild.
* st,lsm6dsx
  - Factor out common code as _device_set_enable().
  - Fix up wrong docs after LSM6DSV addition.
* st,stm32-adc
  - Manage the min sampling time on all internal channels.
* trig,sysfs
  - Improve error labels.

* tag 'iio-for-6.2a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (146 commits)
  iio: pressure: bmp280: convert to i2c's .probe_new()
  iio: imu: st_lsm6dsx: fix LSM6DSV sensor description
  iio: adc: ad4130: depend on GPIOLIB
  staging: iio: meter: replace ternary operator by if condition
  iio: light: apds9960: Fix iio_event_spec structures
  dt-bindings: iio: imu: Add inv_icm42600 documentation
  iio: imu: inv_icm42600: Add support for icm42631
  dt-bindings: iio: adc: rockchip-saradc: Add saradc for rv1126
  dt-bindings: iio: dac: adi,ad5758: Drop 'contains' from 'adi,dc-dc-mode'
  dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv16x
  iio: imu: st_lsm6dsx: add support to LSM6DSV16X
  iio: proximity: sx9360: Add a new ACPI hardware ID
  iio: temperature: mlx90632: Add missing static marking on devm_pm_ops
  iio: temperature: mlx90632: Add error handling for devm_pm_runtime_enable()
  iio: temperature: ltc2983: support more parts
  dt-bindings: iio: temperature: ltc2983: support more parts
  dt-bindings: iio: temperature: ltc2983: use generic node name in example
  dt-bindings: iio: temperature: ltc2983: describe broken mux delay property
  dt-bindings: iio: temperature: ltc2983: refine descriptions
  dt-bindings: iio: temperature: ltc2983: change default excitation for custom thermistors
  ...

20 months agoiio: addac: ad74413r: fix blank line after declaration warning
Cosmin Tanislav [Thu, 24 Nov 2022 15:30:49 +0000 (17:30 +0200)]
iio: addac: ad74413r: fix blank line after declaration warning

Checkpatch wants a blank line after all declarations. Add it now,
even though the patch has already been submitted.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20221124153049.8851-1-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl
Cosmin Tanislav [Thu, 24 Nov 2022 15:25:59 +0000 (17:25 +0200)]
iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl

This table was supposed to be used for handling the DAC rate, but it
ended up being unused. Remove it.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20221124152559.7895-1-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: imu: st_lsm6dsx: add ism330is
Lorenzo Bianconi [Thu, 24 Nov 2022 08:49:28 +0000 (09:49 +0100)]
dt-bindings: iio: imu: st_lsm6dsx: add ism330is

Add device bindings for ism330is IMU sensor.
Use lsm6dso16is as fallback device for ism330is since it implements all the
features currently supported by ism330is.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/a7a8a00037952928364269615ee8b6da4547795b.1669279604.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: imu: st_lsm6dsx: add support to ISM330IS
Lorenzo Bianconi [Thu, 24 Nov 2022 08:49:27 +0000 (09:49 +0100)]
iio: imu: st_lsm6dsx: add support to ISM330IS

Add support to STM ISM330IS (accelerometer and gyroscope) Mems sensor.
The ISM330IS sensor can use LSM6DSO16IS as fallback device since it
implements all the ISM330IS features currently implemented in
st_lsm6dsx.

Datasheet: https://www.st.com/resource/en/datasheet/ism330is.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/4cd1614060e06f49cd92f5930d8fd40117c07920.1669279604.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: frequency: adf4377: add support for ADF4377
Antoniu Miclaus [Tue, 15 Nov 2022 11:00:41 +0000 (13:00 +0200)]
iio: frequency: adf4377: add support for ADF4377

The ADF4377 is a high performance, ultralow jitter, dual output integer-N
phased locked loop (PLL) with integrated voltage controlled oscillator
(VCO) ideally suited for data converter and mixed signal front end (MxFE)
clock applications.

Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adf4377.pdf
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221115110041.71495-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: frequency: add adf4377 doc
Antoniu Miclaus [Tue, 15 Nov 2022 11:00:40 +0000 (13:00 +0200)]
dt-bindings: iio: frequency: add adf4377 doc

Add device tree bindings for the ADF4377 driver.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221115110041.71495-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml
Cosmin Tanislav [Tue, 15 Nov 2022 15:19:55 +0000 (17:19 +0200)]
dt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml

Reference the "spi-peripheral-props.yaml" schema to allow using
all SPI device properties.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221115151955.394030-1-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties
Cosmin Tanislav [Tue, 15 Nov 2022 15:16:53 +0000 (17:16 +0200)]
dt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties

Currently there are -nanoamp properties both with and without a $ref.
dt-schema has been modified to handle it as a standard unit, but the
change has been reverted since there were still occurrences of
-nanoamp properties with a $ref.
Remove this since it's the only occurrence left.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221115151653.393559-1-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC
Lad Prabhakar [Tue, 15 Nov 2022 12:41:28 +0000 (12:41 +0000)]
dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC

The ADC block on the RZ/Five SoC is identical to one found on the RZ/G2UL
SoC. "renesas,r9a07g043-adc" compatible string will be used on the RZ/Five
SoC so to make this clear, update the comment to include RZ/Five SoC.

No driver changes are required as generic compatible string
"renesas,rzg2l-adc" will be used as a fallback on RZ/Five SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20221115124128.1183144-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: adc128s052: add proper .data members in adc128_of_match table
Rasmus Villemoes [Tue, 15 Nov 2022 13:23:23 +0000 (14:23 +0100)]
iio: adc128s052: add proper .data members in adc128_of_match table

Prior to commit bd5d54e4d49d ("iio: adc128s052: add ACPI _HID
AANT1280"), the driver unconditionally used spi_get_device_id() to get
the index into the adc128_config array.

However, with that commit, OF-based boards now incorrectly treat all
supported sensors as if they are an adc128s052, because all the .data
members of the adc128_of_match table are implicitly 0. Our board,
which has an adc122s021, thus exposes 8 channels whereas it really
only has two.

Fixes: bd5d54e4d49d ("iio: adc128s052: add ACPI _HID AANT1280")
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221115132324.1078169-1-linux@rasmusvillemoes.dk
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: adc: stm32-adc: add debugfs to read raw calibration result
Olivier Moysan [Tue, 15 Nov 2022 10:31:23 +0000 (11:31 +0100)]
iio: adc: stm32-adc: add debugfs to read raw calibration result

Add debugfs to read linear ADC STM32 self calibration results.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20221115103124.70074-4-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: adc: stm32-adc: improve calibration error log
Olivier Moysan [Tue, 15 Nov 2022 10:31:22 +0000 (11:31 +0100)]
iio: adc: stm32-adc: improve calibration error log

Add more information in calibration error log to differentiate
single-ended and differential calibration.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20221115103124.70074-3-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: adc: stm32-adc: smart calibration support
Olivier Moysan [Tue, 15 Nov 2022 10:31:21 +0000 (11:31 +0100)]
iio: adc: stm32-adc: smart calibration support

Add smart calibration support for STM32MP1.
- STM32MP15x: both linear & offset calibration are supported
- STM32MP13x: Only offset calibration is supported

Linear calibration:
Linear calibration is SoC dependent and does not change over time
so it can be done only once.
Linear calibration may have already been done in u-boot.
Skip calibration execution if calibration data are already available.
Save calibration factors in private data and restore them from private
data on next ADC start.

Offset calibration:
This calibration may vary over time, depending on temperature or voltage.
Run offset single-ended and differential calibration on each ADC start,
as it is not time consuming. This calibration do not need to be saved.
So, remove calfact_s and calfact_d value and bitfields that are no
longer used.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20221115103124.70074-2-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: addac: ad74413r: add support for reset-gpio
Rasmus Villemoes [Tue, 15 Nov 2022 09:55:17 +0000 (10:55 +0100)]
iio: addac: ad74413r: add support for reset-gpio

We have a board where the reset pin of the ad74412 is connected to a
gpio, but also pulled low (i.e., asserted) by default. Hence to get
the chip out of reset, the driver needs to know about that gpio and
deassert the reset signal before attempting to communicate with the
chip.

When a reset-gpio is given in device tree, use that instead of the
software reset. According to the data sheet, the two methods are
functionally equivalent.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20221115095517.1008632-4-linux@rasmusvillemoes.dk
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: ad74413r: add optional reset-gpios
Rasmus Villemoes [Tue, 15 Nov 2022 09:55:16 +0000 (10:55 +0100)]
dt-bindings: iio: ad74413r: add optional reset-gpios

The ad74412 and ad74413 devices have an active-low reset pin. Add a
binding allowing one to specify a gpio tied to that.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221115095517.1008632-3-linux@rasmusvillemoes.dk
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: addac: ad74413r: add spi_device_id table
Rasmus Villemoes [Tue, 15 Nov 2022 09:55:15 +0000 (10:55 +0100)]
iio: addac: ad74413r: add spi_device_id table

Silence the run-time warning

  SPI driver ad74413r has no spi_device_id for adi,ad74412r

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20221115095517.1008632-2-linux@rasmusvillemoes.dk
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles
Luca Weiss [Mon, 31 Oct 2022 18:24:54 +0000 (19:24 +0100)]
dt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles

As in other bindings, let's use specific compatibles together with the
fallback compatible. Adjust the bindings for it.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221031182456.952648-1-luca@z3ntu.xyz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is
Lorenzo Bianconi [Wed, 16 Nov 2022 13:40:04 +0000 (14:40 +0100)]
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is

Add device bindings for lsm6dso16is IMU sensor.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/55b15b3e8453a12edcf8195ef9c9243a76f87096.1668605631.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: imu: st_lsm6dsx: add support to LSM6DSO16IS
Lorenzo Bianconi [Wed, 16 Nov 2022 13:40:03 +0000 (14:40 +0100)]
iio: imu: st_lsm6dsx: add support to LSM6DSO16IS

Add support to STM LSM6DSO16IS (accelerometer and gyroscope) Mems sensor.

Datasheet: https://www.st.com/resource/en/datasheet/lsm6dso16is.pdf
Tested-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/df6a9d4653cd69f7204190f8b6a9b618fd48bd23.1668605631.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: addac: add AD74115 driver
Cosmin Tanislav [Thu, 17 Nov 2022 08:09:16 +0000 (10:09 +0200)]
iio: addac: add AD74115 driver

The AD74115H is a single-channel, software-configurable, input and
output device for industrial control applications. The AD74115H
provides a wide range of use cases, integrated on a single chip.

These use cases include analog output, analog input, digital output,
digital input, resistance temperature detector (RTD), and thermocouple
measurement capability. The AD74115H also has an integrated HART modem.

A serial peripheral interface (SPI) is used to handle all communications
to the device, including communications with the HART modem. The digital
input and digital outputs can be accessed via the SPI or the
general-purpose input and output (GPIO) pins to support higher
speed data rates.

The device features a 16-bit, sigma-delta analog-to-digital converter
(ADC) and a 14-bit digital-to-analog converter (DAC).
The AD74115H contains a high accuracy 2.5 V on-chip reference that can
be used as the DAC and ADC reference.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20221117080916.411766-3-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: addac: add AD74115
Cosmin Tanislav [Thu, 17 Nov 2022 08:09:15 +0000 (10:09 +0200)]
dt-bindings: iio: addac: add AD74115

The AD74115H is a single-channel, software-configurable, input and
output device for industrial control applications. The AD74115H
provides a wide range of use cases, integrated on a single chip.

These use cases include analog output, analog input, digital output,
digital input, resistance temperature detector (RTD), and thermocouple
measurement capability. The AD74115H also has an integrated HART modem.

A serial peripheral interface (SPI) is used to handle all communications
to the device, including communications with the HART modem. The digital
input and digital outputs can be accessed via the SPI or the
general-purpose input and output (GPIO) pins to support higher
speed data rates.

The device features a 16-bit, sigma-delta analog-to-digital converter
(ADC) and a 14-bit digital-to-analog converter (DAC).
The AD74115H contains a high accuracy 2.5 V on-chip reference that can
be used as the DAC and ADC reference.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221117080916.411766-2-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: addac: ad74413r: fix integer promotion bug in ad74413_get_input_current_offset()
Rasmus Villemoes [Fri, 18 Nov 2022 12:32:08 +0000 (13:32 +0100)]
iio: addac: ad74413r: fix integer promotion bug in ad74413_get_input_current_offset()

The constant AD74413R_ADC_RESULT_MAX is defined via GENMASK, so its
type is "unsigned long".

Hence in the expression voltage_offset * AD74413R_ADC_RESULT_MAX,
voltage_offset is first promoted to unsigned long, and since it may be
negative, that results in a garbage value. For example, when range is
AD74413R_ADC_RANGE_5V_BI_DIR, voltage_offset is -2500 and
voltage_range is 5000, so the RHS of this assignment is, depending on
sizeof(long), either 826225UL or 3689348814709142UL, which after
truncation to int then results in either 826225 or 1972216214 being
the output from in_currentX_offset.

Casting to int avoids that promotion and results in the correct -32767
output.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Fixes: fea251b6a5db (iio: addac: add AD74413R driver)
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221118123209.1658420-1-linux@rasmusvillemoes.dk
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: use devm_platform_get_and_ioremap_resource()
Minghao Chi [Tue, 22 Nov 2022 01:35:33 +0000 (09:35 +0800)]
iio: use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/202211220935338446115@zte.com.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: imu: adis: Remove adis_initial_startup function
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:57 +0000 (10:27 +0200)]
iio: imu: adis: Remove adis_initial_startup function

Remove adis_initial_startup function since it is not used
anymore.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-10-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agostaging: iio: accel: adis16240: Call '__adis_initial_startup()'
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:56 +0000 (10:27 +0200)]
staging: iio: accel: adis16240: Call '__adis_initial_startup()'

Call '__adis_initial_startup()' instead of its locked variant in
'adis16240_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-9-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agostaging: iio: accel: adis16203: Call '__adis_initial_startup()'
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:55 +0000 (10:27 +0200)]
staging: iio: accel: adis16203: Call '__adis_initial_startup()'

Call '__adis_initial_startup()' instead of its locked variant in
'adis16203_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-8-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: imu: adis16400: Call '__adis_initial_startup()' in probe
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:54 +0000 (10:27 +0200)]
iio: imu: adis16400: Call '__adis_initial_startup()' in probe

Call '__adis_initial_startup()' instead of its locked variant in
'adis16400_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-7-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: gyro: adis16260: Call '__adis_initial_startup()' in probe
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:53 +0000 (10:27 +0200)]
iio: gyro: adis16260: Call '__adis_initial_startup()' in probe

Call '__adis_initial_startup()' instead of its locked variant in
'adis16260_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-6-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: gyro: adis16136: Call '__adis_initial_startup()' in probe
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:52 +0000 (10:27 +0200)]
iio: gyro: adis16136: Call '__adis_initial_startup()' in probe

Call '__adis_initial_startup()' instead of its locked variant in
'adis16136_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-5-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: accel: adis16209: Call '__adis_initial_startup()' in probe
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:51 +0000 (10:27 +0200)]
iio: accel: adis16209: Call '__adis_initial_startup()' in probe

Call '__adis_initial_startup()' instead of its locked variant in
'adis16209_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-4-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: accel: adis16201: Call '__adis_initial_startup()' in probe
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:50 +0000 (10:27 +0200)]
iio: accel: adis16201: Call '__adis_initial_startup()' in probe

Call '__adis_initial_startup()' instead of its locked variant in
'adis16201_probe()'.
The locks are not needed at this point.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-3-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: adis: add '__adis_enable_irq()' implementation
Ramona Bolboaca [Tue, 22 Nov 2022 08:27:49 +0000 (10:27 +0200)]
iio: adis: add '__adis_enable_irq()' implementation

Add '__adis_enable_irq()' implementation which is the unlocked
version of 'adis_enable_irq()'.
Call '__adis_enable_irq()' instead of 'adis_enable_irq()' from
'__adis_intial_startup()' to keep the expected unlocked functionality.

This fix is needed to remove a deadlock for all devices which are
using 'adis_initial_startup()'. The deadlock occurs because the
same mutex is acquired twice, without releasing it.
The mutex is acquired once inside 'adis_initial_startup()', before
calling '__adis_initial_startup()', and once inside
'adis_enable_irq()', which is called by '__adis_initial_startup()'.
The deadlock is removed by calling '__adis_enable_irq()', instead of
'adis_enable_irq()' from within '__adis_initial_startup()'.

Fixes: b600bd7eb3335 ("iio: adis: do not disabe IRQs in 'adis_init()'")
Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-2-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: adc: max11410: fix incomplete vref buffer mask
Ibrahim Tilki [Tue, 22 Nov 2022 11:47:18 +0000 (14:47 +0300)]
iio: adc: max11410: fix incomplete vref buffer mask

VREFP bit was missing from channel configuration mask and VREFN bit was
included twice instead which fails to enable positive reference buffer when
requested by a channel. Channels that don't enable vrefp buffer were not
affected.

Fixes: a44ef7c46097 ("iio: adc: add max11410 adc driver")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Ibrahim Tilki <Ibrahim.Tilki@analog.com>
Link: https://lore.kernel.org/r/20221122114718.17557-1-Ibrahim.Tilki@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agodt-bindings: iio: adc: ad7923: adjust documentation
Edmund Berenson [Tue, 22 Nov 2022 16:14:37 +0000 (17:14 +0100)]
dt-bindings: iio: adc: ad7923: adjust documentation

- The ad7927 is fully compatible with ad7928 driver, add
documentation for device.
- ad7923 and ad7924 are treated the same in the driver, show
the relationship in the documentation.

Suggested-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221122161437.18937-1-edmund.berenson@emlix.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: Add driver support for Maxim MAX30208
Rajat Khandelwal [Tue, 22 Nov 2022 17:53:00 +0000 (23:23 +0530)]
iio: temperature: Add driver support for Maxim MAX30208

Maxim MAX30208 is a digital temperature sensor with 0.1°C accuracy.

Add support for max30208 driver in iio subsystem.

Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX30208.pdf
Signed-off-by: Rajat Khandelwal <rajat.khandelwal@linux.intel.com>
Link: https://lore.kernel.org/r/20221122175300.800956-1-rajat.khandelwal@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agostaging: iio: ade7854: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:45:02 +0000 (23:45 +0100)]
staging: iio: ade7854: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-569-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agostaging: iio: ad5933: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:45:01 +0000 (23:45 +0100)]
staging: iio: ad5933: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-568-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agostaging: iio: adt7316: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:45:00 +0000 (23:45 +0100)]
staging: iio: adt7316: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-567-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: tsys02d: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:44 +0000 (23:38 +0100)]
iio: temperature: tsys02d: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-191-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: tsys01: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:43 +0000 (23:38 +0100)]
iio: temperature: tsys01: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-190-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: tmp007: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:42 +0000 (23:38 +0100)]
iio: temperature: tmp007: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-189-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: tmp006: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:41 +0000 (23:38 +0100)]
iio: temperature: tmp006: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-188-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: mlx90632: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:40 +0000 (23:38 +0100)]
iio: temperature: mlx90632: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-187-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: temperature: mlx90614: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:39 +0000 (23:38 +0100)]
iio: temperature: mlx90614: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Crt Mori<cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-186-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: proximity: sx9500: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:38 +0000 (23:38 +0100)]
iio: proximity: sx9500: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-185-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: proximity: srf08: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:37 +0000 (23:38 +0100)]
iio: proximity: srf08: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-184-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: proximity: rfd77402: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:36 +0000 (23:38 +0100)]
iio: proximity: rfd77402: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-183-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: proximity: pulsedlight-lidar-lite-v2: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:35 +0000 (23:38 +0100)]
iio: proximity: pulsedlight-lidar-lite-v2: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-182-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: proximity: mb1232: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:34 +0000 (23:38 +0100)]
iio: proximity: mb1232: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-181-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: proximity: isl29501: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:33 +0000 (23:38 +0100)]
iio: proximity: isl29501: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-180-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: zpa2326_i2c: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:32 +0000 (23:38 +0100)]
iio: pressure: zpa2326_i2c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-179-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: t5403: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:31 +0000 (23:38 +0100)]
iio: pressure: t5403: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-178-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: st_pressure_i2c: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:30 +0000 (23:38 +0100)]
iio: pressure: st_pressure_i2c: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-177-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: ms5637: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:29 +0000 (23:38 +0100)]
iio: pressure: ms5637: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-176-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: ms5611_i2c: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:28 +0000 (23:38 +0100)]
iio: pressure: ms5611_i2c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-175-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: mpl3115: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:27 +0000 (23:38 +0100)]
iio: pressure: mpl3115: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-174-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: mpl115_i2c: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:26 +0000 (23:38 +0100)]
iio: pressure: mpl115_i2c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-173-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: icp10100: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:25 +0000 (23:38 +0100)]
iio: pressure: icp10100: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20221118224540.619276-172-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: hp206c: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:24 +0000 (23:38 +0100)]
iio: pressure: hp206c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-171-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: hp03: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:23 +0000 (23:38 +0100)]
iio: pressure: hp03: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-170-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: dps310: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:22 +0000 (23:38 +0100)]
iio: pressure: dps310: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-169-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: dlhl60d: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:21 +0000 (23:38 +0100)]
iio: pressure: dlhl60d: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-168-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: pressure: abp060mg: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:19 +0000 (23:38 +0100)]
iio: pressure: abp060mg: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-166-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: potentiostat: lmp91000: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:18 +0000 (23:38 +0100)]
iio: potentiostat: lmp91000: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-165-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: potentiometer: tpl0102: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:17 +0000 (23:38 +0100)]
iio: potentiometer: tpl0102: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-164-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: potentiometer: max5432: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:16 +0000 (23:38 +0100)]
iio: potentiometer: max5432: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-163-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: potentiometer: ds1803: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:15 +0000 (23:38 +0100)]
iio: potentiometer: ds1803: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-162-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: potentiometer: ad5272: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:14 +0000 (23:38 +0100)]
iio: potentiometer: ad5272: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-161-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: yamaha-yas530: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:13 +0000 (23:38 +0100)]
iio: magnetometer: yamaha-yas530: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-160-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: mmc35240: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:12 +0000 (23:38 +0100)]
iio: magnetometer: mmc35240: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-159-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: mag3110: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:11 +0000 (23:38 +0100)]
iio: magnetometer: mag3110: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-158-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: hmc5843: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:10 +0000 (23:38 +0100)]
iio: magnetometer: hmc5843: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-157-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: bmc150_magn_i2c: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:09 +0000 (23:38 +0100)]
iio: magnetometer: bmc150_magn_i2c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-156-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: ak8975: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:08 +0000 (23:38 +0100)]
iio: magnetometer: ak8975: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-155-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: magnetometer: ak8974: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:07 +0000 (23:38 +0100)]
iio: magnetometer: ak8974: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-154-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: light: zopt2201: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:06 +0000 (23:38 +0100)]
iio: light: zopt2201: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-153-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: light: veml6070: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:05 +0000 (23:38 +0100)]
iio: light: veml6070: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-152-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 months agoiio: light: veml6030: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:38:04 +0000 (23:38 +0100)]
iio: light: veml6030: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-151-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>