Messages in this thread | | | Date | Tue, 11 Jun 2019 17:38:08 +0200 | From | Uwe Kleine-König <> | Subject | Re: [PATCH v2 03/14] pwm: meson: use GENMASK and FIELD_PREP for the lo and hi values |
| |
On Sat, Jun 08, 2019 at 08:06:15PM +0200, Martin Blumenstingl wrote: > meson_pwm_calc() ensures that "lo" is always less than 16 bits wide > (otherwise it would overflow into the "hi" part of the REG_PWM_{A,B} > register). > Use GENMASK and FIELD_PREP for the lo and hi values to make it easier to > spot how wide these are internally. Additionally this is a preparation > step for the .get_state() implementation where the GENMASK() for lo and > hi becomes handy because it can be used with FIELD_GET() to extract the > values from the register REG_PWM_{A,B} register. > > No functional changes intended. > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> > Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards Uwe
-- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
| |