diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-05-23 15:32:49 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-05-23 15:32:49 +0300 |
commit | 0869331fbaa2c11c9e94e45305d17ce447189a0a (patch) | |
tree | ceb7a26a3f39146dcf9bec3667ff19169bd5026b /drivers/gpio | |
parent | e0e14cdff31d326f81e0edbd5140f788c870756c (diff) | |
parent | 4b0986a3613c92f4ec1bdc7f60ec66fea135991f (diff) | |
download | linux-0869331fbaa2c11c9e94e45305d17ce447189a0a.tar.xz |
Merge remote-tracking branch 'torvalds/master' into perf/core
To get the rest of 5.18.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-mvebu.c | 3 | ||||
-rw-r--r-- | drivers/gpio/gpio-vf610.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index a2c8dd329b31..2db19cd640a4 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -707,6 +707,9 @@ static int mvebu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, unsigned long flags; unsigned int on, off; + if (state->polarity != PWM_POLARITY_NORMAL) + return -EINVAL; + val = (unsigned long long) mvpwm->clk_rate * state->duty_cycle; do_div(val, NSEC_PER_SEC); if (val > UINT_MAX + 1ULL) diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index 20780c35da1b..23cddb265a0d 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -125,9 +125,13 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, { struct vf610_gpio_port *port = gpiochip_get_data(chip); unsigned long mask = BIT(gpio); + u32 val; - if (port->sdata && port->sdata->have_paddr) - vf610_gpio_writel(mask, port->gpio_base + GPIO_PDDR); + if (port->sdata && port->sdata->have_paddr) { + val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR); + val |= mask; + vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR); + } vf610_gpio_set(chip, gpio, value); |