#
d722f1e0 |
|
15-Aug-2021 |
Len Baker <len.baker@gmx.com> |
drivers/iio: Remove all strcpy() uses strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors. So, remove all the uses and add devm_kstrdup() or devm_kasprintf() instead. Also, modify the "for" loop conditions to clarify the access to the st->orientation.rotation buffer. This patch is an effort to clean up the proliferation of str*() functions in the kernel and a previous step in the path to remove the strcpy function from the kernel entirely [1]. [1] https://github.com/KSPP/linux/issues/88 Signed-off-by: Len Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210815174204.126593-1-len.baker@gmx.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
ffc9648a |
|
19-Feb-2020 |
Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> |
iio: imu: inv_mpu6050: fix data polling interface When reading data with the polling interface, we need to wait at 1 sampling period to have a sample. For gyroscope and magnetometer, we need to wait for 2 periods before having a correct sample. Not suitable for stable or backporting. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
92e7407a |
|
19-Feb-2020 |
Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> |
iio: imu: inv_mpu6050: rewrite power and engine management Rewrite clock management to use automatic clock switching present since MPU6500. Sensors engine management can now turn on or off a batch of sensors which simplifies usage a lot. Temperature sensor is now turned on/off depending on usage. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
3c1024aa |
|
19-Feb-2020 |
Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> |
iio: imu: inv_mpu6050: simplify polling magnetometer Do not change the sampling rate value. Let userspace decide what is the sampling rate to use. Read only the requested axis. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
a2587eb0 |
|
15-Nov-2019 |
Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> |
iio: imu: inv_mpu6050: add support of MPU9150 magnetometer Add support for driving MPU9150 magnetometer (AK8975) from mpu. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
b1392de0 |
|
16-Sep-2019 |
Jean-Baptiste Maneyrol <JManeyrol@invensense.com> |
iio: imu: inv_mpu6050: add MPU925x magnetometer support Add support of driving MPU9250 magnetometer connected on i2c auxiliary bus using the MPU i2c master. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|