Use userspace chosen channel numbers when starting bl602 pwm
commit 2889315c20
added support for pwm
but didn't read the channel numbers provided by user-space. They should
be, otherwise it's not possible to start a sub-set of channels that are
not the first "n" channels.
This commit is contained in:
parent
cf2dfa8985
commit
934a79736a
@ -381,9 +381,9 @@ static int bl602_pwm_start(struct pwm_lowerhalf_s *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
bl602_pwm_freq(priv, i, info->frequency);
|
||||
bl602_pwm_duty(priv, i, info->channels[i].duty);
|
||||
pwm_channel_enable(i);
|
||||
bl602_pwm_freq(priv, chan, info->frequency);
|
||||
bl602_pwm_duty(priv, chan, info->channels[i].duty);
|
||||
pwm_channel_enable(chan);
|
||||
}
|
||||
#else
|
||||
bl602_pwm_freq(priv, 0, info->frequency);
|
||||
|
Loading…
Reference in New Issue
Block a user