drivers: pwm_nrf5_sw: Treat pwm parameter as PWM channel, not SoC pin

Align with other PWM drivers and treat the `pwm` parameter (described
ambiguously as "PWM pin") of the `pwm_pin_set_cycles` function as a PWM
channel, not an SoC pin. This will also make the driver consistent with
the `pwm-cells` property definition in the "nordic,nrf-sw-pwm" binding
and with related `DT_PWMS_*` macros.
The change described above requires also providing a way to specify
SoC pins that are to be assigned to the PWM channels. Hence, the commit
introduces in the "nordic,nrf-sw-pwm" binding the `channel-gpios`
property that replaces the `channel-count` one.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2022-04-13 11:44:24 +02:00 committed by Carles Cufí
commit c23a449bfb
10 changed files with 68 additions and 72 deletions

View file

@ -335,7 +335,6 @@
status = "disabled";
label = "SW_PWM";
generator = <&timer2>;
channel-count = <3>;
clock-prescaler = <0>;
#pwm-cells = <1>;
};