lkml.org 
[lkml]   [2013]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] mfd: as3722: introduce regmap support
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-08-21 21:21    [W:0.123 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site