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]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux