[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130821183045.GK26118@sirena.org.uk>
Date: Wed, 21 Aug 2013 19:30:45 +0100
From: Mark Brown <broonie@...nel.org>
To: Florian Lobmaier <florian.lobmaier@....com>
Cc: linux-kernel@...r.kernel.org, lee.jones@...aro.org,
sameo@...ux.intel.com
Subject: Re: [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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists