linux/drivers/staging/iio
Jeremy Fertic 78accaea11 staging: iio: adt7316: fix the dac write calculation
The lsb calculation is not masking the correct bits from the user input.
Subtract 1 from (1 << offset) to correctly set up the mask to be applied
to user input.

The lsb register stores its value starting at the bit 7 position.
adt7316_store_DAC() currently assumes the value is at the other end of the
register. Shift the lsb value before storing it in a new variable lsb_reg,
and write this variable to the lsb register.

Fixes: 35f6b6b86e ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-01-05 17:57:06 +00:00
..
accel staging:iio:accel:adis16240: sign extend function replace hard code duplication 2018-06-24 14:45:06 +01:00
adc staging: iio: adc: ad7606: Move out of staging 2019-01-05 16:10:59 +00:00
addac staging: iio: adt7316: fix the dac write calculation 2019-01-05 17:57:06 +00:00
cdc staging: iio: cdc: ad7150: fix misaligned lines 2018-10-07 20:08:04 +01:00
Documentation staging:iio:docs: drop setting of THIS_MODULE from staging docs. 2017-09-03 18:10:28 +01:00
frequency drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
impedance-analyzer staging: iio: ad5933: use clock framework for clock reference 2018-12-16 14:05:56 +00:00
meter staging:iio:meter: Drop ADE7759 driver 2018-05-20 12:21:54 +01:00
resolver staging:iio:ad2s90: Move out of staging 2018-12-01 15:40:39 +00:00
Kconfig staging: iio: Drop ADIS16060 driver from staging 2018-06-10 11:52:31 +01:00
Makefile staging: iio: Drop ADIS16060 driver from staging 2018-06-10 11:52:31 +01:00
TODO staging: iio: Augment TODO file with GPIO work item 2018-04-23 14:36:10 +02:00