[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230512155426.GJ68926@ediswmail.ad.cirrus.com>
Date: Fri, 12 May 2023 15:54:26 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
CC: <broonie@...nel.org>, <lee@...nel.org>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
<tglx@...utronix.de>, <maz@...nel.org>, <linus.walleij@...aro.org>,
<vkoul@...nel.org>, <lgirdwood@...il.com>,
<yung-chuan.liao@...ux.intel.com>, <sanyog.r.kale@...el.com>,
<pierre-louis.bossart@...ux.intel.com>,
<alsa-devel@...a-project.org>, <patches@...nsource.cirrus.com>,
<devicetree@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
<linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/10] pinctrl: cs42l43: Add support for the cs42l43
On Fri, May 12, 2023 at 05:30:37PM +0200, Krzysztof Kozlowski wrote:
> On 12/05/2023 14:28, Charles Keepax wrote:
> > + priv->gpio_chip.fwnode = dev_fwnode(cs42l43->dev);
> > +
> > + if (is_of_node(dev_fwnode(cs42l43->dev))) {
> > + device_set_node(priv->dev,
> > + fwnode_get_named_child_node(dev_fwnode(cs42l43->dev),
> > + "pinctrl"));
>
> That's something unusual. It seems you want to bind to a DT node because
> you miss compatible in DT node?
>
Kinda, I don't really want to add multiple compatibles for the
device. This is just a CODEC device, even in device tree it
seems a little weird to have multiple compatibles for a single
I2C device. On ACPI I am pretty sure it would be considered flat
out right wrong. The fact Linux supports the device using multiple
drivers is seemed to be a Linux implementation detail, rather than
describing the hardware.
The original (internal) version of the patches just had a single
firmware node, but the DT schema would not verify because the
node is both a pinctrl node and a spi node. And the pinctrl
schema requires the node to be called "pinctrl" and the spi
requires it to be called "spi", it is impossible to satisfy both.
Any advice/guidance you had on this one would be greatly
appreciated?
> > + } else {
> > + device_set_node(priv->dev, dev_fwnode(cs42l43->dev));
> > + }
> > +
> > + pm_runtime_enable(priv->dev);
> > + pm_runtime_idle(priv->dev);
> > +
>
> > +MODULE_DESCRIPTION("CS42L43 Pinctrl Driver");
> > +MODULE_AUTHOR("Charles Keepax <ckeepax@...nsource.cirrus.com>");
> > +MODULE_LICENSE("GPL");
> > +MODULE_ALIAS("platform:cs42l43-pinctrl");
>
> Same comment, so I guess you have this pattern everywhere.
Yeah this is not problem to fix up, I was just unaware using the
id_table was preferrable for MFD components, there are a lot of
devices doing it both ways.
Thanks,
Charles
Powered by blists - more mailing lists