pwm: meson: Don't duplicate the polarity internally
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Wed, 12 Jun 2019 19:59:02 +0000 (21:59 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 26 Jun 2019 09:39:08 +0000 (11:39 +0200)
commitb79c3670e120c6c6aee313c56acd9bbb13db310f
tree3459bebd4bd0b6a943a4976164f8d339d82d32d4
parent33cefd84d26b59e071b3172b0e3ca979163f39eb
pwm: meson: Don't duplicate the polarity internally

Let meson_pwm_calc() use the polarity from struct pwm_state directly.
This removes a level of indirection where meson_pwm_apply() first had to
set a driver-internal inverter mask which was then only used by
meson_pwm_calc().

Instead of adding the polarity as parameter to meson_pwm_calc() switch
to struct pwm_state directly to make it easier to see where the
parameters are actually coming from.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-meson.c