[PATCH 1/7] pwm: sifive: Simplify offset calculation for PWMCMP registers

Thierry Reding thierry.reding at gmail.com
Thu Jul 28 10:12:44 PDT 2022


On Thu, Jul 21, 2022 at 12:31:23PM +0200, Uwe Kleine-König wrote:
> Instead of explicitly using PWM_SIFIVE_PWMCMP0 + pwm->hwpwm *
> PWM_SIFIVE_SIZE_PWMCMP for each access to one of the PWMCMP registers,
> introduce a macro that takes the hwpwm id as parameter.
> 
> For the register definition using a plain 4 instead of the cpp constant
> PWM_SIFIVE_SIZE_PWMCMP is easier to read, so define the offset macro
> without the constant. The latter can then be dropped as there are no
> users left.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
>  drivers/pwm/pwm-sifive.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)

I've applied the whole series now, thanks.

Thierry
-------------- 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-riscv/attachments/20220728/30f3c6bc/attachment.sig>


More information about the linux-riscv mailing list