On Tue, Aug 20, 2013 at 01:13:30PM +0200, Florian Lobmaier wrote: > +static bool as3722_readable(struct device *dev, unsigned int reg) > +{ > + switch (reg) { > + case AS3722_SD0_VOLTAGE_REG: > + case AS3722_SD1_VOLTAGE_REG:
If there are no gaps in this a simple if ( >= <= ) would do - the switch statements are normally used for sparse register maps with lots of gaps. > +static bool as3722_volatile(struct device *dev, unsigned int reg) > +{ > + return false; > +} At least the interrupt status registers ought to be volatile. Alternatively this function can be removed as non-volatile is the default.
signature.asc
Description: Digital signature