[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PUZPR06MB5887FD7B2F0F768FAFE4C1F0EFEEA@PUZPR06MB5887.apcprd06.prod.outlook.com>
Date: Thu, 9 Oct 2025 11:00:32 +0000
From: Gary Yang <gary.yang@...tech.com>
To: Linus Walleij <linus.walleij@...aro.org>
CC: "robh@...nel.org" <robh@...nel.org>, "krzk+dt@...nel.org"
<krzk+dt@...nel.org>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, cix-kernel-upstream
<cix-kernel-upstream@...tech.com>
Subject:
回复: [v2 1/3] pinctrl: cix: Add pin-controller support for sky1
Hi Linus:
I'm glad to receive your reply.
> EXTERNAL EMAIL
>
> Hi Gary,
>
> thanks for your efforts!
>
> Sorry for taking so much time to respond. I was coding.
>
> On Thu, Sep 18, 2025 at 8:17 AM Gary Yang <gary.yang@...tech.com> wrote:
>
> > New scheme with macros has verified ok. I just want to confirm with
> > you before submit codes
>
> No need to confirm with me just post it!
> Better one post too much than one too little.
>
Ok, We will post the next version as soon as possible.
> > > But I think you can still use a macro to define the long pin tables?
> > > Albeit macros with flexible arguments is a bit hard to write.
> > > Save it until everything else is working.
> > >
> > In header file:
> >
> > struct sky1_pin_desc {
> > const struct pinctrl_pin_desc pin;
> > const char **func_group;
> > unsigned int nfunc;
> > };
> >
> > #define SKY_PINFUNCTION(_pin, _func) \
> > (struct sky1_pin_desc) { \
> > .pin = _pin, \
> > .func_group = _func##_group, \
> > .nfunc = ARRAY_SIZE(_func##_group), \
> > }
> >
> > In C file:
> >
> > static const char *gpio1_group[] = {"GPIO1"}; static const char
> > *gpio2_group[] = {"GPIO2"};
> >
> > static const struct sky1_pin_desc sky1_pinctrl_s5_pads[] = {
> > SKY_PINFUNCTION(PINCTRL_PIN(0, "GPIO1"), gpio1),
> > SKY_PINFUNCTION(PINCTRL_PIN(1, "GPIO2"), gpio2),
> > .......
> > };
> >
> > What's your suggestion? Thanks
>
> It's OK as-is if this is how you want to structure things!
>
Thanks for your understanding. We will adopt this scheme in next version.
> Yours,
> Linus Walleij
Best wishes
Gary
Powered by blists - more mailing lists