devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Marek Vasut <marex@denx.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Denys Drozdov <denys.drozdov@toradex.com>,
	Fabio Estevam <festevam@denx.de>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Li Yang <leoyang.li@nxp.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Matthias Schiffer <matthias.schiffer@tq-group.com>,
	Max Krummenacher <max.krummenacher@toradex.com>,
	NXP Linux Team <linux-imx@nxp.com>, Peng Fan <peng.fan@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	Tim Harvey <tharvey@gateworks.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: imx8mp: Add support for Data Modul i.MX8M Plus eDM SBC
Date: Mon, 9 Jan 2023 11:54:45 +0800	[thread overview]
Message-ID: <20230109035444.GA18301@T480> (raw)
In-Reply-To: <cf51865b-4a3e-09fa-b342-cc4db491f17b@denx.de>

On Thu, Jan 05, 2023 at 10:30:17PM +0100, Marek Vasut wrote:
> On 1/1/23 05:00, Shawn Guo wrote:
> 
> [...]
> 
> > > +	panel: panel {
> > 
> > No compatible?
> 
> The compatible string is filled in by expansion module DT overlay, so no
> default compatible string in the panel node here. The panel interface is the
> same for all panels that can be atteched to this board, so the panel node is
> common for all DTOs and can be in the base DT.
> 
> > > +		backlight = <&backlight>;
> > > +		power-supply = <&reg_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.

Shawn

> See drivers/gpio/gpiolib-of.c :
> 
>  203 /*
>  204  * The regulator GPIO handles are specified such that the
>  205  * presence or absence of "enable-active-high" solely controls
>  206  * the polarity of the GPIO line. Any phandle flags must
>  207  * be actively ignored.
>  208  */
>  209 #if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE)
>  210     { "regulator-fixed",   "gpios",    "enable-active-high" },
>  211     { "regulator-fixed",   "gpio",     "enable-active-high" },
> 
> [...]

  reply	other threads:[~2023-01-09  3:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-18  5:17 [PATCH 1/2] dt-bindings: arm: Add Data Modul i.MX8M Plus eDM SBC Marek Vasut
2022-12-18  5:18 ` [PATCH 2/2] arm64: dts: imx8mp: Add support for " Marek Vasut
2023-01-01  4:00   ` Shawn Guo
2023-01-05 21:30     ` Marek Vasut
2023-01-09  3:54       ` Shawn Guo [this message]
2023-01-10 12:52         ` Marek Vasut
2023-01-11  7:38   ` Ahmad Fatoum
2023-01-16 10:39     ` Marek Vasut
2023-01-16 10:51       ` Frieder Schrempf
2023-01-16 11:25         ` Marek Vasut
2023-01-16 11:34           ` Frieder Schrempf
2023-01-16 11:47             ` Marek Vasut
2023-01-16 11:56               ` Frieder Schrempf
2023-01-16 11:28       ` Ahmad Fatoum
2022-12-19  9:10 ` [PATCH 1/2] dt-bindings: arm: Add " Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230109035444.GA18301@T480 \
    --to=shawnguo@kernel.org \
    --cc=denys.drozdov@toradex.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@denx.de \
    --cc=frieder.schrempf@kontron.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marex@denx.de \
    --cc=matthias.schiffer@tq-group.com \
    --cc=max.krummenacher@toradex.com \
    --cc=peng.fan@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=tharvey@gateworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).