[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SHXPR01MB07352176E8B44BF3FD3A7A4A9F66A@SHXPR01MB0735.CHNPR01.prod.partner.outlook.cn>
Date: Fri, 5 Jan 2024 08:02:29 +0000
From: William Qiu <william.qiu@...rfivetech.com>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
CC: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>, Emil Renner Berthing
<kernel@...il.dk>, Rob Herring <robh+dt@...nel.org>, Thierry Reding
<thierry.reding@...il.com>, Philipp Zabel <p.zabel@...gutronix.de>, Krzysztof
Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley
<conor+dt@...nel.org>, Hal Feng <hal.feng@...rfivetech.com>, Paul Walmsley
<paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, Albert Ou
<aou@...s.berkeley.edu>
Subject: RE: [PATCH v10 2/4] pwm: opencores: Add PWM driver support
> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> Sent: 2024年1月5日 6:41
> To: William Qiu <william.qiu@...rfivetech.com>
> Cc: devicetree@...r.kernel.org; linux-kernel@...r.kernel.org;
> linux-riscv@...ts.infradead.org; linux-pwm@...r.kernel.org; Emil Renner
> Berthing <kernel@...il.dk>; Rob Herring <robh+dt@...nel.org>; Thierry
> Reding <thierry.reding@...il.com>; Philipp Zabel <p.zabel@...gutronix.de>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>; Conor Dooley
> <conor+dt@...nel.org>; Hal Feng <hal.feng@...rfivetech.com>; Paul
> Walmsley <paul.walmsley@...ive.com>; Palmer Dabbelt
> <palmer@...belt.com>; Albert Ou <aou@...s.berkeley.edu>
> Subject: Re: [PATCH v10 2/4] pwm: opencores: Add PWM driver support
>
> Hello again,
>
> On Fri, Dec 22, 2023 at 05:45:46PM +0800, William Qiu wrote:
> > +static const struct ocores_pwm_data jh7100_pwm_data = {
> > + .get_ch_base = starfive_jh71x0_get_ch_base, };
> > +
> > +static const struct ocores_pwm_data jh7110_pwm_data = {
> > + .get_ch_base = starfive_jh71x0_get_ch_base, };
> > +
> > +static const struct of_device_id ocores_pwm_of_match[] = {
> > + { .compatible = "opencores,pwm-v1" },
> > + { .compatible = "starfive,jh7100-pwm", .data = &jh7100_pwm_data},
> > + { .compatible = "starfive,jh7110-pwm", .data = &jh7110_pwm_data},
> > + { /* sentinel */ }
>
> Looking at the binding
>
> compatible = "opencores,pwm-v1";
>
> isn't a valid configuration. If that is indeed the case and you always have either
> starfive,jh7100-pwm or starfive,jh7110-pwm, you can drop the logic to only use
> starfive_jh71x0_get_ch_base conditionally.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König
> |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
Hi Uwe,
I just upload code for OpenCores.. And I need to add the starfive_jh71x0_get_ch_base
to compatibility with jh71x0. So even the "opencores,pwm-v1" isn't a valid
configuration, but I still need to add it for OpenCores.
Best Regards,
William
Powered by blists - more mailing lists