- Aug 06, 2023
-
-
Andrea Collamati authored
MCP4728 is a 12-bit quad channel DAC with I2C interface. support for: * per-channel gain * per-channel power state * per-channel power down mode control * per-channel vref selection internal/vdd * store current state to on-chip EEPROM Signed-off-by:
Andrea Collamati <andrea.collamati@gmail.com> Link: https://lore.kernel.org/r/a0933003ed3c855f9d80d6ce0a40add2b6f0ba36.1691066050.git.andrea.collamati@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andrea Collamati authored
Add documentation for MCP4728 Signed-off-by:
Andrea Collamati <andrea.collamati@gmail.com> Reviewed-by:
Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/d93dd116cfa7f958c038c0c62993071ea48451d2.1691066050.git.andrea.collamati@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
Add regulators for the VCC supplies of the admv1013. The patch aims to align the implementation with the current admv1014 driver where all the VCC supplies are handled as regulators. Signed-off-by:
Antoniu Miclaus <antoniu.miclaus@analog.com> Link: https://lore.kernel.org/r/20230731094455.26742-2-antoniu.miclaus@analog.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Antoniu Miclaus authored
Add bindings for the VCC regulators of the ADMV1013 microware upconverter. Signed-off-by:
Antoniu Miclaus <antoniu.miclaus@analog.com> Acked-by:
Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230731094455.26742-1-antoniu.miclaus@analog.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andrei Coardos authored
This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file. Reviewed-by:
Alexandru Ardelean <alex@shruggie.ro> Signed-off-by:
Andrei Coardos <aboutphysycs@gmail.com> Link: https://lore.kernel.org/r/20230802120915.25631-1-aboutphysycs@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Li Zetao authored
The module_mcb_driver() will set "THIS_MODULE" to driver.owner when register a mcb_driver, so it is redundant initialization to set driver.owner in men_z188_driver statement. Remove it for clean code. Signed-off-by:
Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230804100938.100435-1-lizetao1@huawei.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- Aug 02, 2023
-
-
Antoniu Miclaus authored
Make the regulators required in the dt bindings. Despite the fact that the datasheet is not explicit enough, all the specifications of the part are built around these pins being supplied. Signed-off-by:
Antoniu Miclaus <antoniu.miclaus@analog.com> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230731144404.389255-1-antoniu.miclaus@analog.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matti Vaittinen authored
fwnode_irq_get[_byname]() were changed to not return 0 anymore. The special error case where device-tree based IRQ mapping fails can't no longer be reliably detected from this return value. This yields a functional change in the driver where the mapping failure is treated as an error. The mapping failure can occur for example when the device-tree IRQ information translation call-back(s) (xlate) fail, IRQ domain is not found, IRQ type conflicts, etc. In most cases this indicates an error in the device-tree and special handling is not really required. One more thing to note is that ACPI APIs do not return zero for any failures so this special handling did only apply on device-tree based systems. Drop the special handling for DT mapping failures as these can no longer be separated from other errors at driver side. Change all failures in IRQ getting to be handled by continuing without the events instead of aborting the probe upon certain errors. Signed-off-by:
Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/3ad1c6f195ead3dfa8711235e1dead139d27f700.1690890774.git.mazziesaccount@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Matti Vaittinen authored
fwnode_irq_get() was changed to not return 0 anymore. Drop check for return value 0. Signed-off-by:
Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/9e18cf49a8bb581a84c3fa548ea577e2a3eb840d.1690890774.git.mazziesaccount@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- Jul 29, 2023
-
-
Ruan Jinjie authored
There is no possible for platform_get_irq() to return 0 and the return value of platform_get_irq() is more sensible to show the error reason. Signed-off-by:
Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230727131607.2897937-1-ruanjinjie@huawei.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Chenyuan Mi authored
In function size_from_channelarray(), the return value 'bytes' is defined as int type. However, the calcution of 'bytes' in this function is designed to use the unsigned int type. So it is necessary to change 'bytes' type to unsigned int to avoid integer overflow. The size_from_channelarray() is called in main() function, its return value is directly multipled by 'buf_len' and then used as the malloc() parameter. The 'buf_len' is completely controllable by user, thus a multiplication overflow may occur here. This could allocate an unexpected small area. Signed-off-by:
Chenyuan Mi <michenyuan@huawei.com> Link: https://lore.kernel.org/r/20230725092407.62545-1-michenyuan@huawei.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Replace device_get_match_data() and i2c_match_id() by i2c_get_match _data() by making similar I2C and DT-based matching table. Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230723102743.102284-1-biju.das.jz@bp.renesas.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Replace of_device_get_match_data() and i2c_match_id() by i2c_get_match _data() by making similar I2C and DT-based matching table. Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230723105209.175545-1-biju.das.jz@bp.renesas.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
The `scripts/kernel-doc -v -none -Wall` reports several issues with the kernel doc in IIO core C file. Update the comments accordingly. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Reviewed-by:
Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20230724110204.46285-5-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Let the krealloc_array() copy the original data and check for a multiplication overflow. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230724110204.46285-4-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Use sysfs_match_string() helper instead of open coded variant. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230724110204.46285-2-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Replace device_get_match_data() and i2c_match_id() by i2c_get_match _data() as we have similar I2C and DT-based matching table. Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230725171624.331283-3-biju.das.jz@bp.renesas.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
The .driver_data in adxl313_i2c_id[] for adxl312 and adxl314 is wrong. Fix this issue by adding corresponding adxl31x_chip_info data. Reported-by:
Jonathan Cameron <jic23@kernel.org> Closes: https://lore.kernel.org/all/20230722172832.04ad7738@jic23-huawei Fixes: a7a1c60b ("drivers: iio: accel: adxl312 and adxl314 support") Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230725171624.331283-2-biju.das.jz@bp.renesas.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ruan Jinjie authored
There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. Signed-off-by:
Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20230727073912.4178659-1-ruanjinjie@huawei.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- Jul 23, 2023
-
-
Rob Herring authored
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by:
Rob Herring <robh@kernel.org> Acked-by:
Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20230714174628.4057920-1-robh@kernel.org Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ramona Bolboaca authored
adis16477 devices support burst32 function, thus has_burst32 flag should be set to true. Signed-off-by:
Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230719123152.309624-3-ramona.bolboaca@analog.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ramona Bolboaca authored
Remove unused enum elements ADIS16475_SCAN_DIAG_S_FLAGS and ADIS16475_SCAN_CRC_FAILURE. Signed-off-by:
Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230719123152.309624-2-ramona.bolboaca@analog.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Waqar Hameed authored
Murata IRS-D200 is a PIR sensor for human detection. It has support for raw data measurements and detection event notification. Add a driver with support for triggered buffer and events. Map the various settings to the `iio` framework, e.g. threshold values, sampling frequency, filter frequencies etc. Signed-off-by:
Waqar Hameed <waqar.hameed@axis.com> Link: https://lore.kernel.org/r/d218a1bc75402b5ebd6e12a563f7315f83fe966c.1689753076.git.waqar.hameed@axis.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Waqar Hameed authored
There are devices (such as Murata IRS-D200 PIR proximity sensor) that check the data signal with a running period. I.e. for a specified time, they count the number of conditions that have occurred, and then signal if that is more than a specified amount. `IIO_EV_INFO_PERIOD` resets when the condition no longer is true and is therefore not suitable for these devices. Add a new `iio_event_info` `IIO_EV_INFO_RUNNING_PERIOD` that can be used as a running period. Also add a new `IIO_EV_INFO_RUNNING_COUNT` that can be used to specify the number of conditions that must occur during this running period. Signed-off-by:
Waqar Hameed <waqar.hameed@axis.com> Link: https://lore.kernel.org/r/ee4a801ae9b9c4716c7bd23d8f79f232351df8bd.1689753076.git.waqar.hameed@axis.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Waqar Hameed authored
Murata IRS-D200 is a PIR sensor for human detection. It uses the I2C bus for communication with interrupt support. Add devicetree bindings requiring the compatible string, I2C slave address (reg), power supply and interrupts. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Waqar Hameed <waqar.hameed@axis.com> Link: https://lore.kernel.org/r/09975910ea638a9aa893411124bbd2a5c98e45c3.1689753076.git.waqar.hameed@axis.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Kim Seer Paller authored
This change adds support for the HMC792A Digital Attenuator. The HMC792A is a broadband 6-bit GaAs MMIC Digital Attenuator operating from DC to 6.0 GHz with 15.75 dB attenuation control range in 0.25 dB steps. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/hmc792a.pdf Signed-off-by:
Kim Seer Paller <kimseer.paller@analog.com> Link: https://lore.kernel.org/r/20230721121038.183404-1-kimseer.paller@analog.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Improve an indentation in a few places to increase readability. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230721170022.3461-9-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230721170022.3461-6-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
min() has strict type checking and preferred over min_t() for unsigned types to avoid overflow. Here it's unclear why min_t() was chosen since both variables are of the same type. In any case update to use min(). Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230721170022.3461-5-andriy.shevchenko@linux.intel.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Define and init voltage configuration bits. Those bits are inited in vendor boot code (bl2, bl33) already so do it in the driver to not depend on other code. Introduced bits: REG11[0] - selects Vref. 0 - calibration voltage, 1 - VDDA. txlx and later SoCs support VDDA or calibration voltage as Vref, but others support only calibration voltage. For newer platforms vendor uses VDDA as default. REG11[1] - reserved bit. g12a and later SoCs must write 1, others SoCs write 0. REG11[5] - Vref voltage. 0 - 0.9v, 1 - 1.8v. g12a and later SoCs must write 0, others SoCs write 1. REG11[6] - selects common-mode voltage, 0: from AVDD, 1: from Vref. g12a and later SoCs must write 0, others SoCs write 1. Signed-off-by:George Stark <gnstark@sberdevices.ru> Link: https://lore.kernel.org/r/20230715110654.6035-4-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Disable internal continuous ring counter at init stage. Disable value depends on SoC family: gxl and later SoCs write 1, others write 0. This bit are inited in vendor boot code (bl2, bl33) already so do it in the driver to not depend on other code. Signed-off-by:
George Stark <gnstark@sberdevices.ru> Link: https://lore.kernel.org/r/20230715110654.6035-3-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Set up input channels 0,1 muxes in the same way as for the channels 2-7 later in the code. Signed-off-by:
George Stark <gnstark@sberdevices.ru> Link: https://lore.kernel.org/r/20230715110654.6035-2-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Biju Das authored
Simplify the probe() by replacing of_device_get_match_data() and i2c_match_id() by i2c_get_match_data() as we have similar I2C and DT-based matching table. Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by:
Puranjay Mohan <puranjay12@gmail.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230716175218.130557-2-biju.das.jz@bp.renesas.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- Jul 21, 2023
-
-
George Stark authored
Add IIO channel for all muxed inputs of channel 7. Meson saradc channel 7 is connected to a mux that can switch input to well-known sources like Vdd, GND and several Vdd dividers. Signed-off-by:
George Stark <GNStark@sberdevices.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-7-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Add channel labels to provide human-readable names for the inputs. Signed-off-by:
George Stark <GNStark@sberdevices.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-6-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Channels could be referenced in the driver code and using enum allows to make it more robust. Signed-off-by:
George Stark <GNStark@sberdevices.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-5-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
meson_sar_adc_set_chan7_mux is a basic func() for writing single register, defined as static. Moved it up so it could be used in more places. Signed-off-by:
George Stark <GNStark@sberdevices.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-4-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Allow to use enum items for variables initialization. For this, move enums upper in the code. Signed-off-by:
George Stark <GNStark@sberdevices.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-3-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
George Stark authored
Remove IIO_CHAN_SOFT_TIMESTAMP channel because it's used only for buffering mode which is not implemented. Signed-off-by:
George Stark <GNStark@sberdevices.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-2-gnstark@sberdevices.ru Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Roan van Dijk authored
This patch adds pressure compensation to the scd4x driver. The pressure can be written to the sensor in hPa. The pressure will be compensated internally by the sensor. Signed-off-by:
Roan van Dijk <roan@protonic.nl> Link: https://lore.kernel.org/r/20230711101419.2065107-1-roan@protonic.nl Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
-