]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: HIH-6130: Support I2C bus drivers without I2C_FUNC_SMBUS_QUICK
authorJosé Miguel Gonçalves <jose.goncalves@inov.pt>
Wed, 11 Dec 2013 11:11:13 +0000 (11:11 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 11 Dec 2013 21:37:30 +0000 (13:37 -0800)
commit97209d5473e876fe5890fe3b5cdea824d19fb4a1
tree7cfd6a2641b7d7f5a616d5a4d346fbbb164eb59e
parent509cb81d0fdf938567c3edb13e6098ad48ffc265
hwmon: HIH-6130: Support I2C bus drivers without I2C_FUNC_SMBUS_QUICK

Some I2C bus drivers do not allow zero-length data transfers which are
required to start a measurement with the HIH6130/1 sensor. Nevertheless,
we can overcome this limitation by writing a zero dummy byte. This byte
is ignored by the sensor and was verified to be working with the OMAP
I2C bus driver in a BeagleBone board.

Signed-off-by: José Miguel Gonçalves <jose.goncalves@inov.pt>
[Guenter Roeck: Simplified complexity of write_length initialization]
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hih6130.c