From: guillaume La Roque <glaroque@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
khilman@baylibre.com, linus.walleij@linaro.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
robh+dt@kernel.org, linux-amlogic@lists.infradead.org
Subject: Re: [PATCH v3 5/6] pinctrl: meson: add support of drive-strength-microamp
Date: Thu, 9 May 2019 13:23:34 +0200 [thread overview]
Message-ID: <4e44984f-eb76-87d1-e458-506bcccf1500@baylibre.com> (raw)
In-Reply-To: <CAFBinCC-wYD1ZJ8Dd6mwd=qAqi8YX0=VacjbEc-bxKrQnZvwDA@mail.gmail.com>
hi martin,
thanks for review, i will do a new series to remove err log on get_drive_strength
and integrate your comment
On 5/7/19 8:18 PM, Martin Blumenstingl wrote:
> On Tue, May 7, 2019 at 1:57 PM Guillaume La Roque <glaroque@baylibre.com> wrote:
>> drive-strength-microamp is a new feature needed for G12A SoC.
>> the default DS setting after boot is usually 500uA and it is not enough for
>> many functions. We need to be able to set the drive strength to reliably
>> enable things like MMC, I2C, etc ...
>>
>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> with the comments below addressed:
> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>
>> ---
>> drivers/pinctrl/meson/pinctrl-meson.c | 102 ++++++++++++++++++++++++++
>> drivers/pinctrl/meson/pinctrl-meson.h | 18 ++++-
>> 2 files changed, 119 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
>> index a216a7537564..3da867c13f47 100644
>> --- a/drivers/pinctrl/meson/pinctrl-meson.c
>> +++ b/drivers/pinctrl/meson/pinctrl-meson.c
>> @@ -219,12 +219,56 @@ static int meson_pinconf_enable_bias(struct meson_pinctrl *pc, unsigned int pin,
>> return 0;
>> }
>>
>> +static int meson_pinconf_set_drive_strength(struct meson_pinctrl *pc,
>> + unsigned int pin,
>> + u16 drive_strength_ua)
>> +{
>> + struct meson_bank *bank;
>> + unsigned int reg, bit;
>> + unsigned int ds_val;
> you can move ds_val to the line above
>
> [...]
>> + if (!pc->reg_ds) {
>> + dev_err(pc->dev, "drive-strength not supported\n");
> I'm getting this on one of my Meson8m2 boards:
> $ # cat /sys/kernel/debug/pinctrl/c1109880.pinctrl-pinctrl-meson/pinconf-pins
> ...
> [ 874.748531] meson8-pinctrl c1109880.pinctrl: drive-strength not supported
> [ 874.755278] meson8-pinctrl c1109880.pinctrl: drive-strength not supported
> [ 874.762086] meson8-pinctrl c1109880.pinctrl: drive-strength not supported
> Pin config settings per pin
> Format: pin (name): configs
> pin 0 (GPIOX_0): input bias disabled
> pin 1 (GPIOX_1): input bias disabled
> pin 2 (GPIOX_2): input bias disabled
> ...
>
> I believe we are not supposed to complain when getting the
> drive-strength when reg_ds is absent.
> all pre-G12A SoCs don't have reg_ds, so we don't need to error-out in
> that case (because that's perfectly valid)
>
> [...]
>> +static int meson_pinconf_get_drive_strength(struct meson_pinctrl *pc,
>> + unsigned int pin,
>> + u16 *drive_strength_ua)
>> +{
>> + struct meson_bank *bank;
>> + unsigned int reg, bit;
>> + unsigned int val;
>> + int ret;
>> +
>> + if (!pc->reg_ds) {
>> + dev_err(pc->dev, "drive-strength not supported\n");
> based on your previous explanation (that you want to inform the .dts
> author that he's doing something wrong) I'm happy with this error if
> Linus W. doesn't veto this.
>
>
> Regards
> Martin
Guillaume
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2019-05-09 11:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 11:57 [PATCH v3 0/6] Add drive-strength in Meson pinctrl driver Guillaume La Roque
2019-05-07 11:57 ` [PATCH v3 1/6] dt-bindings: pinctrl: add a 'drive-strength-microamp' property Guillaume La Roque
2019-05-07 17:37 ` Martin Blumenstingl
2019-05-07 11:57 ` [PATCH v3 2/6] pinctrl: generic: add new 'drive-strength-microamp' property support Guillaume La Roque
2019-05-07 11:57 ` [PATCH v3 3/6] dt-bindings: pinctrl: meson: Add drive-strength-microamp property Guillaume La Roque
2019-05-07 17:37 ` Martin Blumenstingl
2019-05-07 11:57 ` [PATCH v3 4/6] pinctrl: meson: Rework enable/disable bias part Guillaume La Roque
2019-05-07 17:53 ` Martin Blumenstingl
2019-05-09 11:25 ` guillaume La Roque
2019-05-07 11:57 ` [PATCH v3 5/6] pinctrl: meson: add support of drive-strength-microamp Guillaume La Roque
2019-05-07 18:18 ` Martin Blumenstingl
2019-05-09 11:23 ` guillaume La Roque [this message]
2019-05-07 11:57 ` [PATCH v3 6/6] pinctrl: meson: g12a: add DS bank value Guillaume La Roque
2019-05-07 18:09 ` Martin Blumenstingl
2019-05-07 15:45 ` [PATCH v3 0/6] Add drive-strength in Meson pinctrl driver Jerome Brunet
2019-05-07 18:03 ` Martin Blumenstingl
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=4e44984f-eb76-87d1-e458-506bcccf1500@baylibre.com \
--to=glaroque@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).