pwm: sprd: Refuse requests with unsupported polarity
The driver only supports normal polarity and so should refuse requests for inversed polarity. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Chunyan Zhang <zhang.lyra@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
c77e99f434
commit
09081c9ba6
@ -164,6 +164,9 @@ static int sprd_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
struct pwm_state *cstate = &pwm->state;
|
||||
int ret;
|
||||
|
||||
if (state->polarity != PWM_POLARITY_NORMAL)
|
||||
return -EINVAL;
|
||||
|
||||
if (state->enabled) {
|
||||
if (!cstate->enabled) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user