- 14 Jun, 2022 11 commits
-
-
Xiang wangx authored
Delete the redundant word 'via'. Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com> Link: https://lore.kernel.org/r/20220604040541.8470-1-wangxiang@cdjrlc.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Different from SCA3300, SCL3300 can output inclination angles. Angles are formed from acceleration with following equations: ANG_X = atan2(accx , sqrt(pow(accy , 2) + pow(accz , 2))) ANG_Y = atan2(accy , sqrt(pow(accx , 2) + pow(accz , 2))) ANG_Z = atan2(accz , sqrt(pow(accx , 2) + pow(accy , 2))) The commit adds the output of the raw value, scale and scale_available of angles. New interfaces: in_incli_scale in_incli_scale_available in_incli_x_raw in_incli_y_raw in_incli_z_raw Data converted by application of scale to degrees. Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-6-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Add support for Murata SCL3300, a 3-axis MEMS accelerometer. Same as SCA3300, it has the accelerometer and temperature output. Datasheet: www.murata.com/en-us/products/sensor/inclinometer/overview/lineup/scl3300 Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-5-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Prepare the way for multiple chips and additional channels: - Modify the driver to read the device ID and load the corresponding sensor information from the table to support multiple chips - Add prepares for the addition of extra channels - Prepare for handling the operation modes for multiple chips Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-4-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Add define of SCA3300_TEMP_CHANNEL for reuse. Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-3-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Add DT bindings for Murata scl3300 inclinometer. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-2-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220531213922.72992-2-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Use the ->probe_new() callback. The driver does not use const struct i2c_device_id * argument, so convert it to utilise the simplified I²C driver registration. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220531213922.72992-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220531142353.64925-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Use dev_fwnode() instead of direct OF node dereference when checking for regulator API error code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220531135320.63096-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
There is nothing directly using of specific interfaces in this driver, so lets not include the headers. While at it, drop dependency to OF, which currently makes no sense. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220531212218.72189-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 11 Jun, 2022 29 commits
-
-
Andy Shevchenko authored
Nothing in this driver depends on OF so drop the dependency to remove the false impression such a dependency exists. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220530181313.2789-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Nothing in this driver depends on OF so drop the dependency to remove the false impression such a dependency exists. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220530181706.3045-1-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
keliu authored
Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu <liuke94@huawei.com> Link: https://lore.kernel.org/r/20220527091739.2949426-1-liuke94@huawei.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Adds the device-tree bindings for the Bosch BMI085 and BMI090L IMU, the accelerometer part. Datasheet: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi085-ds001.pdf Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Bosch/BST-BMI090L-DS000-00.pdfSigned-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220526133359.2261928-7-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Add supports for BMI090L, it's a high-performance Inertial Measurement Unit, with an accelerometer and gyroscope. The commit adds the accelerometer driver for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Same as BMI088, BMI090L have the range of +/-3, 6, 12, and 24g. Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Link: https://lore.kernel.org/r/20220526133359.2261928-6-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
Add supports for BMI085, an Inertial Measurement Unit, with an accelerometer and gyroscope. The commit adds the accelerometer driver for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Unlike BMI088, the BMI085 accelerometer ranges are +/-2, 4, 6, and 8g, the scales are calculated as 9.8/32768*pow(2,reg41+1). Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Link: https://lore.kernel.org/r/20220526133359.2261928-5-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
iio: accel: bmi088: modified the device name It is possible to have multiple sensors connected on the same platform. For support of different sensors, making it possible to obtain the device name by reading the chip id. If the device was found in the table but the device tree binding is different, the driver will carry on with a warning. If no matching device was found, the driver load the binding chip info. Tested case, test with bmi085 and bmi090 patches applied: connect 3 bmi090l to the system, and set device tree compatible: spi2.0: compatible = "bosch,bmi090l-accel"; spi2.2: compatible = "bosch,bmi088-accel"; spi2.4: compatible = "bosch,bmi085-accel"; Get a warning for the mismatched devices: bmi088_accel_spi spi2.2: unexpected chip id 0x1A bmi088_accel_spi spi2.4: unexpected chip id 0x1A Get the real present device name: /sys/bus/iio/devices/iio:device1/name:bmi090l-accel /sys/bus/iio/devices/iio:device3/name:bmi090l-accel /sys/bus/iio/devices/iio:device5/name:bmi090l-accel Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Link: https://lore.kernel.org/r/20220526133359.2261928-4-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
The sensor can set the scales by writing the range register 0x41, The current driver has no interface to configure it. The commit adds the interface for config the scales. Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Link: https://lore.kernel.org/r/20220526133359.2261928-3-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
LI Qingwu authored
The units after application of scale are 100*m/s^2, The scale calculation is only for the device with the range of 3, 6, 12, and 24g, but some other chips have a range of 2, 4, 6, and 8g. Modified the scales from formula to a list, the scales in the list are calculated as 9.8/32768*pow(2,reg41+1)*1.5, refer to datasheet 5.3.4. The new units after the application of scale are m/s^2. Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Link: https://lore.kernel.org/r/20220526133359.2261928-2-Qing-wu.Li@leica-geosystems.com.cnSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Update bindings maintainerns section. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Acked-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20220526134603.75216-6-alexandru.tachici@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Update bindings maintainerns section. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Acked-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20220526134603.75216-5-alexandru.tachici@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Update bindings maintainerns section. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Acked-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20220526134603.75216-4-alexandru.tachici@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Update bindings maintainerns section. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Acked-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20220526134603.75216-3-alexandru.tachici@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Update bindings maintainerns section. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Acked-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20220526134603.75216-2-alexandru.tachici@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Markuss Broks authored
Handle the GPIO connected to the XSHUT/RST_N pin of VL53L0X. Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20220523175344.5845-5-markuss.broks@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Markuss Broks authored
Handle the regulator supplying the VDD pin of VL53L0X. Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20220523175344.5845-4-markuss.broks@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Markuss Broks authored
On some boards interrupt type might be different than falling edge, like hardcoded in driver. Leave interrupt flags as they were pre-configured from the device-tree. If they're not provided, default to falling edge interrupts. Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20220523175344.5845-3-markuss.broks@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Markuss Broks authored
Add the optional properties for the VL53L0X ToF sensor to the device-tree binding. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20220523175344.5845-2-markuss.broks@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Li Zhengyu authored
(!val) has been checked outside the loop, remove redundant (val &&) from loop. Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com> Acked-by: Andreas Klinger <ak@it-klinger.de> Link: https://lore.kernel.org/r/20220523122755.90638-1-lizhengyu3@huawei.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Peter Rosin authored
It fits right in as a single 12-bit DAC. Reviewed-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/a09a49a5-3d01-21f7-02ed-b191d70e7609@axentia.seSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Peter Rosin authored
It works much the same as ti,dac7571, so it fits in the "family" even if the name is a little bit different. Reviewed-by: Sean Nyekjaer <sean@geanix.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/a230b7a8-4146-9483-48ee-0bebdd945731@axentia.seSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Cosmin Tanislav authored
Currently, the driver updates the FIFO watermark inside both update_scan_mode() and hwfifo_set_watermark(). Inside the IIO core, hwfifo_set_watermark() is called immediately after update_scan_mode(), making the first call to set_fifo_samples() redundant. Remove the first call to set_fifo_samples(), and merge the set_fifo_samples() function into the set_fifo_watermark() function. Also, since fifo_set_size is always set inside of update_scan_mode(), and it cannot be set to 0, remove the zero check from set_fifo_samples(). Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com> Link: https://lore.kernel.org/r/20220514182010.152784-1-cosmin.tanislav@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Uwe Kleine-König authored
bmc150_magn_remove() always returns zero. Make it return no value which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c driver remove callbacks is ignored anyway. This prepares making i2c remove callbacks return void, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220514133250.307955-1-u.kleine-koenig@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-68-Julia.Lawall@inria.frSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-54-Julia.Lawall@inria.frSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Uwe Kleine-König authored
Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220515155929.338656-9-u.kleine-koenig@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Uwe Kleine-König authored
Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220515155929.338656-8-u.kleine-koenig@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Uwe Kleine-König authored
Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220515155929.338656-7-u.kleine-koenig@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Uwe Kleine-König authored
Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220515155929.338656-6-u.kleine-koenig@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-