[PATCH 2/2] arm64: dts: imx8mp: Add support for Data Modul i.MX8M Plus eDM SBC
Marek Vasut
marex at denx.de
Tue Jan 10 04:52:43 PST 2023
On 1/9/23 04:54, Shawn Guo wrote:
[...]
>>>> + backlight = <&backlight>;
>>>> + power-supply = <®_panel_vcc>;
>>>> + /* Disabled by default, unless display board plugged in. */
>>>> + status = "disabled";
>>>> + };
>>>> +
>>>> + reg_panel_vcc: regulator-panel-vcc {
>>>> + compatible = "regulator-fixed";
>>>> + pinctrl-names = "default";
>>>> + pinctrl-0 = <&pinctrl_panel_vcc_reg>;
>>>> + regulator-name = "PANEL_VCC";
>>>> + regulator-min-microvolt = <5000000>;
>>>> + regulator-max-microvolt = <5000000>;
>>>> + gpio = <&gpio3 6 0>;
>>>
>>> GPIO_ACTIVE_HIGH?
>>
>> No, the 0 is correct and you're not the first one to wonder about this
>> oddity.
>
> I understand that the polarity is ignored by Linux Kernel. But it
> shouldn't prevent us from describing the polarity cell with defines
> for better readability.
>
> I'm always looking for the pattern below when reviewing the device tree.
>
> regulator-xxx {
> compatible = "regulator-fixed";
> ...
> gpio = <&gpio3 6 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> }
>
> Or for low polarity:
>
> regulator-xxx {
> compatible = "regulator-fixed";
> ...
> gpio = <&gpio3 6 GPIO_ACTIVE_LOW>;
> }
>
> The polarity define is helpful for me to validate whether
> `enable-active-high` property should present.
Maybe the best thing we can do to resolve this is to ask GPIO maintainer
Linus what is the preferred way of describing this in DT -- whether with
valid GPIO flags which are ignored or with 0 instead of GPIO flags ?
More information about the linux-arm-kernel
mailing list