summaryrefslogtreecommitdiff
path: root/drivers/comedi
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-07-21 12:31:23 +0200
committerThierry Reding <thierry.reding@gmail.com>2022-07-29 13:40:40 +0200
commit20550a61880fc55e68a0d290ad195b74729c0e7b (patch)
tree8effd776b1e52377101ee03da9e5c2f97c0a5485 /drivers/comedi
parent394b517585da9fbb2eea2f2103ff47d37321e976 (diff)
pwm: sifive: Simplify offset calculation for PWMCMP registers
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@pengutronix.de> Tested-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/comedi')
0 files changed, 0 insertions, 0 deletions