lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2023 14:34:29 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Raag Jadav <raag.jadav@...el.com>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH v1 1/1] pinctrl: tangier: Move default strength
 assignment to a switch-case

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@...ux.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
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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ