2nd set of IIO features, cleanups etc for 5.13

A few of these are fixes for major rework earlier in cycle.
Bulk of patches are the ad7150 pre graduation cleanup, some link
fixes in maintainers and set using the new IRQF_NO_AUTOEN flag.

Note includes a merge of a tag from tip to get the IRQF_NO_AUTOEN
support (one patch only from Barry Song)

Staging graduation
* adi,ad7150 CDC
  - A lot of precursor patches cleaning it up first.
  - Includes core support for timeout event ABI where after a time
    a adaptive threshold jumps to fix slow tracking problems.

Cleanups and minor / late breaking fixes
* core
  - Use sysfs_emit() and sysfs_emit_at() as appropriate
  - Fix a bug introduced in this cycle for iio_read_channel_processed_scale()
  - Fix handling of getfd ioctl as IIO_IOCTL_UNHANDLED is a valid ioctl number
  - Tidy up some pointless type conversion in string formatting and odd
    indentation.
* dac
  - Use sysfs_emit() for powerdown attribute show() functions.
* docs
  - Fix dead links due to txt to yaml binding conversions.
* treewide
  - Use IRQF_NO_AUTOEN
* various
  - Typo fixes in comments.
* triggers/hr-timer-trigger
  - Fix an overflow handing issue.
* ad,ad7923
  - Device managed functions in probe()
* ad,ad9467
  - Fix kconfig dependency issue
* adi,adis16201
  - Fix a wrong axis assignment that stops the driver loading.
* invensense,mpu6050
  - Allow use as a standalone trigger (no channels enabled)
  - Drop unnecessary manual assignment of indio_dev->modes
  - Make device function in a basic way if no interrupt wired.
  - Sanity check scale writes.
* semtech,sx9310
  - Fix access to a variable length array in DT binding.
  - Sanity check input before writing debounce register.
* st,stm32-dfsdm
  - Drop __func__ from dev_dbg() and pr_debug().
* yamaha,yas530
  - Include asm/unaligned.h instead of be_byteshift.h
  - Fix an issue with return value on an error path.
iio: inv_mpu6050: Fully validate gyro and accel scale writes

When setting the gyro or accelerometer scale the inv_mpu6050 driver ignores
the integer part of the value. As a result e.g. all of 0.13309, 1.13309,
12345.13309, ... are accepted as a valid gyro scale and 0.13309 is the
scale that gets set in all those cases.

Make sure to check that the integer part of the scale value is 0 and reject
it otherwise.

Fixes: 09a642b78523 ("Invensense MPU6050 Device Driver.")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Link: https://lore.kernel.org/r/20210405114441.24167-1-lars@metafoo.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 file changed