public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* Problem with a hih6130 sensor in a OMAP I2C bus
@ 2013-12-09 11:42 José Miguel Gonçalves
       [not found] ` <52A5AC95.3050803-ojS98SfuVkU@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: José Miguel Gonçalves @ 2013-12-09 11:42 UTC (permalink / raw)
  To: linux-omap, linux-i2c, Tony Lindgren, Wolfram Sang, Jean Delvare,
	Guenter Roeck, lm-sensors

Hi,

While testing an HIH6130 humidity and temperature sensor with I2C 
interface in a BeagleBone board I've found that I was unable to read it 
because the driver always returned EINVAL. With some debugging I've 
found that the error was due to a test on omap_i2c_xfer_msg() in OMAP 
I2C driver that invalidates zero length writes. The hwmon hih6130 driver 
issues such kind of request in hih6130_update_measurements() to issue a 
measurement request to the sensor.

I was able to get measurements from the sensor by hacking the hih6130 
driver replacing the following line in hih6130_update_measurements();

         ret = i2c_master_send(client, tmp, 0);

by

         tmp[0] = 0;
         ret = i2c_master_send(client, tmp, 1);

Is this the correct way to fix this issue, or should the fix be in the 
I2C OMAP driver to accept zero length transfers?

Best regards,
José Gonçalves

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-09 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 11:42 Problem with a hih6130 sensor in a OMAP I2C bus José Miguel Gonçalves
     [not found] ` <52A5AC95.3050803-ojS98SfuVkU@public.gmane.org>
2013-12-09 12:22   ` Jean Delvare
     [not found]     ` <20131209132239.3c0f6402-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-12-09 13:19       ` José Miguel Gonçalves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox