[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdb3wLAZfU+_E0r5Rr_HD-bdFpf7K6bMD6dqiK1Ryv7NAQ@mail.gmail.com>
Date: Thu, 2 Nov 2023 08:36:11 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Raag Jadav <raag.jadav@...el.com>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Andy Shevchenko <andy@...nel.org>
Subject: Re: [PATCH v1 1/1] pinctrl: tangier: Move default strength assignment
to a switch-case
On Mon, Oct 30, 2023 at 4:54 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> iWhen ->pin_config_set() is called from the GPIO library (assumed
> GpioIo() ACPI resource), the argument can be 1, when, for example,
> PullDefault is provided. In such case we supply sane default in
> the driver. Move that default assingment to a switch-case, so
> it will be consolidated in one place.
(...)
> + 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?
Then a comment such as "the firmware author chose to pass 1
for default pull" should be added to the constant definition in the
code.
Other than that it looks good!
Yours,
Linus Walleij
Powered by blists - more mailing lists