[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdY2E+8quTVVkCqoph-h6Ye+hEb+z+D5+2g=ArmfLpGR1A@mail.gmail.com>
Date: Mon, 28 Mar 2022 15:14:17 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Thierry Reding <thierry.reding@...il.com>
Cc: Prathamesh Shete <pshete@...dia.com>, jonathanh@...dia.com,
linux-gpio@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, smangipudi@...dia.com,
EJ Hsu <ejh@...dia.com>
Subject: Re: [PATCH] pinctrl: tegra: Set SFIO mode to Mux Register
On Wed, Mar 23, 2022 at 1:31 PM Thierry Reding <thierry.reding@...il.com> wrote:
> So this is basically what tegra_pinctrl_gpio_disable_free() does. I'm
> wondering if we need to do both, though. Are ->gpio_disable_free() and
> ->set_mux() always called in tandem? I suspect they are not because
> otherwise this wouldn't be needed.
>
> On the other hand, if ->set_mux() can be called in a code path without
> ->gpio_disable_free() then this may be necessary to get the pin out of
> SF mode. But that doesn't necessarily mean that the reverse is true.
> If it isn't possible for ->gpio_disable_free() to be called in a code
> path that doesn't have ->set_mux() then this patch would make the former
> implementation redundant.
>
> That said, upon inspecting the pinmux core, I don't see a 1:1
> correlation between the two, so this seems fine.
Yups that's how it works. .gpio_*() callbacks are just a shortcut
for enabling/disabling pins into GPIO mode, some drivers
don't even use it and rely on users to set
up the pin mux with explicit muxing instead. So these APIs
are orthogonal.
I'll wait for a version of the patch with your explicit reviewed-by
though.
Yours,
Linus Walleij
Powered by blists - more mailing lists