aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mvebu.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-11-06 15:26:23 -0500
committerTejun Heo <tj@kernel.org>2012-11-06 15:26:23 -0500
commit5b805f2a7675634fbdf9ac1c9b2256905ab2ea68 (patch)
treeee00d1e3d757458d66209b926d274491c6c3f61c /drivers/gpio/gpio-mvebu.c
parent1db1e31b1ee3ae126ef98f39083b5f213c7b41bf (diff)
parent201e72acb2d3821e2de9ce6091e98859c316b29a (diff)
Merge branch 'cgroup/for-3.7-fixes' into cgroup/for-3.8
This is to receive device_cgroup fixes so that further device_cgroup changes can be made in cgroup/for-3.8. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/gpio/gpio-mvebu.c')
-rw-r--r--drivers/gpio/gpio-mvebu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 902af437eaf2..cf7afb9eb61a 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -244,6 +244,8 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
244 if (ret) 244 if (ret)
245 return ret; 245 return ret;
246 246
247 mvebu_gpio_set(chip, pin, value);
248
247 spin_lock_irqsave(&mvchip->lock, flags); 249 spin_lock_irqsave(&mvchip->lock, flags);
248 u = readl_relaxed(mvebu_gpioreg_io_conf(mvchip)); 250 u = readl_relaxed(mvebu_gpioreg_io_conf(mvchip));
249 u &= ~(1 << pin); 251 u &= ~(1 << pin);
@@ -381,11 +383,13 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
381 u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); 383 u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
382 u &= ~(1 << pin); 384 u &= ~(1 << pin);
383 writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip)); 385 writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
386 break;
384 case IRQ_TYPE_EDGE_FALLING: 387 case IRQ_TYPE_EDGE_FALLING:
385 case IRQ_TYPE_LEVEL_LOW: 388 case IRQ_TYPE_LEVEL_LOW:
386 u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); 389 u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
387 u |= 1 << pin; 390 u |= 1 << pin;
388 writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip)); 391 writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
392 break;
389 case IRQ_TYPE_EDGE_BOTH: { 393 case IRQ_TYPE_EDGE_BOTH: {
390 u32 v; 394 u32 v;
391 395
@@ -401,6 +405,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
401 else 405 else
402 u &= ~(1 << pin); /* rising */ 406 u &= ~(1 << pin); /* rising */
403 writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip)); 407 writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
408 break;
404 } 409 }
405 } 410 }
406 return 0; 411 return 0;
@@ -641,7 +646,7 @@ static int __devinit mvebu_gpio_probe(struct platform_device *pdev)
641 ct->handler = handle_edge_irq; 646 ct->handler = handle_edge_irq;
642 ct->chip.name = mvchip->chip.label; 647 ct->chip.name = mvchip->chip.label;
643 648
644 irq_setup_generic_chip(gc, IRQ_MSK(ngpios), IRQ_GC_INIT_MASK_CACHE, 649 irq_setup_generic_chip(gc, IRQ_MSK(ngpios), 0,
645 IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); 650 IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
646 651
647 /* Setup irq domain on top of the generic chip. */ 652 /* Setup irq domain on top of the generic chip. */