- 17 Sep, 2023 8 commits
-
-
Mehdi Djait authored
Kionix KX132-1211 is a tri-axis 16-bit accelerometer that can support ranges from ±2G to ±16G, digital output through I²C/SPI. Add support for basic accelerometer features such as reading acceleration via IIO using raw reads, triggered buffer (data-ready), or the WMI IRQ. Datasheet: https://kionixfs.azureedge.net/en/document/KX132-1211-Technical-Reference-Manual-Rev-5.0.pdfAcked-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/389a7d6100ff2e71b1c5d60bebe662d09435996a.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mehdi Djait authored
Since Kionix accelerometers use various numbers of bits to report data, a device-specific function is required. Implement the function as a callback in the device-specific chip_info structure Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/9c550fb28e34915d473e379f812c7753f7643bae.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mehdi Djait authored
Add the chip_info structure to the driver's private data to hold all the device specific infos. Refactor the kx022a driver implementation to make it more generic and extensible. Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/7a31d0cdefba15d7c791252ec8bc5db553b3996b.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mehdi Djait authored
Add the missing i2c device id. Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/61b43bbf35d602eac34b6d81b4d1b2d7ba39786f.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mehdi Djait authored
Avoid error returns on a failure to match and instead just warn with assumption that we have a correct dt-binding telling us that some new device with a different ID is backwards compatible. Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/b587cfec2f3350623277005f62121864bee857c7.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mehdi Djait authored
Remove blank lines pointed out by the checkpatch script Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/3489099f653491e97b13b8f19fe86635b03020c8.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mehdi Djait authored
Extend the kionix,kx022a.yaml file to support the kx132-1211 device Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Link: https://lore.kernel.org/r/735004c624082aead6e08ae37ea4fc086b11cf86.1694867379.git.mehdi.djait.k@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
William Breathitt Gray authored
The STX104 features an 8254 Counter/Timer chip providing three counter/timers which can be used for frequency measurement, frequency output, pulse width modulation, pulse width measurement, event count, etc. The STX104 provides a register bank selection to bank select between the 8254 Bank and the Indexed Register Array Bank; the Indexed Register Array is not utilized by this driver, so the 8254 Bank is selected unconditionally. Signed-off-by: William Breathitt Gray <william.gray@linaro.org> Link: https://lore.kernel.org/r/20230916112031.3634-1-william.gray@linaro.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 13 Sep, 2023 2 commits
-
-
Lars-Peter Clausen authored
The devm_clk_register() is deprecated and devm_clk_hw_register() should be used as a replacement. Switching to the clk_hw interface also allows to use the built-in device managed version of registering the clock provider. The non-clk_hw interface does not have a device managed version. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230910140903.551081-1-lars@metafoo.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
According to the datasheet switching to a new channel function implies multiple steps. All functions must be selected for a minimum of 130 μs before changing to another function. The DAC_CODEx registers are not reset by changing channel functions. Prior to changing channel functions, it is recommended to set the DAC code to 0x0000 via the DAC_CODEx registers. Set the channel function to high impedance via the CH_FUNC_SETUPx registers before transitioning to the new channel function. After the new channel function is configured, it is recommended to wait 150 μs before updating the DAC code. Even though the channel switch is done at only at probe, where a device reset is performed, that does not guarantee that the steps prior changing to new channel function should be neglected. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Link: https://lore.kernel.org/r/20230911142950.216687-1-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 12 Sep, 2023 30 commits
-
-
Biju Das authored
Simplify probe() by replacing id lookup for retrieving match data and device_get_match_data() by i2c_get_match_data(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230903145926.66855-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
The MCP4725 has a register offset '3' for reading DAC value compared to '4' for MCP4726. Add dac_reg_offset variable to struct mcp4725_chip_info to handle this difference. Drop chip_id from struct mcp4725_chip_info as it is unused. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230903115548.59306-5-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
The MCP4725 has external voltage reference compared MCP4725 which has reference embeedded in eeprom. Add use_ext_ref_voltage variable to struct mcp4725_chip_info to handle this difference. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230903115548.59306-4-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Add struct mcp4725_chip_info with chan_spec and chip_id variable. After this simplify probe() by replacing device_get_match_data() and id lookup for retrieving match data by i2c_get_match_data() by converting enum->pointer for data in the match table. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230903115548.59306-3-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Replace the variable 'id' from struct mcp4725_data with local variable chip_id in probe() as the id variable is not used elsewhere in the driver. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230903115548.59306-2-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Simplify adxl345_read_raw() by adding uscale variable to struct adxl345_chip_info. Also convert variables adxl3{4,7}5_uscale to macros and use it in OF/ACPI/ID match table. Drop enum adxl345_device_type as there is no user. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230903090051.39274-3-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Convert enum->pointer for data in match data table, so that device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c bus type match support added to it. Add struct adxl345_chip_info and replace enum->adxl345_chip_info in the match table and simplify adxl345_probe(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230903090051.39274-2-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Simpilfy probe() by replacing device_get_match_data() and id lookup for retrieving match data by using i2c_get_match_data(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230902170529.62297-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Simpilfy probe() by replacing device_get_match_data() and id lookup for retrieving match data by using i2c_get_match_data(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230902163233.56449-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Simpilfy probe() by replacing of_device_get_match_data() and id lookup for retrieving match data by using i2c_get_match_data() by making similar OF/I2C/ACPI match tables. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230902162633.50546-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Marek Vasut authored
The comparator generates an edge on the IRQ like and stays in the configured state until cleared. Support edge triggered IRQs as well as not all controllers do support level triggered IRQ. Signed-off-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20230831182502.154899-1-marex@denx.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Marius Cristea authored
This is the iio driver for Microchip family of 153.6 ksps, Low-Noise 16/24-Bit Delta-Sigma ADCs with an SPI interface (Microchip's MCP3461, MCP3462, MCP3464, MCP3461R, MCP3462R, MCP3464R, MCP3561, MCP3562, MCP3564, MCP3561R, MCP3562R and MCP3564R analog to digital converters). Signed-off-by: Marius Cristea <marius.cristea@microchip.com> Link: https://lore.kernel.org/r/20230829154133.40716-3-marius.cristea@microchip.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Marius Cristea authored
This is the device tree schema for iio driver for Microchip family of 153.6 ksps, Low-Noise 16/24-Bit Delta-Sigma ADCs with an SPI interface (Microchip's MCP3461, MCP3462, MCP3464, MCP3461R, MCP3462R, MCP3464R, MCP3561, MCP3562, MCP3564, MCP3561R, MCP3562R and MCP3564R analog to digital converters). Signed-off-by: Marius Cristea <marius.cristea@microchip.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230829154133.40716-2-marius.cristea@microchip.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Liam Beguin authored
The LTC2309 is an 8-Channel, 12-Bit SAR ADC with an I2C Interface. This implements support for all single-ended and differential channels, in unipolar mode only. Signed-off-by: Liam Beguin <liambeguin@gmail.com> Link: https://lore.kernel.org/r/20230828-ltc2309-v3-2-338b3a8fab8b@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Liam Beguin authored
Add devicetree bindings for the Linear Technology LTC2309 ADC driver. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Liam Beguin <liambeguin@gmail.com> Link: https://lore.kernel.org/r/20230828-ltc2309-v3-1-338b3a8fab8b@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
Use complete device name prefix in the input current offset getter function. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230830094314.26353-1-antoniu.miclaus@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Zhang Shurong authored
of_match_device() may fail and returns a NULL pointer. In practice there is no known reasonable way to trigger this, but in case one is added in future, harden the code by adding the check Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com> Link: https://lore.kernel.org/r/tencent_994DA85912C937E3B5405BA960B31ED90A08@qq.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ramona Bolboaca authored
Add support for delta angle and delta velocity raw and buffer readings to adis16475 driver. Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230808075059.645525-4-ramona.bolboaca@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ramona Bolboaca authored
The delta velocity is defined as a piece-wise integration of acceleration data. The delta velocity represents the linear velocity change between two consecutive measurements and it is measured in m / s (meters per second). In order to track the total linear velocity change during a desired period of time, simply sum-up the delta velocity samples acquired during that time. IIO currently does not offer a suitable channel type for this type of measurements hence this patch adds it. Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230808075059.645525-3-ramona.bolboaca@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ramona Bolboaca authored
The delta angle is defined as a piece-wise integration of angular velocity data. The delta angle represents the amount of angular displacement between two consecutive measurements and it is measured in radians. In order to track the total angular displacement during a desired period of time, simply sum-up the delta angle samples acquired during that time. IIO currently does not offer a suitable channel type for this type of measurements hence this patch adds it. Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230808075059.645525-2-ramona.bolboaca@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
There is nothing from string_helpers.h used in the driver, correct the header inclusion block accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230808164137.66663-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
There is nothing from string_helpers.h used in the driver, correct the header inclusion block accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> Link: https://lore.kernel.org/r/20230808164152.66748-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
There is nothing from string_helpers.h used in the driver, correct the header inclusion block accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/20230808164204.66818-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Yue Haibing authored
Commit 0f3a8c3f ("iio: Add support for creating IIO devices via configfs") declared but never implemented iio_sw_device_type_configfs_{un}register(). Commit b662f809 ("iio: core: Introduce IIO software triggers") declared but never implemented iio_sw_trigger_type_configfs_{un}register(). Commit a3e0b518 ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") declared but never implemented fxls8962af_core_remove(). Commit 8dedcc3e ("iio: core: centralize ioctl() calls to the main chardev") declared but never implemented iio_device_ioctl(). Commit d430f3c3 ("iio: imu: inv_mpu6050: Use regmap instead of i2c specific functions") removed inv_mpu6050_write_reg() but not its declaration. Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230811095701.35372-1-yuehaibing@huawei.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Convert enum->pointer for data in the match tables, so that device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c bus type match support added to it. Add struct tmp11x_info and replace enum->struct *tmp11x_info for data in the match table. Drop tmp117_identify() and simplify tmp117_probe() by replacing device_get_match_data() and id lookup for retrieving data by i2c_get_match_data(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20230812161154.196555-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Replace device_get_match_data()->i2c_get_match_data() to extend matching support for ID table. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com> Tested-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com> Link: https://lore.kernel.org/r/20230812151908.188696-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Replace device_get_match_data()->i2c_get_match_data by making similar I2C and DT-based matching table to extend matching support for ID table. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230812150838.185055-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Convert enum->pointer for data in the ID table, so that device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c bus type match support added to it. Replace enum->struct *ds1803_cfg for data in the ID table and simplify ds1803_probe() by replacing device_get_match_data() with i2c_get_match_data(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230812144106.163355-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Convert enum->pointer for data in the match tables, so that device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c bus type match support added to it. Add product_id variable to struct sgp_device and remove the local variable product_id in probe() and replace enum->struct *sgp_device for data in the match table. Simplify theprobe() by replacing device_get_match_data() and ID lookup for retrieving data by i2c_get_match_data(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230812165730.216180-1-biju.das.jz@bp.renesas.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ana-Maria Cusco authored
Added support for HMC540SLP3E broadband 4-bit Silicon IC digital attenuator with a 15 dB control range and wide frequency coverage (0.1 to 8 GHz). Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230816110906.144540-2-ana-maria.cusco@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-