From: Paul Barker <paul.barker.ct@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/9] pinctrl: renesas: rzg2l: Clarify OEN read/write support
Date: Mon, 17 Jun 2024 15:22:24 +0100 [thread overview]
Message-ID: <fa470a75-84e8-4924-9e1c-365cb397a391@bp.renesas.com> (raw)
In-Reply-To: <CAMuHMdW-BrHBt9eDw_GaW7JwJ+TP6Q+68EN1Tpp2Z5H00Dq+3g@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2675 bytes --]
On 17/06/2024 12:52, Geert Uytterhoeven wrote:
> Hi Paul,
>
> On Tue, Jun 11, 2024 at 1:32 PM Paul Barker
> <paul.barker.ct@bp.renesas.com> wrote:
>> We currently support OEN read/write for the RZ/G3S SoC but not the
>> RZ/G2L SoC family (consisting of RZ/G2L, RZ/G2LC, RZ/G2UL, RZ/V2L &
>> RZ/Five). The appropriate functions are renamed to clarify this.
>>
>> We should also only set the oen_read and oen_write function pointers for
>> the devices which support these operations. This requires us to check
>> that these function pointers are valid before calling them.
>>
>> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
>> ---
>> Changes v1->v2:
>> * New patch to clarify function names.
>
> Thanks for your patch!
>
>> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
>> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
>
>> @@ -1016,31 +1016,31 @@ static u8 rzg2l_pin_to_oen_bit(u32 offset, u8 pin, u8 max_port)
>> return pin;
>> }
>>
>> -static u32 rzg2l_read_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin)
>> +static u32 rzg3s_read_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin)
>
>> -static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen)
>> +static int rzg3s_write_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen)
>
> As commit 7d566a4d270c52ff ("pinctrl: renesas: rzg2l: Add function
> pointers for OEN register access") did not rename
> rzg2l_{read,write}_oen() to rzg2l_oen_{read,write}(), to match the
> .oen_{read,write}() callback names, this is a good opportunity to fix
> that oversight.
Ack.
>
> The v2h variants already match the callback names.
>
>> @@ -1215,6 +1215,8 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
>> break;
>>
>> case PIN_CONFIG_OUTPUT_ENABLE:
>> + if (!pctrl->data->oen_read)
>> + return -EOPNOTSUPP;
>
> Perhaps the check for PIN_CFG_OEN in each of the .oen_read()
> callbacks should be moved here?
Ack.
>
>> arg = pctrl->data->oen_read(pctrl, cfg, _pin, bit);
>> if (!arg)
>> return -EINVAL;
>> @@ -1354,6 +1356,8 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
>>
>> case PIN_CONFIG_OUTPUT_ENABLE:
>> arg = pinconf_to_config_argument(_configs[i]);
>> + if (!pctrl->data->oen_write)
>> + return -EOPNOTSUPP;
>
> Likewise.
Ack.
I'll fix these in v3.
Thanks,
--
Paul Barker
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3577 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2024-06-17 14:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 11:31 [PATCH v2 0/9] Configure GbEth for RGMII on RZ/G2L family Paul Barker
2024-06-11 11:31 ` [PATCH v2 1/9] pinctrl: renesas: rzg2l: Clarify OEN read/write support Paul Barker
2024-06-17 11:52 ` Geert Uytterhoeven
2024-06-17 14:22 ` Paul Barker [this message]
2024-06-11 11:31 ` [PATCH v2 2/9] pinctrl: renesas: rzg2l: Clean up and refactor OEN read/write functions Paul Barker
2024-06-17 12:02 ` Geert Uytterhoeven
2024-06-25 19:56 ` Paul Barker
2024-06-26 6:19 ` claudiu beznea
2024-06-11 11:31 ` [PATCH v2 3/9] pinctrl: renesas: rzg2l: Support output enable on RZ/G2L Paul Barker
2024-06-17 12:15 ` Geert Uytterhoeven
2024-06-11 11:31 ` [PATCH v2 4/9] arm64: dts: renesas: rzg2l: Enable Ethernet TXC output Paul Barker
2024-06-11 11:31 ` [PATCH v2 5/9] arm64: dts: renesas: rzg2lc: " Paul Barker
2024-06-11 11:32 ` [PATCH v2 6/9] arm64: dts: renesas: rzg2ul: " Paul Barker
2024-06-11 11:32 ` [PATCH v2 7/9] arm64: dts: renesas: rzg2l: Set Ethernet PVDD to 1.8V Paul Barker
2024-06-11 11:32 ` [PATCH v2 8/9] arm64: dts: renesas: rzg2lc: " Paul Barker
2024-06-11 11:32 ` [PATCH v2 9/9] arm64: dts: renesas: rzg2ul: " Paul Barker
2024-06-11 13:14 ` [PATCH v2 0/9] Configure GbEth for RGMII on RZ/G2L family Linus Walleij
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=fa470a75-84e8-4924-9e1c-365cb397a391@bp.renesas.com \
--to=paul.barker.ct@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@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
all inboxes | Powered by JetHome®