- 12 Dec, 2021 3 commits
-
-
Cosmin Tanislav authored
For IIO devices that expose both ADC and DAC functionality. Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com> Link: https://lore.kernel.org/r/20211205114045.173612-2-cosmin.tanislav@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Cai Huoqing authored
Update my email address to use developer mail address, because the old address will be dropped soon. And change the status from 'Supported' to 'Maintained' for me to look after this code without any payment now. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20211201083100.1587-1-caihuoqing@baidu.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
Add device tree bindings for the AD7293 Power Amplifier. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211202150819.24832-2-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 04 Dec, 2021 7 commits
-
-
Antoniu Miclaus authored
The AD7293 is a Power Amplifier drain current controller containing functionality for general-purpose monitoring and control of current, voltage, and temperature, integrated into a single chip solution with an SPI-compatible interface. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/AD7293.pdfSigned-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Cai Huoqing <cai.huoqing@linux.dev> Link: https://lore.kernel.org/r/20211202150819.24832-1-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nikita Travkin authored
Userspace tools like iio-sensor-proxy need to know the proximity level that should be considered "near". This value is hardware-specific and can be defined via the devicetree. Allow the driver to export the near level. Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20211125125646.54831-2-nikita@trvn.ruSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nikita Travkin authored
This value inidcates the proximity level that should be considered "close". Signed-off-by: Nikita Travkin <nikita@trvn.ru> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211125125646.54831-1-nikita@trvn.ruSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Evgeny Boger authored
Most AXPxxx-based reference designs place a 10k NTC thermistor on a TS pin. axp20x IIO driver now report the voltage of this pin via additional IIO channel. Add new "ts_v" channel to the channel description. Signed-off-by: Evgeny Boger <boger@wirenboard.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Quentin Schulz <foss+kernel@0leil.net> Link: https://lore.kernel.org/r/20211118141233.247907-3-boger@wirenboard.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Evgeny Boger authored
Most AXPxxx-based reference designs place a 10k NTC thermistor on a TS pin. When appropriately configured, AXP PMICs will inject fixed current (80uA by default) into TS pin and measure the voltage across a thermistor. The PMIC itself will by default compare this voltage with predefined thresholds and disable battery charging whenever the battery is too hot or too cold. Alternatively, the TS pin can be configured as general-purpose ADC input. This mode is not supported by the driver. This patch allows reading the voltage on the TS pin. It can be then either processed by userspace or used by kernel consumer like hwmon ntc thermistor driver. Signed-off-by: Evgeny Boger <boger@wirenboard.com> Acked-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Quentin Schulz <foss+kernel@0leil.net> Link: https://lore.kernel.org/r/20211118141233.247907-2-boger@wirenboard.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lorenzo Bianconi authored
Enable/disable internal i2c controller slave autoprobing at bootstrap. Disable sensor-hub is useful if i2c controller clock/data lines are connected through a pull-up with other chip lines (e.g. SDO/SA0). Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/54287a93922ac839501b776d288cc368aa81f0ab.1636816719.git.lorenzo@kernel.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lorenzo Bianconi authored
Introduce the capability to disable sensorhub through a device-tree property since there are some configurations where users want to explicitly disable sensor-hub auto-probing at bootstrap. A typical configuration is when the sensorhub clock/data lines are connected to a pull-up resistor since no slave sensors are connected to the i2c master. If SDO/SA0 line is connected to the same pull-up resistor, when the driver tries to probe slave devices connected on sensor-hub, it will force SDO/SA0 line to low, modifying the device i2c address. Tested-by: Mario Tesi <mario.tesi@st.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/ad7894e7b1c6fb3427fab3f623bb942860ad45cf.1636816719.git.lorenzo@kernel.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 27 Nov, 2021 5 commits
-
-
Andriy Tryshnivskyy authored
Add test for newly introduced type IIO_VAL_INT_64. Signed-off-by: Andriy Tryshnivskyy <andriy.tryshnivskyy@opensynergy.com> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20211105100501.1904-3-andriy.tryshnivskyy@opensynergy.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andriy Tryshnivskyy authored
Add KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf) for every test. Also use ARRAY_SIZE(values) where it is possible. Signed-off-by: Andriy Tryshnivskyy <andriy.tryshnivskyy@opensynergy.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20211105100501.1904-2-andriy.tryshnivskyy@opensynergy.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
The shared parameter should be configurable based on its usage, and not constrained to IIO_SHARED_BY_TYPE. This patch aims to improve the flexibility in using the IIO_ENUM_AVAILABLE define and avoid redefining custom iio enums that expose the shared parameter. An example is the ad5766.c driver where IIO_ENUM_AVAILABLE_SHARED was defined in order to achieve `shared` parameter customization. The current state of the IIO_ENUM_AVAILABLE implementation will imply similar redefinitions each time a driver will require access to the `shared` parameter. An example would be admv1013 driver which will require custom device attribute for the frequency translation modes: Quadrature I/Q mode and Intermediate Frequency mode. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211119085627.6348-1-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Paul Cercueil authored
We know that the buffer's alignment will always be a power of two; therefore, we can use the faster round_down() macro. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211115141925.60164-4-paul@crapouillou.netSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Paul Cercueil authored
This structure was never used anywhere, so it can safely be dropped. It will later be re-introduced as a different structure in a different header. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211115141925.60164-3-paul@crapouillou.netSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 20 Nov, 2021 1 commit
-
-
Andy Shevchenko authored
Use dedicated variable for index in the loop in the iio_buffers_alloc_sysfs_and_mask(). This will make code cleaner and less error prone as proved by previous changes done in this function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20211013094923.2473-3-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 17 Nov, 2021 24 commits
-
-
Maslov Dmitry authored
Previously ltr501 driver supported a number of light and, proximity sensors including ltr501, ltr559 and ltr301. This adds support for another light sensor ltr303 used in Seeed Studio reTerminal, a carrier board for Raspberry Pi 4 CM. Signed-off-by: Maslov Dmitry <maslovdmitry@seeed.cc> Link: https://lore.kernel.org/r/20211106174137.6783-1-maslovdmitry@seeed.ccSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Xu Wang authored
The print function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20211105015504.39226-1-vulab@iscas.ac.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
When processing raw data using channel scan_type.shift as source of trust to shift data appropriately. When processing the temperature channel, use a 16bit big endian variable as buffer to increase conversion readability. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-14-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Minor cleanup: bit is already defined as chan->scan_type.realbits, use bit when needed. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-13-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
By using scan_type.realbits when processing raw data, we use scan_type.shit only once, thus we don't need to define a local variable for it anymore. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-12-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-11-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-10-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-8-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-7-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-6-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-5-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-4-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-3-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Gwendal Grignou authored
Use channel definition as root of trust and replace constant when reading elements directly using the raw sysfs attributes. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20211104082413.3681212-2-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
Using `dev_get_drvdata()` in IIO sysfs callbacks to get a pointer to the IIO device is a relic from the very early days of IIO. The IIO core as well as most other drivers have switched over to using `dev_to_iio_dev()` instead. This driver is one of the last few drivers remaining that uses the outdated idiom, update it. This will allow to eventually update the IIO core to no longer set the drvdata for the IIO device and free it up for driver usage. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211019082929.30503-2-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The at91-sama5d2 driver calls `to_platform_device()` on a struct device that is part of a IIO device. This is incorrect since `to_platform_device()` must only be called on a struct device that is part of a platform device. The code still works by accident because non of the struct platform_device specific fields are accessed. Refactor the code a bit so that it behaves identically, but does not use the incorrect cast. This avoids accidentally adding undefined behavior in the future by assuming the `struct platform_device` is actually valid. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Eugen Hristev <eugen.hristev@microchip.com> Link: https://lore.kernel.org/r/20211019082929.30503-1-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IRQ handler's return type is irqreturn_t. The mma8452 uses a variable to store the return value, but the variable is of type int. Change this to irqreturn_t. This makes it easier to verify that the code is correct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20211101102734.32291-1-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-9-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-8-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-7-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-6-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-5-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-4-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lars-Peter Clausen authored
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL. Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-3-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-