summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-05mei: vsc: Assign pinfo fields in variable declarationSakari Ailus1-8/+8
Assign all possible fields of pinfo in variable declaration, instead of just zeroing it there. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com> Link: https://lore.kernel.org/r/20240219195807.517742-4-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05mei: vsc: Don't use sleeping condition in wait_event_timeout()Sakari Ailus1-5/+8
vsc_tp_wakeup_request() called wait_event_timeout() with gpiod_get_value_cansleep() which may sleep, and does so as the implementation is that of gpio-ljca. Move the GPIO state check outside the call. Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com> Link: https://lore.kernel.org/r/20240219195807.517742-3-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05mei: vsc: Call wake_up() in the threaded IRQ handlerSakari Ailus1-2/+2
The hard IRQ handler vsc_tp_irq() is called with a raw spinlock taken. wake_up() acquires a spinlock, a sleeping lock on PREEMPT_RT. This leads to sleeping in atomic context. Move the wake_up() call to the threaded IRQ handler vsc_tp_thread_isr() where it can be safely called. Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com> Link: https://lore.kernel.org/r/20240219195807.517742-2-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05mei: me: remove unnecessary NULL pointer checksBjorn Helgaas1-32/+6
The .shutdown(), .remove(), and power management callbacks are never called unless .probe() has already returned success, which means it has set drvdata to a non-NULL pointer, so "dev" can never be NULL in the other callbacks. Remove the unnecessary checks. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20240229181300.352077-4-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05mei: txe: remove unnecessary NULL pointer checksBjorn Helgaas1-34/+6
The .shutdown(), .remove(), and power management callbacks are never called unless .probe() has already returned success, which means it has set drvdata to a non-NULL pointer, so "dev" can never be NULL in the other callbacks. Remove the unnecessary checks. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20240229181300.352077-3-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05mei: gsc: remove unnecessary NULL pointer checksBjorn Helgaas1-17/+0
The .remove() and power management callbacks are never called unless .probe() has already returned success, which means it has set drvdata to a non-NULL pointer, so "dev" can never be NULL in the other callbacks. Remove the unnecessary checks. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20240229181300.352077-2-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-02Merge tag 'iio-for-6.9b' of ↵Greg Kroah-Hartman39-124/+3376
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of new device support, cleanups and features for 6.9 New device support ================= adi,hmc425a - Add support for LTC6373 Instrumentation Amplifier. microchip,pac1934 - New driver supporting PAC1931, PAC1932, PAC1933 and PAC1934 power monitoring chips with accumulators. voltafield,af8133j - New driver for the AF8133J 3 axis magnetometer. Docs ==== New general documentation of device buffers, and a specific section on the adi,adis16475 IMU Features ======== kionix,kxcjk-1013 - Add support for ACPI ROTM (Microsoft defined ACPI method) to get rotation matrix. ti,tmp117 - Add missing vcc-supply control and binding. Cleanups and minor fixes ======================== Tree-wide - Corrected headers to remove linux/of.h from a bunch of drivers that only had it to get to linux/mod_devicetable.h - dt binding cleanup to drop redundant type from label properties. adi,hmc425a - Fix constraints on GPIO array sizes for different devices. adi,ltc2983 - Use spi_get_device_match_data instead of open coding similar. - Update naming of fw parsing function to reflect that it is not longer dt only. - Set the chip name explicitly to reduce fragility resulting from different entries in the various ID tables. bosch,bmg160 - Add spi-max-frequency property and limit to dt-binding. microchip,mcp320x - Use devm_* to simplify device removal and error handling. nxp,imx93 - Drop a non existent 4th interrupt from bindings. qcom,mp8xxx-xoadc - Drop unused kerneldoc renesas,isl29501 - Actually use the of_match table. rockchip,saradc - Fix channel bitmask - Fix write masks - Replace custom handling of optional reset control with how it should be done. ti,ads1298 - Fix error code to not return a successfully obtained regulator. - Avoid a divide by zero when setting frequency. ti,hdc2010 - Add missing interrupts dt binding property vishay,veml6075 - Make vdd-supply required in the dt-binding. * tag 'iio-for-6.9b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits) dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency dt-bindings: iio: adc: imx93: drop the 4th interrupt iio: proximity: isl29501: make use of of_device_id table iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info member dt-bindings: iio: adc: drop redundant type from label dt-bindings: iio: ti,tmp117: add optional label property MAINTAINERS: Add an entry for AF8133J driver iio: magnetometer: add a driver for Voltafield AF8133J magnetometer dt-bindings: iio: magnetometer: Add Voltafield AF8133J dt-bindings: vendor-prefix: Add prefix for Voltafield iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive iio: adc: rockchip_saradc: use mask for write_enable bitfield iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2 dt-bindings: iio: light: vishay,veml6075: make vdd-supply required iio: adc: adding support for PAC193x dt-bindings: iio: adc: adding support for PAC193X iio: temperature: ltc2983: explicitly set the name in chip_info iio: temperature: ltc2983: rename ltc2983_parse_dt() iio: temperature: ltc2983: make use of spi_get_device_match_data() iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq() ...
2024-03-02Merge tag 'fpga-for-6.9-rc1' of ↵Greg Kroah-Hartman2-5/+5
git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.9-rc1 DFL: - Ricardo's change makes dfl_bus_type const. FPGA MGR core: - Marco's change removes redundant checks for bridge ops. 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.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: remove redundant checks for bridge ops fpga: dfl: make dfl_bus_type const
2024-03-02Merge tag 'coresight-next-v6.9' of ↵Greg Kroah-Hartman31-809/+1383
git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: hwtracing subsystem updates for v6.9 Changes targeting Linux v6.9 include: - CoreSight: Enable W=1 warnings as default - CoreSight: Clean up sysfs/perf mode handling for tracing - Support for Qualcomm TPDM CMB Dataset - Miscellaneous fixes to the CoreSight subsystem - Fix for hisi_ptt PMU to reject events targeting other PMUs Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> * tag 'coresight-next-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (32 commits) coresight-tpda: Change qcom,dsb-element-size to qcom,dsb-elem-bits dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init() coresight: tpdm: Fix build break due to uninitialised field coresight: etm4x: Set skip_power_up in etm4_init_arch_data function coresight-tpdm: Add msr register support for CMB dt-bindings: arm: qcom,coresight-tpdm: Add support for TPDM CMB MSR register coresight-tpdm: Add timestamp control register support for the CMB coresight-tpdm: Add pattern registers support for CMB coresight-tpdm: Add support to configure CMB coresight-tpda: Add support to configure CMB element coresight-tpdm: Add CMB dataset support dt-bindings: arm: qcom,coresight-tpdm: Add support for CMB element size coresight-tpdm: Optimize the useage of tpdm_has_dsb_dataset coresight-tpdm: Optimize the store function of tpdm simple dataset coresight: Add helper for setting csdev->mode coresight: Add a helper for getting csdev->mode coresight: Add helper for atomically taking the device coresight: Add explicit member initializers to coresight_dev_type coresight: Remove unused stubs ...
2024-03-02Merge tag 'mhi-for-v6.9' of ↵Greg Kroah-Hartman10-125/+427
git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Added new MHI_PM_SYS_ERR_FAIL state to the MHI state machine to properly cleanup the channel state if the device fails to respond to the MHI reset during SYS_ERR handling. This issue was discovered with the Qualcomm AIC100 AI accelerator device. - Modified the code that reads and exposes the OEM_PK_HASH registers through sysfs to read them on-demand instead of reading once during boot. Qualcomm AIC100 devices support provisioning the keys dynamically, so this allows the users to know the upto date information. - Added tracepoint support to expose the debug information over tracefs. - Reverted the commit that reads the MHI device revision from the device during boot. This is done because the read info was not used anywhere (dead code) and also it is not possible to read the revision info from all the devices. - Constified the modem config for Telit FN980 modem as required by the MHI core. MHI Endpoint ============ - Replaced kzalloc() with kcalloc() in an effort to avoid integer overflows during multiplication. Even though there is no potential overflow in the endpoint code, this is done for the sake of uniformity and best practice. - Fixed the kmem_cache_create() failure check to use the correct variable. * tag 'mhi-for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: constify modem_telit_fn980_hw_v1_config bus: mhi: host: Change the trace string for the userspace tools mapping bus: mhi: ep: check the correct variable in mhi_ep_register_controller() Revert "bus: mhi: core: Add support for reading MHI info from device" bus: mhi: host: Add tracing support bus: mhi: ep: Use kcalloc() instead of kzalloc() bus: mhi: host: Read PK HASH dynamically bus: mhi: host: Add MHI_PM_SYS_ERR_FAIL state
2024-02-29Merge branch 'icc-sm7150' into icc-nextGeorgi Djakov6-0/+2139
Add dt-bindings and interconnect driver support for the Qualcomm SM7150 SoC. * icc-sm7150 dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings interconnect: qcom: Add SM7150 driver support Link: https://lore.kernel.org/r/20240222174250.80493-1-danila@jiaxyga.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-29interconnect: qcom: Add SM7150 driver supportDanila Tikhonov4-0/+1905
Add a driver that handles the different NoCs found on SM7150, based on the downstream dtb. Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> Link: https://lore.kernel.org/r/20240222174250.80493-3-danila@jiaxyga.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-29dt-bindings: interconnect: Add Qualcomm SM7150 DT bindingsDanila Tikhonov2-0/+234
The Qualcomm SM7150 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240222174250.80493-2-danila@jiaxyga.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-28dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequencyMarco Felsch1-1/+7
Make use of the common spi-peripheral-props.yaml to pull in the common spi device properties and limit the spi-max-frequency to 10 MHz as this is the max. frequency if VDDIO >= 1.62V. Note all listed devices can either operate in I2C or in SPI mode. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240221174305.3423039-1-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: adc: imx93: drop the 4th interruptPeng Fan1-3/+1
Per i.MX93 Reference Mannual Rev.4, 12/2013, there is no interrupt 268, so drop it. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240226130826.3824251-1-peng.fan@oss.nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: proximity: isl29501: make use of of_device_id tableKrzysztof Kozlowski1-2/+1
Reference the of_device_id table in the driver structure, so it will be used for module autoloading and device matching. This fixes clang W=1 warning: isl29501.c:999:34: error: unused variable 'isl29501_i2c_matches' [-Werror,-Wunused-const-variable] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240225201654.49450-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info ↵Krzysztof Kozlowski1-1/+0
member Drop description of non-existing 'struct pm8xxx_chan_info' member: qcom-pm8xxx-xoadc.c:386: warning: Excess struct member 'scale_fn_type' description in 'pm8xxx_chan_info' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240225202744.60500-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: adc: drop redundant type from labelKrzysztof Kozlowski2-2/+0
dtschema defines label as string, so $ref in other bindings is redundant. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240226123004.91061-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: ti,tmp117: add optional label propertyMarco Felsch1-0/+3
Add the support to provide an optional label like we do for ADC channels to identify the device more easily. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240226121234.545662-1-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28MAINTAINERS: Add an entry for AF8133J driverOndrej Jirman1-0/+6
As I am submitting the driver and have the device to test. I'll maintain the driver. Signed-off-by: Ondrej Jirman <megi@xff.cz> Link: https://lore.kernel.org/r/20240222011341.3232645-5-megi@xff.cz Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: magnetometer: add a driver for Voltafield AF8133J magnetometerIcenowy Zheng3-0/+541
AF8133J is a simple I2C-connected magnetometer, without interrupts. Add a simple IIO driver for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Dalton Durst <dalton@ubports.com> Signed-off-by: Shoji Keita <awaittrot@shjk.jp> Co-developed-by: Ondrej Jirman <megi@xff.cz> Signed-off-by: Ondrej Jirman <megi@xff.cz> Reviewed-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Link: https://lore.kernel.org/r/20240222011341.3232645-4-megi@xff.cz Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: magnetometer: Add Voltafield AF8133JIcenowy Zheng1-0/+60
Voltafield AF8133J is a simple magnetometer sensor produced by Voltafield Technology Corp, with dual power supplies (one for core and one for I/O) and active-low reset pin. The sensor has configurable range 1.2 - 2.2 mT and a software controlled standby mode. Add a device tree binding for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Ondřej Jirman <megi@xff.cz> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240222011341.3232645-3-megi@xff.cz Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: vendor-prefix: Add prefix for VoltafieldIcenowy Zheng1-0/+2
Voltafile Technology Corp. is a company that produces MEMS sensors. Add a DT vendor prefix for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Ondřej Jirman <megi@xff.cz> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240222011341.3232645-2-megi@xff.cz Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: rockchip_saradc: replace custom logic with ↵Quentin Schulz1-8/+3
devm_reset_control_get_optional_exclusive devm_reset_control_get_optional_exclusive does what this driver is trying to do in its probe function, therefore let's switch over to that subsystem function. Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-3-84b06a0f623a@theobroma-systems.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: rockchip_saradc: use mask for write_enable bitfieldQuentin Schulz1-2/+2
Some of the registers on the SARADCv2 have bits write protected except if another bit is set. This is usually done by having the lowest 16 bits store the data to write and the highest 16 bits specify which of the 16 lowest bits should have their value written to the hardware block. The write_enable mask for the channel selection was incorrect because it was just the value shifted by 16 bits, which means it would only ever write bits and never clear them. So e.g. if someone starts a conversion on channel 5, the lowest 4 bits would be 0x5, then starts a conversion on channel 0, it would still be 5. Instead of shifting the value by 16 as the mask, let's use the OR'ing of the appropriate masks shifted by 16. Note that this is not an issue currently because the only SARADCv2 currently supported has a reset defined in its Device Tree, that reset resets the SARADC controller before starting a conversion on a channel. However, this reset is handled as optional by the probe function and thus proper masking should be used in the event an SARADCv2 without a reset ever makes it upstream. Fixes: 757953f8ec69 ("iio: adc: rockchip_saradc: Add support for RK3588") Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-2-84b06a0f623a@theobroma-systems.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2Quentin Schulz1-1/+1
The SARADCv2 on RK3588 (the only SoC currently supported that has an SARADCv2) selects the channel through the channel_sel bitfield which is the 4 lowest bits, therefore the mask should be GENMASK(3, 0) and not GENMASK(15, 0). Fixes: 757953f8ec69 ("iio: adc: rockchip_saradc: Add support for RK3588") Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-1-84b06a0f623a@theobroma-systems.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: light: vishay,veml6075: make vdd-supply requiredJavier Carrasco1-0/+1
The VEML6075 requires a single supply to operate. The property already exists in the bindings and it is used in the example, but it is still not on the list of required properties. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240223-veml6075_vdd-v1-1-ac76509b1998@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: adding support for PAC193xMarius Cristea5-0/+1664
This is the iio driver for Microchip PAC193X series of Power Monitor with Accumulator chip family. Signed-off-by: Marius Cristea <marius.cristea@microchip.com> Link: https://lore.kernel.org/r/20240222164206.65700-3-marius.cristea@microchip.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: adc: adding support for PAC193XMarius Cristea1-0/+120
This is the device tree schema for iio driver for Microchip PAC193X series of Power Monitors with Accumulator. Signed-off-by: Marius Cristea <marius.cristea@microchip.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240222164206.65700-2-marius.cristea@microchip.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: temperature: ltc2983: explicitly set the name in chip_infoNuno Sa1-5/+15
Getting the part name with 'spi_get_device_id(spi)->name' is not a very good pattern. Hence, explicitly add the name in the struct chip_info and use that instead. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-4-cf7d4457e98c@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: temperature: ltc2983: rename ltc2983_parse_dt()Nuno Sa1-2/+2
Rename ltc2983_parse_dt() to ltc2983_parse_fw() as there's no explicit dependency on devicetree. No functional change intended... Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-2-cf7d4457e98c@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: temperature: ltc2983: make use of spi_get_device_match_data()Nuno Sa1-3/+1
Use spi_get_device_match_data() as it simplifies the code. No functional change intended... Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-1-cf7d4457e98c@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq()Dan Carpenter1-0/+2
The "val" variable comes from the user so we need to ensure that it's not zero. In fact, all negative values are invalid as well. Add a check for that. Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver") Acked-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/c32c9087-86de-423b-8101-67b4a7f9d728@moroto.mountain Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: ti-ads1298: Fix error code in probe()Dan Carpenter1-1/+1
There is a copy and paste bug here, it should be "reg_vref" instead of "reg_avdd". The "priv->reg_avdd" variable is zero so it ends up returning success. Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Mike Looijmans <mike.looijmans@topic.nl> Link: https://lore.kernel.org/r/5f393a87-ca8b-4e68-a6f4-a79f75a91ccb@moroto.mountain Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28docs: iio: add documentation for adis16475 driverRamona Gradinariu2-0/+408
Add documentation for adis16475 driver which describes the driver device files and shows how the user may use the ABI for various scenarios (configuration, measurement, etc.). Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com> Link: https://lore.kernel.org/r/20240221085848.991413-4-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28docs: iio: add documentation for device buffersRamona Gradinariu2-0/+153
Add documentation for IIO device buffers describing buffer attributes and how data is structured in buffers using scan elements. Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com> Link: https://lore.kernel.org/r/20240221085848.991413-3-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28docs: iio: Refactor index.rstRamona Gradinariu1-1/+6
Refactor index.rst such that it contains a section for generic documentation and a section for Kernel Drivers documentation. Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com> Link: https://lore.kernel.org/r/20240221085848.991413-2-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: amplifiers: hmc425a: add support for LTC6373 Instrumentation AmplifierDumitru Ceclan1-4/+120
This adds support for LTC6373 36 V Fully-Differential Programmable-Gain Instrumentation Amplifier with 25 pA Input Bias Current. The user can program the gain to one of seven available settings through a 3-bit parallel interface (A2 to A0). Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240220153553.2432-6-mitrutzceclan@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: amplifiers: hmc425a: use pointers in match tableDumitru Ceclan1-15/+16
Change the match table to use pointers instead of device ids. Remove type from state as it is not used anymore. Also make the chip_info structures const. Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240220153553.2432-4-mitrutzceclan@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: amplifiers: hmc425a: move conversion logicDumitru Ceclan1-42/+83
Move gain-dB<->code conversion logic from read_raw and write_raw to chip_info callbacks. Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240220153553.2432-2-mitrutzceclan@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: hmc425a: add entry for LTC6373Dumitru Ceclan1-0/+14
The LTC6373 is a silicon, 3-bit Fully-Differential digital instrumentation amplifier that supports the following programmable gains (Vout/Vin): G = 0.25, 0.5, 1, 2, 4, 8, 16 + Shutdown. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com> Link: https://lore.kernel.org/r/20240220153553.2432-5-mitrutzceclan@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: hmc425a: add conditional GPIO array size constraintsDumitru Ceclan1-3/+30
ADRF5740 and HMC540S have a 4 bit parallel interface. Update ctrl-gpios description and min/maxItems values depending on the matched compatible to correctly reflect the hardware properties. Fixes: 79f2ff6461e7 ("dt-bindings: iio: hmc425a: add entry for ADRF5740 Attenuator") Fixes: 20f87a9a26be ("dt-bindings: iio: hmc425a: add entry for HMC540S") Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com> Link: https://lore.kernel.org/r/20240220153553.2432-3-mitrutzceclan@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: humidity: hdc20x0: add optional interrupts propertyJosua Mayer1-0/+3
HDC2010 and HDC2080 humidity sensors both have an interrupt / data-ready signal which can be used for signaling to the host. Add binding for "interrupts" property so that boards wiring this signal may describe the connection. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Josua Mayer <josua@solid-run.com> Link: https://lore.kernel.org/r/20240219-iio-hdc20x0-interrupt-binding-v7-1-c8ffb39c3768@solid-run.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: temperature: tmp117: add support for vcc-supplyThomas Haemmerle1-0/+9
Add support to specify the VCC supply which is required to power the device. According the datasheet 7.3.1 Power Up, the device needs 1.5ms after the supply voltage reaches the operating range before the communcation can begin. Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20240219131114.134607-2-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28dt-bindings: iio: ti,tmp117: add vcc supply bindingThomas Haemmerle1-0/+5
Add the binding to specify the vcc supply. We can't make it required since this would break the backward compatibility. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20240219131114.134607-1-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: adc: mcp320x: Simplify device removal logicArturas Moskvinas1-20/+9
Use devm_* APIs to enable/disable regulator and to register in IIO infrastructure. Signed-off-by: Arturas Moskvinas <arturas.moskvinas@gmail.com> Link: https://lore.kernel.org/r/20240219074139.193464-2-arturas.moskvinas@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: accel: kxcjk-1013: Implement ACPI method ROTM to retrieve mount matrix.Sean Rhodes1-3/+84
Implement kxj_acpi_orientation to retrieve mount matrix from ACPI ROTM method Cc: Jonathan Cameron <jic23@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> Signed-off-by: Sean Rhodes <sean@starlabs.systems> Link: https://lore.kernel.org/r/19d7a10aae5238a2c8db37da1f74edb86480e17e.1708293140.git.sean@starlabs.systems Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: dac: mcp4821: Switch to including mod_devicetable.h for struct ↵Jonathan Cameron1-1/+1
of_device_id definition. of.h was only included for this definition, so include the correct header instead. Reviewed-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240218173323.1023703-9-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.hJonathan Cameron1-1/+1
The only of specific definition used is of_device_id table and that is found in mod_devicetable.h not of.h Reviewed-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240218173323.1023703-8-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-02-28iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.hJonathan Cameron1-1/+1
The only of specific definition used is of_device_id table and that is found in mod_devicetable.h not of.h Reviewed-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240218173323.1023703-7-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>