From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: <broonie@kernel.org>, <linus.walleij@linaro.org>, <brgl@bgdev.pl>,
<bard.liao@intel.com>, <linux-gpio@vger.kernel.org>,
<linux-spi@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH v5 4/4] spi: cs42l43: Add bridged cs35l56 amplifiers
Date: Mon, 15 Apr 2024 13:39:43 +0000 [thread overview]
Message-ID: <Zh0uH64AlEMJQyzz@ediswmail9.ad.cirrus.com> (raw)
In-Reply-To: <CAHp75Vc-f13sOghXkuqEVYsmnP3hT6ewLZwLr4mJJbruSqoxXw@mail.gmail.com>
On Thu, Apr 11, 2024 at 09:17:53PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 11, 2024 at 8:13 PM Charles Keepax
> <ckeepax@opensource.cirrus.com> wrote:
> > On Thu, Apr 11, 2024 at 05:04:33PM +0300, Andy Shevchenko wrote:
> > > On Thu, Apr 11, 2024 at 12:06 PM Charles Keepax
> > > <ckeepax@opensource.cirrus.com> wrote:
> > > > + if (has_sidecar) {
> > > > + ret = software_node_register(&cs42l43_gpiochip_swnode);
> > > > + if (ret) {
> > > > + return dev_err_probe(priv->dev, ret,
> > > > + "Failed to register gpio swnode\n");
> > > > + }
> > > > +
> > > > + ret = device_create_managed_software_node(&priv->ctlr->dev,
> > > > + cs42l43_cs_props, NULL);
> > > > + if (ret) {
> > > > + dev_err_probe(priv->dev, ret, "Failed to add swnode\n");
> > > > + goto err;
> > > > + }
> > >
> > > Wouldn't it miss the parent fwnode? I mean that you might probably
> > > need to call...
> > >
Ok I am pretty sure this is all fine, I don't think we can pass a
parent into device_create_managed_software_node since it requires
a parent software node, but in this case there isn't one. This is
the root node here, since the "parent" would be ACPI stuff here.
> > > > + } else {
> > > > + device_set_node(&priv->ctlr->dev, fwnode);
> > >
> > > ...this one always. Have you checked it? How does sysfs look like
> > > before and after this change on the device in question?
> >
> > I will check this.
>
We can't always call device_set_node. Firstly, we would need to
set it to the software node, however that is never returned from
device_create_managed_software_node. Secondly, the set_secondary_node
called in device_create_managed_software_node will set the primary
node anyway since there isn't a valid primary node on the device.
Finally, we don't want the primary node set to the ACPI node anyway
since we want to override those settings here with our bridged amp
settings.
> Basically in the expected case there should be two symlinks: to
> physical node and to swnode.
>
I think the sysfs all looks reasonable to me, I can see the SPI
devices in /sys/bus/spi/devices, under those devices I can see a
symlink to the software node.
Thanks,
Charles
next prev parent reply other threads:[~2024-04-15 13:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 9:06 [PATCH 0/4] Add bridged amplifiers to cs42l43 Charles Keepax
2024-04-11 9:06 ` [PATCH v5 1/4] gpio: swnode: Add ability to specify native chip selects for SPI Charles Keepax
2024-04-11 13:25 ` Andy Shevchenko
2024-04-11 16:44 ` Charles Keepax
2024-04-11 16:50 ` Andy Shevchenko
2024-04-11 16:58 ` Charles Keepax
2024-04-11 9:06 ` [PATCH v5 2/4] spi: Switch to using is_acpi_device_node() in spi_dev_set_name() Charles Keepax
2024-04-11 13:30 ` Andy Shevchenko
2024-04-11 16:56 ` Charles Keepax
2024-04-11 18:09 ` Andy Shevchenko
2024-04-11 9:06 ` [PATCH v5 3/4] spi: Update swnode based SPI devices to use the fwnode name Charles Keepax
2024-04-11 13:33 ` Andy Shevchenko
2024-04-11 17:04 ` Charles Keepax
2024-04-11 18:07 ` Andy Shevchenko
2024-04-11 9:06 ` [PATCH v5 4/4] spi: cs42l43: Add bridged cs35l56 amplifiers Charles Keepax
2024-04-11 14:04 ` Andy Shevchenko
2024-04-11 14:06 ` Andy Shevchenko
2024-04-11 14:07 ` Andy Shevchenko
2024-04-11 17:13 ` Charles Keepax
2024-04-11 18:17 ` Andy Shevchenko
2024-04-15 13:39 ` Charles Keepax [this message]
2024-04-15 16:03 ` Andy Shevchenko
2024-04-11 11:46 ` [PATCH 0/4] Add bridged amplifiers to cs42l43 Andy Shevchenko
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=Zh0uH64AlEMJQyzz@ediswmail9.ad.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=andy.shevchenko@gmail.com \
--cc=bard.liao@intel.com \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=patches@opensource.cirrus.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).