Thread (29 messages) 29 messages, 5 authors, 2012-12-18

[PATCH RESEND 0/6 v10] gpio: Add block GPIO

From: Russell King - ARM Linux <hidden>
Date: 2012-12-17 12:10:56
Also in: lkml

On Mon, Dec 17, 2012 at 12:51:32PM +0100, Wolfgang Grandegger wrote:
+static void at91_gpiolib_set_block(struct gpio_chip *chip, unsigned long mask, unsigned long val)
+{
+	struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
+	void __iomem *pio = at91_gpio->regbase;
+	u32 set_bits = val & mask;
+	u32 clr_bits = ~val & mask;
+
+	/* GPIO outputs can only be set at once or cleared at once */
+	if (set_bits)
+		__raw_writel(set_bits, pio + PIO_SODR);
+	if (clr_bits)
+		__raw_writel(clr_bits, pio + PIO_CODR);
+}
You obviously didn't see my email...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help