[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xnrjz7v4trkhayskyn5efksqor4xnxz7zbf6qgk3qvnybncrit@ejgnw2hl3fon>
Date: Mon, 19 Jan 2026 17:41:23 +0100
From: Uwe Kleine-König <ukleinek@...nel.org>
To: George Moussalem <george.moussalem@...look.com>
Cc: Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Baruch Siach <baruch@...s.co.il>,
Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
linux-arm-msm@...r.kernel.org, linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Devi Priya <quic_devipriy@...cinc.com>,
Baruch Siach <baruch.siach@...s.co.il>
Subject: Re: [PATCH v19 2/6] pwm: driver for qualcomm ipq6018 pwm block
Hello,
On Mon, Dec 08, 2025 at 07:40:21PM +0400, George Moussalem wrote:
> On 11/28/25 15:32, Konrad Dybcio wrote:
> > On 11/28/25 11:29 AM, George Moussalem via B4 Relay wrote:
> >> +static unsigned int ipq_pwm_reg_read(struct pwm_device *pwm, unsigned int reg)
> >> +{
> >> + struct ipq_pwm_chip *ipq_chip = ipq_pwm_from_chip(pwm->chip);
> >> + unsigned int off = 8 * pwm->hwpwm + reg;
> >
> > This magic 8 could be #defined as IPQ6018_PWM_CONTROLLER_STRIDE or so
>
> good suggestion, will add it should another iteration be required.
I don't consider that an advantage. If I see a register dump and want to
interpret it, I think
8 * pwm->hwpwm + reg
is much more helpful than
IPQ_PWM_CONTROLLER_STRIDE * pwm->hwpwm + reg
where I have to check the value of the define. Yes, then the 8 appears
twice (i.e. in reg_read and reg_write), but IMHO that's ok.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists