diff options
author | Uwe Kleine-König <ukleinek@baylibre.com> | 2024-06-07 10:44:16 +0200 |
---|---|---|
committer | Uwe Kleine-König <ukleinek@kernel.org> | 2024-07-10 17:52:47 +0200 |
commit | 40571a5b3b73c6c5189e55ff82b97a58bec371a1 (patch) | |
tree | ee13aa509c6ab343a6275603f83fa90d4ef0af1d /include/linux/percpu_counter.h | |
parent | f7d5463e2a8f1fef855af2b62a1f7b59b830ad05 (diff) |
pwm: cros-ec: Simplify device tree xlation
The cros-ec device tree binding only uses #pwm-cells = <1>, and so there
is no period provided in the device tree. Up to now this was handled by
hardcoding the period to the only supported value in the custom xlate
callback. Apart from that, the default xlate callback (i.e.
of_pwm_xlate_with_flags()) handles this just fine (and better, e.g. by
checking args->args_count >= 1 before accessing args->args[0]).
To simplify make use of of_pwm_xlate_with_flags(), drop the custom
callback and provide the default period in .probe() already.
Apart from simplifying the driver this also drops the last non-core user
of pwm_request_from_chip() and so makes further simplifications
possible.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20240607084416.897777-7-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'include/linux/percpu_counter.h')
0 files changed, 0 insertions, 0 deletions