Re: [PATCH 03/14] regulator: mt6370: Add mt6370 DisplayBias and VibLDO support

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

 



On Tue, May 31, 2022 at 06:27:58PM +0800, ChiaEn Wu wrote:
> From: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
> 
> 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.

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