switching from at91 to gpio driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Konbanwa Atsushi-san,

On Tue, 20 Nov 2007 21:59:37 +0900 (JST), Atsushi Nemoto wrote:
> On Sun, 18 Nov 2007 17:43:54 +0100, Jean Delvare <khali at linux-fr.org> wrote:
> > 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.
> 
> I think just setting I2C_CLASS_HWMON (or I2C_CLASS_ALL) in
> i2c_gpio_probe would be enough.
> 
> Well, frankly, I cannot understand the purpose of I2C_CLASS_XXX at
> all.  For example, what is an requirement for I2C_CLASS_HWMON?

There are no requirements. Classes are only informative, restricting
which i2c buses will be scanned by some categories of i2c chip drivers.
For example, hwmon drivers only scan i2c buses with I2C_CLASS_HWMON set.

I wouldn't recommend setting I2C_CLASS_ALL in i2c-gpio, as it pretty
much voids the idea of i2c classes. But on second thought,
I2C_CLASS_HWMON should work fine. That's what almost all
general-purpose i2c bus drivers do after all.

So, if someone sends me a patch adding class I2C_CLASS_HWMON to
i2c-gpio, I'll take that.

Arigato,
-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux