Re: [PATCH 2/4] added regmap of AS3722
From: Mark Brown
Date: Wed Aug 14 2013 - 11:29:47 EST
On Wed, Aug 14, 2013 at 04:54:56PM +0200, Florian Lobmaier wrote:
> +static bool as3722_readable(struct device *dev, unsigned int reg)
> +{
> + switch (reg) {
> + case AS3722_SD0_VOLTAGE_REG:
Are there any gaps in this register map? If not just checking the range
would be easier (it looks like this is the case here).
> + case AS3722_INTERRUPTSTATUS1_REG:
> + case AS3722_INTERRUPTSTATUS2_REG:
> + case AS3722_INTERRUPTSTATUS3_REG:
> + case AS3722_INTERRUPTSTATUS4_REG:
> +static bool as3722_volatile(struct device *dev, unsigned int reg)
> +{
> + return false;
> +}
At least the interrupt status register above should be volatile
otherwise you'll never be able to read the actual stauts.
Attachment:
signature.asc
Description: Digital signature