Peng Fan
ca1e2b91ba
dt-bindings: iio: adc: imx93: drop the 4th interrupt
...
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-28 19:26:38 +00:00
Krzysztof Kozlowski
051db7ee60
iio: proximity: isl29501: make use of of_device_id table
...
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-28 19:26:38 +00:00
Krzysztof Kozlowski
cc8a587a7c
iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info 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-28 19:26:38 +00:00
Krzysztof Kozlowski
513ea6b7b4
dt-bindings: iio: adc: drop redundant type from label
...
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-28 19:26:37 +00:00
Marco Felsch
de42d33955
dt-bindings: iio: ti,tmp117: add optional label property
...
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-28 19:26:37 +00:00
Ondrej Jirman
4953612115
MAINTAINERS: Add an entry for AF8133J driver
...
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-28 19:26:37 +00:00
Icenowy Zheng
1d8f4b0462
iio: magnetometer: add a driver for Voltafield AF8133J magnetometer
...
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-28 19:26:37 +00:00
Icenowy Zheng
3b2eaffd2b
dt-bindings: iio: magnetometer: Add Voltafield AF8133J
...
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-28 19:26:37 +00:00
Icenowy Zheng
14166bac93
dt-bindings: vendor-prefix: Add prefix for Voltafield
...
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-28 19:26:37 +00:00
Quentin Schulz
9443c19ca6
iio: adc: rockchip_saradc: replace custom logic with 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-28 19:26:37 +00:00
Quentin Schulz
5b4e4b7203
iio: adc: rockchip_saradc: use mask for write_enable bitfield
...
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: 757953f8ec ("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-28 19:26:37 +00:00
Quentin Schulz
b0a4546df2
iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2
...
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: 757953f8ec ("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-28 19:26:37 +00:00
Javier Carrasco
b8b393348a
dt-bindings: iio: light: vishay,veml6075: make vdd-supply required
...
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-28 19:26:37 +00:00
Marius Cristea
0fb528c825
iio: adc: adding support for PAC193x
...
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-28 19:26:37 +00:00
Marius Cristea
a8ce0b4e56
dt-bindings: iio: adc: adding support for PAC193X
...
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-28 19:26:37 +00:00
Nuno Sa
5cad30ab50
iio: temperature: ltc2983: explicitly set the name in chip_info
...
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-28 19:26:36 +00:00
Nuno Sa
dccdff35d3
iio: temperature: ltc2983: rename ltc2983_parse_dt()
...
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-28 19:26:36 +00:00
Nuno Sa
3bdb96c9d5
iio: temperature: ltc2983: make use of spi_get_device_match_data()
...
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-28 19:26:36 +00:00
Dan Carpenter
df62153046
iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq()
...
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: 00ef7708fa ("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-28 19:26:36 +00:00
Dan Carpenter
debabbb1f2
iio: adc: ti-ads1298: Fix error code in probe()
...
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: 00ef7708fa ("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-28 19:26:36 +00:00
Ramona Gradinariu
8243b2877e
docs: iio: add documentation for adis16475 driver
...
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-28 19:26:36 +00:00
Ramona Gradinariu
d5422a85ed
docs: iio: add documentation for device buffers
...
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-28 19:26:36 +00:00
Ramona Gradinariu
a3e58e4aa9
docs: iio: Refactor index.rst
...
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-28 19:26:36 +00:00
Dumitru Ceclan
a0e7a2b703
iio: amplifiers: hmc425a: add support for LTC6373 Instrumentation Amplifier
...
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-28 19:26:36 +00:00
Dumitru Ceclan
09ac57ac01
iio: amplifiers: hmc425a: use pointers in match table
...
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-28 19:26:36 +00:00
Dumitru Ceclan
2edb22571e
iio: amplifiers: hmc425a: move conversion logic
...
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-28 19:26:36 +00:00
Dumitru Ceclan
ff96eb45ba
dt-bindings: iio: hmc425a: add entry for LTC6373
...
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-28 19:26:36 +00:00
Dumitru Ceclan
5c7403abf9
dt-bindings: iio: hmc425a: add conditional GPIO array size constraints
...
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: 79f2ff6461 ("dt-bindings: iio: hmc425a: add entry for ADRF5740 Attenuator")
Fixes: 20f87a9a26 ("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-28 19:26:35 +00:00
Josua Mayer
506d7e3ace
dt-bindings: iio: humidity: hdc20x0: add optional interrupts property
...
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-28 19:26:35 +00:00
Thomas Haemmerle
42e03b0d37
iio: temperature: tmp117: add support for vcc-supply
...
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-28 19:26:35 +00:00
Thomas Haemmerle
7d87c9b94a
dt-bindings: iio: ti,tmp117: add vcc supply binding
...
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-28 19:26:35 +00:00
Arturas Moskvinas
58efe76197
iio: adc: mcp320x: Simplify device removal logic
...
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-28 19:26:35 +00:00
Sean Rhodes
3b4ebff2a1
iio: accel: kxcjk-1013: Implement ACPI method ROTM to retrieve mount matrix.
...
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-28 19:26:35 +00:00
Jonathan Cameron
ffe7c46c59
iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition.
...
of.h was only included for this definition, so include the correct header
instead.
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-28 19:26:35 +00:00
Jonathan Cameron
1e0bda8cb8
iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h
...
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-28 19:26:35 +00:00
Jonathan Cameron
22f4fae348
iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.h
...
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 >
2024-02-28 19:26:35 +00:00
Jonathan Cameron
a13c7393ee
iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h
...
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-6-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-28 19:26:35 +00:00
Jonathan Cameron
8ccc719ab9
iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition
...
of.h was only included to get access to this structure, so include the
correct header directly 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-5-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-28 19:26:35 +00:00
Jonathan Cameron
a5d8684fe5
iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h
...
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-4-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-28 19:26:35 +00:00
Jonathan Cameron
c7618c4fce
iio: light: al3320a: Drop unused linux/of.h include
...
Nothing from linux/of.h used in this driver.
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-3-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-28 19:26:35 +00:00
Jonathan Cameron
d0dc99c0ae
iio: light: vl6180: Drop unused linux/of.h include
...
Nothing from linux/of.h is used in this driver.
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-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-28 19:26:34 +00:00
Greg Kroah-Hartman
d4551c189d
Merge tag 'iio-for-6.9a' of http://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
...
Jonathan writes:
IIO: 1st set of new device support, features and cleanup for 6.9
IIO Backend support
===================
New approach from Nuno Sa to the problem of reuse of drivers with
IIO devices that are actually the combination of a highspeed chip
and an FPGA core handling the data capture and flows. It will hopefully
also apply to some other split designs. The ad9467 and axi-adi drivers
are converted over to this framework.
New device support
==================
adi,admfm2000
- New driver for this dual microwave down converter.
ams,as73211
- Add support for as7331 UV sensor.
richtek,rtq6056
- Add support for related parts RTQ6053 and RTQ6059
st,lsm6dsx
- Add ASM330LHHXG1 accelerometer and gyro support (mainly IDs)
ti,ads1298
- New driver for this medical ADC.
Features
========
tests
- Unit tests for the gain-time-scale helper library.
bosch,bmi088
- I2C support.
bosh,bmi160
- Add 10EC5280 ACPI ID. Used in a number of devices that won't get fixed.
The ID is actually a PCI ID belonging to realtech. No response was received
to earlier attempts to notify them of this.
The manufacturers of some devices have replied to say they will not fix
this incorrect ID. Add the ID and hope it isn't a problem.
bosch,bmi323
- Add BOSC0200 ACPI ID. Note this is a duplicate of one in the bmc150
driver (it appears these parts share a windows driver).
Both drivers perform an ID check that is safe on the other part before
successfully probing.
hid-sensors-als
- Add color temperature and chromaticity support. Note this is a replacement
for the series reverted in 6.8 that correctly handles all the potential
channel combinations.
honeywell,hsc030pa
- Triggered buffer support (after driver cleanup).
honeywell,mprls00025pa
- Improved error handling.
- New DT binding to allow use of part number triplet as provided in data sheet
to specify equivalent of most of the binding more efficiently.
- SPI support.
memsic,mxc4005
- ACPI ID MDA6655 as seen in the Chuwi Minibook X 2023
ti,hdc3020
- Add threshold event support (after some driver cleanup)
veml,vcnl4000
- Switch to high resolution proximity measurement.
Cleanup
=======
Various minor typo fixes and better use of defines etc.
Treewide
- Stop using ACPI_PTR(). The savings in space are small and not worth
the complexity of __maybe_unused of ifdef guards. To avoid use in
new IIO drivers based on copy and paste, clean it out.
- cleanup.h based handling of iio_device_claim_direct_mode()/
iio_device_release_direct_mode() using scope_cond_guard().
In many drivers this is combined with other automated cleanup
to give maximum simplifications.
An initial set of drivers are converted over to this infrastructure.
Tools
- Use rewinddir() instead of seekdir() to return to start of file.
core
- Make iio_bus_type constant.
adi,ad16475
- Use irq_get_trigger_type() instead of opencoding.
adi,ad16480
- Use irq_get_trigger_type() instead of opencoding.
adi,ad-sigma-delta
- Avoid overwriting IRQ flags if provided by firmware.
ams,as73211
- Use IIO_VAL_FRACTIONAL for scales to simplify the code and potentially
improve accuracy.
gts-library
- Use a div64_u64() instead of a loop to do a division.
honeywell,mprls00025pa
- Clean up dt-binding doc.
- Drop defaults when DT binding not providing values. Very unlikely
these were useful given they were wrong for vast majority of supported
devices.
- Whitespace cleanup
miramems,da280
- Use i2c_get_match_data() to replace hand rolled ACPI matching code.
semtech,sx9324
- Avoid unnecessary copying of property strings.
st,lsm6dsx
- Improve docs, particularly wrt to making addition of new device
support less noisy.
st,lsm9ds0
- Use dev_err_probe() in all probe() error handling.
- Improved header includes.
- Tidy up termination of ID tables.
ti,ads1014
- Correct upper bound on PGA (wrong value had no actual impact)
ti,afe4403/4404
- devm_ useage to simplify error handling in probe() and allow() remove to
be dropped.
voltage-divider
- Add dt-binding for io-channel-cells to allow such a device to be both
an IIO consumer and IIO producer at the same time.
* tag 'iio-for-6.9a' of http://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (106 commits)
iio: imu: bmi323: Add ACPI Match Table
iio: accel: bmc150: Document duplicate ACPI entries with bmi323 driver
iio: adc: ti-ads1298: Add driver
dt-bindings: iio: adc: ti-ads1298: Add bindings
iio: pressure: hsc030pa add triggered buffer
iio: pressure: hsc030pa add mandatory delay
iio: pressure: hsc030pa: update datasheet URLs
iio: pressure: hsc030pa: include cleanup
iio: pressure: hsc030pa: use signed type to hold div_64() result
dt-bindings: iio: pressure: honeywell,hsc030pa.yaml add spi props
iio: st_sensors: lsm9ds0: Use common style for terminator in ID tables
iio: st_sensors: lsm9ds0: Don't use "proxy" headers
iio: st_sensors: lsm9ds0: Use dev_err_probe() everywhere
iio: adc: adi-axi-adc: move to backend framework
iio: adc: ad9467: convert to backend framework
iio: add the IIO backend framework
iio: buffer-dmaengine: export buffer alloc and free functions
of: property: add device link support for io-backends
dt-bindings: adc: axi-adc: update bindings for backend framework
dt-bindings: adc: ad9467: add new io-backend property
...
2024-02-25 14:11:41 +01:00
Jonathan LoBue
3cc5ebd3a2
iio: imu: bmi323: Add ACPI Match Table
...
Adds the ACPI match table for ASUS ROG ALLY to load the bmi323
driver with an ACPI match of "BOSC0200", and a comment about duplicate
ACPI identifiers between devices using the bmc150 and bmi323 chips.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Co-developed-by: Luke D. Jones <luke@ljones.dev >
Signed-off-by: Luke D. Jones <luke@ljones.dev >
Co-developed-by: Denis Benato <benato.denis96@gmail.com >
Signed-off-by: Denis Benato <benato.denis96@gmail.com >
Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Signed-off-by: Jonathan LoBue <jlobue10@gmail.com >
Tested-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20240216182308.27125-1-jlobue10@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:34:44 +00:00
Jonathan LoBue
5a01e812a6
iio: accel: bmc150: Document duplicate ACPI entries with bmi323 driver
...
Adds a description of the duplicate ACPI identifier issue
between devices using bmc150 and bmi323.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Co-developed-by: Luke D. Jones <luke@ljones.dev >
Signed-off-by: Luke D. Jones <luke@ljones.dev >
Co-developed-by: Denis Benato <benato.denis96@gmail.com >
Signed-off-by: Denis Benato <benato.denis96@gmail.com >
Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Signed-off-by: Jonathan LoBue <jlobue10@gmail.com >
Tested-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20240216182253.27069-1-jlobue10@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:34:44 +00:00
Mike Looijmans
00ef7708fa
iio: adc: ti-ads1298: Add driver
...
Skeleton driver for the TI ADS1298 medical ADC. This device is
typically used for ECG and similar measurements. Supports data
acquisition at configurable scale and sampling frequency.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl >
Link: https://lore.kernel.org/r/20240216153020.485201-2-mike.looijmans@topic.nl
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:34:38 +00:00
Mike Looijmans
bc4d251ee8
dt-bindings: iio: adc: ti-ads1298: Add bindings
...
Bindings for the TI ADS1298 medical ADC. This device is
typically used for ECG and similar measurements. Supports data
acquisition at configurable scale and sampling frequency.
The device has so many options for connecting stuff, at this
point the bindings aren't nearly complete but partial bindings
are better than no bindings at all.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl >
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20240216153020.485201-1-mike.looijmans@topic.nl
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:32:22 +00:00
Petre Rodan
05f5d78834
iio: pressure: hsc030pa add triggered buffer
...
Add triggered buffer feature.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro >
Link: https://lore.kernel.org/r/20240211075645.28777-7-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:32:22 +00:00
Petre Rodan
df3186e829
iio: pressure: hsc030pa add mandatory delay
...
Add a mandatory 2ms delay between consecutive chip reads.
A Technical Note pdf specifies that the measurement cycle in these
chips takes around 1.26ms. By adding this 2ms delay we make sure that
we never get stale measurements.
For more details, please see "Figure 1" in the pdf below:
https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-sleep-mode-technical-note-008286-1-en-ciid-155793.pdf
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro >
Link: https://lore.kernel.org/r/20240211075645.28777-6-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:32:22 +00:00
Petre Rodan
b0e42c9e93
iio: pressure: hsc030pa: update datasheet URLs
...
Provide bus-specific technical datasheet in the _i2c.c _spi.c headers
instead of the generic one.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro >
Link: https://lore.kernel.org/r/20240211075645.28777-5-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:32:22 +00:00
Petre Rodan
aaafb989ab
iio: pressure: hsc030pa: include cleanup
...
Add includes based on prior reviews from Andy.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro >
Link: https://lore.kernel.org/r/20240211075645.28777-4-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-19 19:32:22 +00:00