[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 <>
> Reviewed-by: Neil Armstrong <>

Reviewed-by: Uwe Kleine-König <>

Best regards

Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | |

 \ /
  Last update: 2019-06-11 17:39    [W:0.106 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site