Re: [PATCH] regulator: twl: Provide of_map_mode for twl4030
From: Mark Brown
Date: Mon Apr 04 2016 - 22:20:27 EST
On Mon, Apr 04, 2016 at 09:57:14PM +0300, Ivaylo Dimitrov wrote:
> +For twl4030 regulators/LDOs:
> + - regulator-initial-mode:
> + - 0x00 - Off mode, the output voltage is not maintained and voltage regulator
> + power consumption is 0.
This isn't a mode, it's just the regulator being off. Just drop it.
> +static inline unsigned int twl4030reg_map_mode(unsigned int mode)
> +{
> + return mode == RES_STATE_ACTIVE ?
> + REGULATOR_MODE_NORMAL : REGULATOR_MODE_STANDBY;
> +}
Please write normal if statements, the code should be readable.
Attachment:
signature.asc
Description: PGP signature