linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "José Miguel Gonçalves" <jose.goncalves@inov.pt>
To: linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org,
	Tony Lindgren <tony@atomide.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Jean Delvare <khali@linux-fr.org>,
	Guenter Roeck <linux@roeck-us.net>,
	lm-sensors@lm-sensors.org
Subject: Problem with a hih6130 sensor in a OMAP I2C bus
Date: Mon, 09 Dec 2013 11:42:13 +0000	[thread overview]
Message-ID: <52A5AC95.3050803@inov.pt> (raw)

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

             reply	other threads:[~2013-12-09 11:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 11:42 José Miguel Gonçalves [this message]
     [not found] ` <52A5AC95.3050803-ojS98SfuVkU@public.gmane.org>
2013-12-09 12:22   ` Problem with a hih6130 sensor in a OMAP I2C bus Jean Delvare
     [not found]     ` <20131209132239.3c0f6402-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-12-09 13:19       ` José Miguel Gonçalves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A5AC95.3050803@inov.pt \
    --to=jose.goncalves@inov.pt \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=tony@atomide.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).