lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/14] regulator: mt6370: Add mt6370 DisplayBias and VibLDO support
On Tue, May 31, 2022 at 06:27:58PM +0800, ChiaEn Wu wrote:
> From: ChiYuan Huang <cy_huang@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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-05-31 14:42    [W:0.191 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site