[PATCH] iio: ak8975: Support adapters limited to BYTE_DATA

2016-04-29 Thread Crestez Dan Leonard
The device has simple 8-bit registers but the driver incorrectly uses block or word reads without checking functionality bits. Fix by using i2c_smbus_read_i2c_block_data_or_emulated instead of i2c_smbus_read_i2c_block_data or i2c_smbus_read_word_data. This will check functionality bits and use

[PATCH] iio: ak8975: Support adapters limited to BYTE_DATA

2016-04-29 Thread Crestez Dan Leonard
The device has simple 8-bit registers but the driver incorrectly uses block or word reads without checking functionality bits. Fix by using i2c_smbus_read_i2c_block_data_or_emulated instead of i2c_smbus_read_i2c_block_data or i2c_smbus_read_word_data. This will check functionality bits and use