X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fpwm%2Fpwm-cros-ec.c;h=9fffb566af5f94ea699dfc17a7a7940ca7bb38b0;hb=142b507f911c5a502dbb8f603216cb0ea8a79a48;hp=c1c337969e4ecb45520c3e03b2f3c38047f8bd75;hpb=ff2bb93f53782bbf7500d521368435921912ad04;p=linux-2.6-microblaze.git diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c index c1c337969e4e..9fffb566af5f 100644 --- a/drivers/pwm/pwm-cros-ec.c +++ b/drivers/pwm/pwm-cros-ec.c @@ -124,6 +124,9 @@ static int cros_ec_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, if (state->period != EC_PWM_MAX_DUTY) return -EINVAL; + if (state->polarity != PWM_POLARITY_NORMAL) + return -EINVAL; + /* * EC doesn't separate the concept of duty cycle and enabled, but * kernel does. Translate. @@ -253,7 +256,6 @@ static int cros_ec_pwm_probe(struct platform_device *pdev) chip->ops = &cros_ec_pwm_ops; chip->of_xlate = cros_ec_pwm_xlate; chip->of_pwm_n_cells = 1; - chip->base = -1; ret = cros_ec_num_pwms(ec); if (ret < 0) { dev_err(dev, "Couldn't find PWMs: %d\n", ret);