public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Raag Jadav <raag.jadav@intel.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v1 1/1] pinctrl: tangier: Move default strength assignment to a switch-case
Date: Thu, 2 Nov 2023 14:37:34 +0200	[thread overview]
Message-ID: <ZUOYDg9etwMR2rmy@smile.fi.intel.com> (raw)
In-Reply-To: <ZUOXVSij9497HrBR@smile.fi.intel.com>

On Thu, Nov 02, 2023 at 02:34:30PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 02, 2023 at 08:36:11AM +0100, Linus Walleij wrote:
> > On Mon, Oct 30, 2023 at 4:54 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:

(...)

> > > +               case 1: /* Set default strength value in case none is given */
> > 
> > So where does this 1 come from in the end? That's the piece I
> > am missing in this explanation. Somewhere, someone decided
> > to pass 1 to indicate "pull to default resistance".
> > 
> > Is it coming from ACPI firmware?
> 
> No, it's pure Linux kernel decision.
> gpio_set_bias() is who made that. That's why it needs to be chosen on global
> level.
> 
> We may even document somewhere that arguments let's say up to 10 do not make
> any sense in real life, as even for 1.2 v it will give 120 mA current on a single
> pin. Yet, theoretically that's possible for discrete industrial GPIOs, so we
> can choose "very big number" if such case appears in the future. I don't want

Just realized that "very big number" is limited to 16-bit value right now and
65 kOhm is quite reasonable value for the pull bias (yet we can use exact
0xffff for the "special" case).

> to change 1 to something else right now as it may break things.
> 
> > for default pull" should be added to the constant definition in the
> > code.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-11-02 12:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 15:53 [PATCH v1 1/1] pinctrl: tangier: Move default strength assignment to a switch-case Andy Shevchenko
2023-10-30 21:14 ` Raag Jadav
2023-10-31 10:22   ` Andy Shevchenko
2023-10-31 13:57     ` Raag Jadav
2023-11-01  6:35 ` Mika Westerberg
2023-11-01  9:34   ` Andy Shevchenko
2023-11-01 10:44     ` Mika Westerberg
2023-11-02  7:36 ` Linus Walleij
2023-11-02 12:34   ` Andy Shevchenko
2023-11-02 12:37     ` Andy Shevchenko [this message]
2023-11-02 12:56     ` Linus Walleij
2023-11-13 11:53       ` 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=ZUOYDg9etwMR2rmy@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=raag.jadav@intel.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