[PATCH v4 2/4] pwm: sun50i: Add H616 PWM support

Paul Kocialkowski paulk at sys-base.io
Mon Apr 13 08:58:33 PDT 2026


Hi Maksim,

On Mon 13 Apr 26, 15:39, bigunclemax at gmail.com wrote:
> > +
> > +/* PWM Capture Fall Lock Register */
> > +#define H616_PWM_CFLR(x)		(0x74 + (x) * 0x20)
> > +
> > +#define H616_PWM_PAIR_IDX(chan)		((chan) >> 2)
> > +
> 
> It looks like there's a typo or a mistake in the PAIR_IDX calculation.
> It should be like ((chan) >> 1).
> For example, for the 5th channel the result will be 1, but it should be 2.

Had a quick look at it too and I agree with you. A right shift by 2 essentially
groups pwms by 4, not 2. So pwms 2 and 3 would also be reported as part of
index 0.

All the best,

Paul

-- 
Paul Kocialkowski,

Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/

Expert in multimedia, graphics and embedded hardware support with Linux.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260413/c648fc26/attachment.sig>


More information about the linux-arm-kernel mailing list