Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aab7761c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull GPIO fixes from Linus Walleij:

 - LP87565: set the proper output level for direction_output.

 - stm32: fix the kernel build by selecting the hierarchical irqdomain
   symbol properly - this happens to be done in the pin control
   framework but whatever, it had dependencies to GPIO so we need to
   apply it here.

 - Select the hierarchical IRQ domain also for Xgene.

 - Fix wakeups to work on MXC.

 - Fix up the device tree binding on Exar that went astray, also add the
   right bindings.

 - Fix the unwanted events for edges from the library.

 - Fix the unbalanced chanined IRQ on the Tegra.

* tag 'gpio-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: tegra: fix unbalanced chained_irq_enter/exit
  gpiolib: skip unwanted events, don't convert them to opposite edge
  gpio: exar: Use correct property prefix and document bindings
  gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source
  gpio: xgene-sb: select IRQ_DOMAIN_HIERARCHY
  pinctrl: stm32: select IRQ_DOMAIN_HIERARCHY instead of depends on
  gpio: lp87565: Set proper output level and direction for direction_output
  MAINTAINERS: Add entry for Whiskey Cove PMIC GPIO driver
parents ef9ca02b 9e9509e3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
Exportable MPIO interface of Exar UART chips

Required properties of the device:
 - exar,first-pin: first exportable pins (0..15)
 - ngpios: number of exportable pins (1..16)
+6 −0
Original line number Diff line number Diff line
@@ -14218,6 +14218,12 @@ F: drivers/watchdog/
F:	include/linux/watchdog.h
F:	include/uapi/linux/watchdog.h

WHISKEYCOVE PMIC GPIO DRIVER
M:	Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
L:	linux-gpio@vger.kernel.org
S:	Maintained
F:	drivers/gpio/gpio-wcove.c

WIIMOTE HID DRIVER
M:	David Herrmann <dh.herrmann@googlemail.com>
L:	linux-input@vger.kernel.org
+1 −0
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ config GPIO_XGENE_SB
	depends on ARCH_XGENE && OF_GPIO
	select GPIO_GENERIC
	select GPIOLIB_IRQCHIP
	select IRQ_DOMAIN_HIERARCHY
	help
	  This driver supports the GPIO block within the APM X-Gene
	  Standby Domain. Say yes here to enable the GPIO functionality.
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static int gpio_exar_probe(struct platform_device *pdev)
	if (!p)
		return -ENOMEM;

	ret = device_property_read_u32(&pdev->dev, "linux,first-pin",
	ret = device_property_read_u32(&pdev->dev, "exar,first-pin",
				       &first_pin);
	if (ret)
		return ret;
+24 −22
Original line number Diff line number Diff line
@@ -26,6 +26,27 @@ struct lp87565_gpio {
	struct regmap *map;
};

static int lp87565_gpio_get(struct gpio_chip *chip, unsigned int offset)
{
	struct lp87565_gpio *gpio = gpiochip_get_data(chip);
	int ret, val;

	ret = regmap_read(gpio->map, LP87565_REG_GPIO_IN, &val);
	if (ret < 0)
		return ret;

	return !!(val & BIT(offset));
}

static void lp87565_gpio_set(struct gpio_chip *chip, unsigned int offset,
			     int value)
{
	struct lp87565_gpio *gpio = gpiochip_get_data(chip);

	regmap_update_bits(gpio->map, LP87565_REG_GPIO_OUT,
			   BIT(offset), value ? BIT(offset) : 0);
}

static int lp87565_gpio_get_direction(struct gpio_chip *chip,
				      unsigned int offset)
{
@@ -54,30 +75,11 @@ static int lp87565_gpio_direction_output(struct gpio_chip *chip,
{
	struct lp87565_gpio *gpio = gpiochip_get_data(chip);

	lp87565_gpio_set(chip, offset, value);

	return regmap_update_bits(gpio->map,
				  LP87565_REG_GPIO_CONFIG,
				  BIT(offset), !value ? BIT(offset) : 0);
}

static int lp87565_gpio_get(struct gpio_chip *chip, unsigned int offset)
{
	struct lp87565_gpio *gpio = gpiochip_get_data(chip);
	int ret, val;

	ret = regmap_read(gpio->map, LP87565_REG_GPIO_IN, &val);
	if (ret < 0)
		return ret;

	return !!(val & BIT(offset));
}

static void lp87565_gpio_set(struct gpio_chip *chip, unsigned int offset,
			     int value)
{
	struct lp87565_gpio *gpio = gpiochip_get_data(chip);

	regmap_update_bits(gpio->map, LP87565_REG_GPIO_OUT,
			   BIT(offset), value ? BIT(offset) : 0);
				  BIT(offset), BIT(offset));
}

static int lp87565_gpio_request(struct gpio_chip *gc, unsigned int offset)
Loading