Re: [PATCH] regulator: twl: Provide of_map_mode for twl4030

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux