[PATCH 03/14] regulator: mt6370: Add mt6370 DisplayBias and VibLDO support
Mark Brown
broonie at kernel.org
Tue May 31 05:41:42 PDT 2022
On Tue, May 31, 2022 at 06:27:58PM +0800, ChiaEn Wu wrote:
> From: ChiYuan Huang <cy_huang at richtek.com>
>
> Add mt6370 DisplayBias and VibLDO support.
Other than one small thing this looks nice and clean:
> + enable_gpio = fwnode_gpiod_get_index(of_fwnode_handle(np), "enable", 0,
> + GPIOD_OUT_HIGH |
> + GPIOD_FLAGS_BIT_NONEXCLUSIVE,
> + desc->name);
> + if (IS_ERR(enable_gpio)) {
> + config->ena_gpiod = NULL;
> + return 0;
> + }
Please just use the OF APIs - due to ACPI's handling of power for
devices the regulator API OF bindings can't be used sensibly on
ACPI so it's better to explicitly work on DT only. This won't
actually cause problems here but it's a bit clearer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220531/3c26cbca/attachment.sig>
More information about the linux-arm-kernel
mailing list