First round of iio fixes for the 4.7 cycle.
A slightly bumper set due to travel delaying the pull request and a fair few
issues with the recent merge window patches. Patches all over the place.
The st-sensors one is probably the most involved, but definitly solves the
issues seen. Note there are some other issues around that handler
(and the fact that a lot of boards tie a level interrupt chip to an
edge interrupt only irq chip). These are not regressions however, so
will turn up the slow route.
- iio_trigger_attach_pollfunc had some really badly wrong error handling.
Another nasty triggered whilst chasing down issues with the st sensors
- fix an off by one error when allocating channels.
- a stray mutex unlock before we ever take the lock.
- missing a parent in the driver model (which should be the i2c device).
Result is it doesn't turn up under /sys/bus/i2c/devices which some
userspace code uses for repeatable device identification.
- ABI usage bug which meant a processed value was reported as raw. Now
reporting scale as well to ensure userspace has the info it needs.
- Don't return processed value via the buffer - it doesn't conform to
the ABI and will overflow in some cases.
- Fix a wrongly sized buffer which would overflow trashing part of the
stack. Also move it onto the heap as part of the fix.
- a missing return after write in debugfs lead to an incorrect read and
a null pointer dereference.
- dereferencing the wrong pointer in suspend and resume leading to
- assign a static name to avoid accidentally ending up with no name if
loaded via device tree.
- output data rate for the accelerometer was incorrectly reported. Fix it.
- writing the output data rate was also wrong due to reverse parameters.
- error message for wrong chip ID gave the wrong expected value.
- mask for writing the integration time was wrong allowin g us to get
'stuck' in a particular value with no way back.
- temperature reported in celsius rather than millicelsius as per the
- Get rid of some incorrect data shifting which lead to readings being
- drop scale attribute for proximity as it is an unscaled value (depends
on what is in range rather than anything knowable at the detector).
- ABI compliance fixes - units were wrong.
- We introduced some nasty issues with the recent switch over to a
a somewhat threaded handler in that we broke using a software trigger
with these devices. Now do it properly. It's a larger patch than ideal
for a fix, but the logic is straight forward.
- Make sure the trigger is initialized before requesting the interrupt.
This matters now the interrupt can be shared. Before it was ugly and wrong
but short of flakey hardware could not be triggered.
- Hammer down the dataready pin at boot - otherwise with really
unlucky timing things could get interestingly wedged requiring a hard power
down of the chip.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
iio: hudmidity: hdc100x: fix incorrect shifting and scaling
Shifting sensor data to the right 2 bits was incorrect and caused the
scaling values + offsets to be invalid.
Reported-by: Alison Schofield <firstname.lastname@example.org>
Signed-off-by: Matt Ranostay <email@example.com>
Tested-by: Alison Schofield <firstname.lastname@example.org>
Signed-off-by: Jonathan Cameron <email@example.com>
1 file changed