linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Saravana Kannan <saravanak@google.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Question on device links
Date: Wed, 22 Feb 2023 10:34:31 +0100	[thread overview]
Message-ID: <CACRpkdYy8nPeJbBVMsyh6DAeKXPMnsdp7CwK0O2oLWG++oSgDA@mail.gmail.com> (raw)

Hi Saravana,

please help me to look at this device link stuff in the pinctrl
subsystem!

I started at one point to add device links for pin control and GPIO
based on something that was done inside a pin control driver,
resulting in these patches:

Enforcing links in some select drivers:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=consumer-links

Enforcing it over all drivers:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?h=consumer-link-enforce

I am under the impression that your generic dependency work
now made these patches obsolete, so I can drop these branches
and forget about it, is that correct?

What about these two drivers we already have:

$ git grep link_consumers drivers/pinctrl/
drivers/pinctrl/core.c: if (pctldev->desc->link_consumers)
drivers/pinctrl/pinctrl-stmfx.c:        pctl->pctl_desc.link_consumers = true;
drivers/pinctrl/stm32/pinctrl-stm32.c:  pctl->pctl_desc.link_consumers = true;

The effect will be to enforce links for each handle from a consumer
of a pinctrl handle:

static void pinctrl_link_add(struct pinctrl_dev *pctldev,
                             struct device *consumer)
{
        if (pctldev->desc->link_consumers)
                device_link_add(consumer, pctldev->dev,
                                DL_FLAG_PM_RUNTIME |
                                DL_FLAG_AUTOREMOVE_CONSUMER);
}

Is this also in effect superceded with core dependency tracking
so this code should simply be deleted?

Thanks!
Linus Walleij

             reply	other threads:[~2023-02-22  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  9:34 Linus Walleij [this message]
2023-02-23  2:10 ` Question on device links Saravana Kannan

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=CACRpkdYy8nPeJbBVMsyh6DAeKXPMnsdp7CwK0O2oLWG++oSgDA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=saravanak@google.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).