All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"ACPI Devel Maling List" <linux-acpi@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Frank Rowand" <frowand.list@gmail.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>
Subject: Re: [PATCH 0/4] add support for bias pull-disable
Date: Thu, 14 Jul 2022 11:49:34 +0200	[thread overview]
Message-ID: <fb3112dab2e614cba3feaf0b6a962186f07cb61b.camel@gmail.com> (raw)
In-Reply-To: <CAHp75VcEBE3kMDi5Q+89GmS9V=aF+pOcyROY9MdfyB_5OaruPg@mail.gmail.com>

On Thu, 2022-07-14 at 11:12 +0200, Andy Shevchenko wrote:
> On Thu, Jul 14, 2022 at 9:10 AM Nuno Sá <noname.nuno@gmail.com>
> wrote:
> > On Wed, 2022-07-13 at 20:39 +0300, Andy Shevchenko wrote:
> > > On Wed, Jul 13, 2022 at 03:14:17PM +0200, Nuno Sá wrote:
> > > > The gpio core looks at 'FLAG_BIAS_DISABLE' in preparation of
> > > > calling the
> > > > gpiochip 'set_config()' hook. However, AFAICT, there's no way
> > > > that
> > > > this
> > > > flag is set because there's no support for it in firwmare code.
> > > > Moreover,
> > > > in 'gpiod_configure_flags()', only pull-ups and pull-downs are
> > > > being
> > > > handled.
> > > 
> > > Isn't it enough?
> > 
> > I might be missing something but don't think so. Look at this
> > driver
> > which seems a lot like the reference i put in the cover:
> > 
> > https://elixir.bootlin.com/linux/v5.19-rc6/source/drivers/gpio/gpio-pca953x.c#L573
> > 
> > I just don't see an in-kernel path (I'm aware now that we can get
> > here
> > through gpio cdev) to get to the point where we want to disable the
> > pin
> > BIAS.
> 
> Ah, that driver should be converted to pin control. It's definitely a
> problem with the driver.
> 

I'm not too familiar with pinctrl or even gpiochips to argue much in
here so just looking to better understand it...

The driver has it's own way to control the pin BIAS and does not rely
on any other pinctrl chip on the system. Are you pointing that this
driver should be converted in a pinctrl one which registers the
gpiochip and drops the 'set_config()' callback so pin consumers could
use pinctrl to let's say, disable BIAS? If so, then why do we have
PIN_CONFIG_BIAS_PULL_UP|DOWN in 'set_config()'? Legacy? 

And for my test device which is an input keymap, having it converted
into a pinctrl driver does not make much sense  (and it also supports
pull-up pull-disable) and I guess that might make sense for other
devices that have some optional gpiochip support...

- Nuno Sá


  reply	other threads:[~2022-07-14  9:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 13:14 [PATCH 0/4] add support for bias pull-disable Nuno Sá
2022-07-13 13:14 ` [PATCH 1/4] gpiolib: add support for bias pull disable Nuno Sá
2022-07-13 17:36   ` Andy Shevchenko
2022-07-14  4:20     ` Kent Gibson
2022-07-14  7:14       ` Nuno Sá
2022-07-14  8:27         ` Kent Gibson
2022-07-14  8:47           ` Nuno Sá
2022-07-14 12:00             ` Kent Gibson
2022-07-14 13:02               ` Nuno Sá
2022-07-14 15:08                 ` Andy Shevchenko
2022-07-14 15:47                   ` Nuno Sá
2022-07-18 10:44     ` Linus Walleij
2022-07-13 13:14 ` [PATCH 2/4] gpiolib: of: support " Nuno Sá
2022-07-18 10:30   ` Linus Walleij
2022-07-13 13:14 ` [PATCH 3/4] gpiolib: acpi: " Nuno Sá
2022-07-18 10:32   ` Linus Walleij
2022-07-18 10:49     ` Nuno Sá
2022-07-18 13:49       ` Linus Walleij
2022-07-18 18:25   ` Andy Shevchenko
2022-07-13 13:14 ` [PATCH 4/4] dt-bindings: gpio: add pull-disable flag Nuno Sá
2022-07-18 10:33   ` Linus Walleij
2022-07-18 20:52   ` Rob Herring
2022-07-13 17:39 ` [PATCH 0/4] add support for bias pull-disable Andy Shevchenko
2022-07-14  7:09   ` Nuno Sá
2022-07-14  9:12     ` Andy Shevchenko
2022-07-14  9:49       ` Nuno Sá [this message]
2022-07-14 14:58 ` Andy Shevchenko
2022-07-14 15:43   ` Nuno Sá
2022-07-14 18:57     ` Andy Shevchenko
2022-07-15 10:20       ` Nuno Sá
2022-07-15 12:05         ` Andy Shevchenko
2022-07-15 12:20           ` Nuno Sá
2022-07-15 19:31             ` Bartosz Golaszewski
2022-07-18  7:51               ` Nuno Sá
2022-07-18 10:29                 ` Linus Walleij
2022-07-18 10:46                   ` Nuno Sá
2022-07-18 10:25               ` Linus Walleij
2022-07-19  8:25 ` Bartosz Golaszewski
2022-07-19  8:52   ` Nuno Sá
2022-07-19  9:14     ` Bartosz Golaszewski
2022-07-19 10:21       ` Nuno Sá

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=fb3112dab2e614cba3feaf0b6a962186f07cb61b.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=nuno.sa@analog.com \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.