On Fri, 11 Jul 2008 17:39:50 +0800, eric miao wrote:
> >
> > Oh, and one more thing as I just notice it:
> >
> >> +static inline int is_group_a(struct max732x_chip *chip, unsigned off)
> >> +{
> >> + return (1u << off) & chip->mask_group_a;
> >> +}
> >
> > Given the way you use it, can't you just define this function as:
> >
> > static inline int is_group_a(struct max732x_chip *chip, unsigned off)
> > {
> > return (off < 8);
> > }
> >
> > ? As this is the only place where you use chip->mask_group_a, you would
> > be able to get rid of it.
> >
>
> I want to get rid of it either but I'm afraid not. (off < 8) doesn't
> necessarily
> mean it's in group_a, max7320 is an exception.
I didn't look into the details (and won't have the time to) but my
feeling is that it only depends on how you decide to handle the
max7320. If you want to make it fit with the rest of the supported
chips, I see no reason why it wouldn't work.
--
Jean Delvare
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c