From: Andrea della Porta <andrea.porta@suse.com>
To: Stanimir Varbanov <svarbanov@suse.de>
Cc: Andrea della Porta <andrea.porta@suse.com>,
linus.walleij@linaro.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, florian.fainelli@broadcom.com,
wahrenst@gmx.net, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
iivanov@suse.de, mbrugger@suse.com,
Jonathan Bell <jonathan@raspberrypi.com>,
Phil Elwell <phil@raspberrypi.com>
Subject: Re: [PATCH v3 2/3] pinctrl: bcm: Add STB family pin controller driver
Date: Tue, 19 Aug 2025 10:14:14 +0200 [thread overview]
Message-ID: <aKQyViTbXAsFEuT7@apocalypse> (raw)
In-Reply-To: <f7892abc-1063-4b12-8d47-c80714aeb8fe@suse.de>
Hi Stanimir,
On 10:40 Tue 19 Aug , Stanimir Varbanov wrote:
> Hi Andrea,
>
> On 8/11/25 5:46 PM, Andrea della Porta wrote:
> > From: "Ivan T. Ivanov" <iivanov@suse.de>
> >
> > This driver provide pin muxing and configuration functionality
> > for BCM2712 SoC used by RPi5. According to [1] this chip is an
> > instance of the one used in Broadcom STB product line.
> >
> > [1] https://lore.kernel.org/lkml/f6601f73-cb22-4ba3-88c5-241be8421fc3@broadcom.com/
> >
> > Cc: Jonathan Bell <jonathan@raspberrypi.com>
> > Cc: Phil Elwell <phil@raspberrypi.com>
> > Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
> > Reviewed-by: Phil Elwell <phil@raspberrypi.com>
> > Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> > ---
> > drivers/pinctrl/bcm/Kconfig | 13 +
> > drivers/pinctrl/bcm/Makefile | 1 +
> > drivers/pinctrl/bcm/pinctrl-brcmstb.c | 1197 +++++++++++++++++++++++++
> > 3 files changed, 1211 insertions(+)
> > create mode 100644 drivers/pinctrl/bcm/pinctrl-brcmstb.c
> >
>
> <snip>
>
> > +static int brcmstb_pinctrl_probe(struct platform_device *pdev)
> > +{
> > + struct device *dev = &pdev->dev;
> > + struct device_node *np = dev->of_node;
> > + const struct brcmstb_pdata *pdata;
> > + const struct of_device_id *match;
> > + struct brcmstb_pinctrl *pc;
> > + const char **names;
> > + int num_pins, i;
> > +
> > + match = of_match_node(brcmstb_pinctrl_match, np);
>
> The 'match' variable is needless, you can drop it.
you mean something like this?
pdata = of_match_node(brcmstb_pinctrl_match, np)->data;
I thought that kind of compact code was not really the way to go,
at least taking a look at other driver exmaples: there's only one
avoiding the intermediate variable and many others using it (although
in some cases they also check for null, so in that case is fully
justified). Anyway, I've no preference on that so I can proceed with
your suggestion, unless anyone has something against it.
Many thanks,
Andrea
>
> > + pdata = match->data;
> > +
>
> <snip>
>
> ~Stan
>
next prev parent reply other threads:[~2025-08-19 8:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 14:46 [PATCH v3 0/3] Add pin control driver for BCM2712 SoC Andrea della Porta
2025-08-11 14:46 ` [PATCH v3 1/3] dt-bindings: pinctrl: Add support for Broadcom STB pin controller Andrea della Porta
2025-08-18 17:20 ` Rob Herring
2025-08-27 9:58 ` Andrea della Porta
2025-08-11 14:46 ` [PATCH v3 2/3] pinctrl: bcm: Add STB family pin controller driver Andrea della Porta
2025-08-19 7:40 ` Stanimir Varbanov
2025-08-19 8:14 ` Andrea della Porta [this message]
2025-08-19 8:19 ` Stanimir Varbanov
2025-08-19 8:40 ` Andrea della Porta
2025-08-19 9:18 ` Stefan Wahren
2025-08-21 15:36 ` Andrea della Porta
2025-08-27 16:32 ` Florian Fainelli
2025-08-27 16:31 ` Florian Fainelli
2025-08-19 9:37 ` Linus Walleij
2025-08-21 15:46 ` Andrea della Porta
2025-08-24 9:57 ` Stefan Wahren
2025-08-27 14:00 ` Andrea della Porta
2025-08-11 14:46 ` [PATCH v3 3/3] arm64: defconfig: Enable BCM2712 on-chip " Andrea della Porta
2025-08-19 7:25 ` Stanimir Varbanov
2025-08-21 9:35 ` Andrea della Porta
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=aKQyViTbXAsFEuT7@apocalypse \
--to=andrea.porta@suse.com \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=iivanov@suse.de \
--cc=jonathan@raspberrypi.com \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mbrugger@suse.com \
--cc=phil@raspberrypi.com \
--cc=robh@kernel.org \
--cc=svarbanov@suse.de \
--cc=wahrenst@gmx.net \
--cc=will@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).