Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-fixes-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- fix bitops logic in gpio-vf610

- return an error if the user tries to use inverted polarity in
gpio-mvebu

* tag 'gpio-fixes-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: mvebu/pwm: Refuse requests with inverted polarity
gpio: gpio-vf610: do not touch other bits when set the target bit

+9 -2
+3
drivers/gpio/gpio-mvebu.c
··· 707 707 unsigned long flags; 708 708 unsigned int on, off; 709 709 710 + if (state->polarity != PWM_POLARITY_NORMAL) 711 + return -EINVAL; 712 + 710 713 val = (unsigned long long) mvpwm->clk_rate * state->duty_cycle; 711 714 do_div(val, NSEC_PER_SEC); 712 715 if (val > UINT_MAX + 1ULL)
+6 -2
drivers/gpio/gpio-vf610.c
··· 125 125 { 126 126 struct vf610_gpio_port *port = gpiochip_get_data(chip); 127 127 unsigned long mask = BIT(gpio); 128 + u32 val; 128 129 129 - if (port->sdata && port->sdata->have_paddr) 130 - vf610_gpio_writel(mask, port->gpio_base + GPIO_PDDR); 130 + if (port->sdata && port->sdata->have_paddr) { 131 + val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR); 132 + val |= mask; 133 + vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR); 134 + } 131 135 132 136 vf610_gpio_set(chip, gpio, value); 133 137