All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] switching from at91 to gpio driver
Date: Sun, 18 Nov 2007 16:43:54 +0000	[thread overview]
Message-ID: <20071118174354.1c238226@hyperion.delvare> (raw)
In-Reply-To: <loom.20071115T225659-359@post.gmane.org>

Hi Sergei,

On Thu, 15 Nov 2007 23:10:51 +0000 (UTC), Sergei Sharonov wrote:
> I switched from at91 i2c driver (hardware controller) to i2c-gpio driver in
> kernel 2.6.23.1. All chip drivers failed to hook into i2c-gpio. The problem was
> traced to the fact that in case of i2c-gpio adapter->class is not set to
> I2C_CLASS_HWMON whereas in case of i2c-at91 it is. Chip driver (e.g. lm92)
> checks for it in xxx_attach_adapter() function and does not call i2c_probe() if
> it is not set.
> Skipping the check allows lm92 driver to function.
> 
> Now, is it a bug or there is a place where I can tell i2c-gpio driver to set
> class?

Thanks for reporting, good catch. I'm adding the i2c list in Cc, as
well as the author of the i2c-gpio driver and one of its users.

Indeed there needs to be a way to set the class of i2c-gpio buses to
I2C_CLASS_HWMON. We could change the driver to set the class to
I2C_CLASS_HWMON for all buses by default, but that's not very flexible.
It would IMHO make more sense to add a field to struct
i2c_gpio_platform_data, and let each user of i2c-gpio set the class to
whatever they want.

Maybe you, Haavard or Atsushi can submit a patch doing this? I'd be
happy to review and merge it quickly.

-- 
Jean Delvare

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

  reply	other threads:[~2007-11-18 16:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-15 23:10 [lm-sensors] switching from at91 to gpio driver Sergei Sharonov
2007-11-18 16:43 ` Jean Delvare [this message]
2007-11-20 12:59 ` Atsushi Nemoto
2007-11-20 20:07 ` Jean Delvare
2007-11-22 15:50 ` Atsushi Nemoto
2007-11-22 21:42 ` Jean Delvare
2007-11-23 15:53 ` Atsushi Nemoto

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=20071118174354.1c238226@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.