- 22 9月, 2022 40 次提交
-
-
由 Jonathan Cameron 提交于
These new macros avoid the need for marking the callbacks __maybe_unused whilst ensuring both callbacks and structure may be dropped by the compiler if CONFIG_PM_SLEEP is not enabled. Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Cc: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20220807185618.1038812-4-jic23@kernel.orgSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Jonathan Cameron 提交于
These new macros avoid the need for marking the callbacks __maybe_unused whilst ensuring both callbacks and structure may be dropped by the compiler if CONFIG_PM_SLEEP is not enabled. Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Cc: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20220807185618.1038812-3-jic23@kernel.orgSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Jonathan Cameron 提交于
These new macros avoid the need for marking the callbacks __maybe_unused whilst ensuring both callbacks and structure may be dropped by the compiler if CONFIG_PM_SLEEP is not enabled. Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Cc: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20220807185618.1038812-2-jic23@kernel.orgSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
The bno055 driver is rather complex and have some oddities and not-obvious things that worth to document (e.g. calibration files). This patch also contains this [0] fix squashed in. [0] https://lore.kernel.org/lkml/20220704034041.15448-1-bagasdotme@gmail.com/Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-15-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add an I2C driver for communicating to a BNO055 IMU via I2C bus and enable the BNO055 core driver to work in this scenario. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-14-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add a serdev driver for communicating to a BNO055 IMU via serial bus, and enable the BNO055 core driver to work in this scenario. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Link: https://lore.kernel.org/r/20220907132205.28021-13-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Introduce new documentation file for the Bosch BNO055 IMU. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-12-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add ABI documentation for the new "serialnumber" sysfs attribute. The first user is the bno055 IIO driver. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-11-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add ABI documentation for bno055 driver private sysfs attributes. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-10-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add the core driver for the BNO055 IMU from Bosch. This IMU can be connected via both serial and I2C busses; separate patches will add support for them. The driver supports "AMG" (Accelerometer, Magnetometer, Gyroscope) mode, that provides raw data from the said internal sensors, and a couple of "fusion" modes (i.e. the IMU also does calculations in order to provide euler angles, quaternions, linear acceleration and gravity measurements). In fusion modes the AMG data is still available (with some calibration refinements done by the IMU), but certain settings such as low pass filters cut-off frequency and sensors' ranges are fixed, while in AMG mode they can be customized; this is why AMG mode can still be interesting. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Link: https://lore.kernel.org/r/20220907132205.28021-9-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
When a IIO device is registered, the IIO core creates an attribute group on its own, where it puts the channel attributes, and where it copies the attributes in indio_dev->info->attrs. Unfortunately it doesn't take care of binary attributes (i.e. it only consider indio_dev->info->attrs->attrs, and it ignores indio_dev->info->attrs->bin_attrs). Fix this by making the IIO layer take care also of the binary attributes. Note that while it is necessary to copy the non-binary attributes because the IIO layer needs more room to add the channels attribute, it should be enough to assign the bin_attrs pointer to the binary attributes pointed by indio_dev->info->attrs->bin_attrs. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-8-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Following the introduction of pitch, yaw and roll IIO modifiers, update the event_monitor tool accordingly. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-7-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Introduce ABI documentation for new modifiers used for reporting rotations expressed as euler angles (i.e. yaw, pitch, roll). It looks like we have some unit inconsistency along various IIO modifiers: it seems that incli is in deg, angl is in radians and rot isn't documented, but at least the adis16209 driver has rot in deg. Here we use deg (so angl is the only one using radians). Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-6-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add modifiers for reporting rotations as euler angles (i.e. yaw, pitch and roll). Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-5-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Following the introduction of IIO linear acceleration modifiers, update the event_monitor tool accordingly. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-4-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Introduce ABI documentation for new IIO modifiers used for reporting "linear acceleration" measures. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-3-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andrea Merello 提交于
Add IIO_MOD_LINEAR_X, IIO_MOD_LINEAR_Y and IIO_MOD_LINEAR_Z modifiers to te IIO core, which is preparatory for adding the Bosch BNO055 IMU driver. Bosch BNO055 IMU can report raw accelerations (among x, y and z axis) as well as the so called "linear accelerations" (again, among x, y and z axis) which is basically the acceleration after subtracting gravity and for which those new modifiers are for. Signed-off-by: NAndrea Merello <andrea.merello@iit.it> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220907132205.28021-2-andrea.merello@iit.itSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Eddie James 提交于
The DPS310 chip has been observed to get "stuck" such that pressure and temperature measurements are never indicated as "ready" in the MEAS_CFG register. The only solution is to reset the device and try again. In order to avoid continual failures, use a boolean flag to only try the reset after timeout once if errors persist. Fixes: ba6ec48e ("iio: Add driver for Infineon DPS310") Cc: <stable@vger.kernel.org> Signed-off-by: NEddie James <eajames@linux.ibm.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220915195719.136812-3-eajames@linux.ibm.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Eddie James 提交于
Move the startup procedure into a function, and correct a missing check on the return code for writing the PRS_CFG register. Cc: <stable@vger.kernel.org> Signed-off-by: NEddie James <eajames@linux.ibm.com> Reviewed-by: NJoel Stanley <joel@jms.id.au> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220915195719.136812-2-eajames@linux.ibm.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Nuno Sá 提交于
Document the new property to enable doubling the analog input range. Signed-off-by: NNuno Sá <nuno.sa@analog.com> Acked-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220912081223.173584-4-nuno.sa@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Nuno Sá 提交于
By default the driver was always setting the RANGE bit which means that the analog input goes from 0 to VREF. However, we might want to have 0 to 2xVREF. This change adds a new Firmware property to allow for the extended range while keeping the default behavior if nothing is provided. Signed-off-by: NNuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20220912081223.173584-3-nuno.sa@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Nuno Sá 提交于
Some of the supported devices have 4 or 2 LSB trailing bits that should not be taken into account. Hence we need to shift these bits out which fits perfectly on the scan type shift property. This change fixes both raw and buffered reads. Fixes: f2f7a449 ("iio:adc:ad7923: Add support for the ad7904/ad7914/ad7924") Fixes: 851644a6 ("iio: adc: ad7923: Add support for the ad7908/ad7918/ad7928") Signed-off-by: NNuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20220912081223.173584-2-nuno.sa@analog.com Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Olivier Moysan 提交于
Add support of identification registers to STM32 ADC. By default the ADC hardware instance number is retrieved from the compatible configuration data. Get the available ADC number per ADC block, from hardware configuration register, when this register exists. Signed-off-by: NOlivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: NFabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20220915135452.1712453-1-olivier.moysan@foss.st.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Add device bindings for lsm6dstx IMU sensor. Use lsm6dst as fallback device for lsm6dstx since it implements all the features currently supported by lsm6dstx. Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/dadc2acf88b0b73feac9a8980ad9af1658297bc1.1663262890.git.lorenzo@kernel.orgSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Add support to STM LSM6DSTX (acc + gyro) Mems sensor. The LSM6DSTX sensor can use LSM6DST as fallback device since it implements all the LSM6DSTX features currently implemented in st_lsm6dsx. Datasheet: https://www.st.com/resource/en/datasheet/lsm6dstx.pdfSigned-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/573a232b0f320b2ec92c56fa24393cfb275183fb.1663262890.git.lorenzo@kernel.orgSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Ciprian Regus 提交于
Set the iio device's name based on the chip used for the LTC2499 only. The most common way for IIO clients to interact with a device is to address it based on it's name. By using the dev_name() function, the name will be set based on a i2c_client's kobj name, which has the format i2c_instance-i2c_address (1-0076 for example). This is not ideal, since it makes a requirement for userspace to have knowledge about the hardware connections of the device. The name field is set to NULL for the LTC2497 and LTC2496, so that the old name can kept as it is, since changing it will result in an ABI breakage. Signed-off-by: NCiprian Regus <ciprian.regus@analog.com> Link: https://lore.kernel.org/r/20220916140922.2506248-6-ciprian.regus@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Ciprian Regus 提交于
The LTC2499 is a 16-channel (eight differential), 24-bit, ADC with Easy Drive technology and a 2-wire, I2C interface. Implement support for the LTC2499 ADC by extending the LTC2497 driver. A new chip_info struct is added to differentiate between chip types and resolutions when reading data from the device. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdfSigned-off-by: NCiprian Regus <ciprian.regus@analog.com> Link: https://lore.kernel.org/r/20220916140922.2506248-5-ciprian.regus@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Ciprian Regus 提交于
Update the MAINTAINERS file to include the path for the LTC2497 and LTC2496 devicetree bindings documentation. Signed-off-by: NCiprian Regus <ciprian.regus@analog.com> Link: https://lore.kernel.org/r/20220916140922.2506248-4-ciprian.regus@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Ciprian Regus 提交于
Update the bindings documentation for ltc2497 to include the ltc2499. Signed-off-by: NCiprian Regus <ciprian.regus@analog.com> Acked-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220916140922.2506248-3-ciprian.regus@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Ciprian Regus 提交于
Remove the specific entry for ad5758, since Documentation/devicetree/bindings/iio/*/adi,* already matches the path. Signed-off-by: NCiprian Regus <ciprian.regus@analog.com> Link: https://lore.kernel.org/r/20220916140922.2506248-2-ciprian.regus@analog.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Uwe Kleine-König 提交于
After the result of the previous conversion is read the chip automatically starts a new conversion and doesn't accept new i2c transfers until this conversion is completed which makes the function return failure. So add an early return iff the programming of the new address isn't needed. Note this will not fix the problem in general, but all cases that are currently used. Once this changes we get the failure back, but this can be addressed when the need arises. Fixes: 69548b7c ("iio: adc: ltc2497: split protocol independent part in a separate module ") Reported-by: NMeng Li <Meng.Li@windriver.com> Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: NDenys Zagorui <dzagorui@cisco.com> Cc: <Stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220815091647.1523532-1-dzagorui@cisco.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Allows sampling frequency and IIR filter coefficients configuration using sysfs ABI. The IIR filter coefficient is configurable using the sysfs attribute "filter_low_pass_3db_frequency". Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/876f8a2277f71672488e99aa02aae4239d530f51.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Add bosch,bmp380 compatible string for the new family of sensors. This family includes the BMP380, BMP384 and BMP388. The register map in this family changes substantially and introduces new features but core concepts and operations carryover from the previous iterations Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Acked-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/67224da4ae308bb752fc8fdecc54345cedab6c21.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Adds compatibility with the new generation of this sensor, the BMP380. Includes basic sensor initialization to do pressure and temp measurements and allows tuning oversampling settings for each channel. The compensation algorithms are adapted from the device datasheet and the repository https://github.com/BoschSensortec/BMP3-Sensor-API. Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/f1da2a2f1bc5bb083f318335c23b4f3d9bb8e536.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Change device tables declarations to forward order like in SPI codepath. Suggested-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/a3969b60e428b9bd29ea1ebc6dd69aa5bbe59da0.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Adds DMA-safe buffers to driver data struct to store raw data from sensors The multiple buffers used thorough the driver share the same memory allocated as part of the device data instance. The union containing the buffers is aligned to allow safe usage with DMA operations, such as regmap bulk read calls. Updated measurement and calibration reading functions to use the safe DMA buffers. Suggested-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/7919793f7f63224d5ce413c66d648029683c17ac.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Simplified common initialization logic of different sensor types unifying calibration and initial configuration recovery. Default config param values of each sensor type are stored inside chip_info structure and used to initialize sensor data struct instance. The helper functions for read each sensor type calibration are converted to a callback available on the chip_info struct. Separated bme280 specific calibration code from bmp280 function. Dropped the additional chip_id argument in bmp280 code as is not longer required. Now both bmp280/bme280 calibration function use same signature as bmp180. Suggested-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/584c90f309e4f24bf2e4aa2b15c8577d288f978d.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
On bmp280 and bme280, the temperature and pressure calibration parameters are available on a contiguous memory region. Considering this arrangement, simplified the calibration reading function by using only one buffer to read in batch temperature and pressure registers. Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/96d81282c95006d857f4d836d2ff3ee0740a85a0.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Cleaned and simplified register values construction and extraction converting to use FIELD_PREP and FIELD_GET macros. Replaced hardcoded bit masks with GENMASK macro. Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/3cbe56f29c2a46bc5dc23c5b72e1b43c9207f44d.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Angel Iglesias 提交于
Reordered definitions of local variables following the reverse christmas tree convention. Suggested-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NAngel Iglesias <ang.iglesiasg@gmail.com> Link: https://lore.kernel.org/r/363a106afbfe30ce590b80b1494c8b3322870f8a.1663025017.git.ang.iglesiasg@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-