diff options
author | Zoltan HERPAI <wigyori@uid0.hu> | 2014-08-27 12:09:46 +0000 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2014-08-27 12:09:46 +0000 |
commit | d0d3be5d8287ff737cfe4381c44706f1d8f7b881 (patch) | |
tree | ab287cf326cc235e7ee9161a13b57f4bd0fecc5b /target/linux/sunxi/patches-3.14/137-1-pinctrl-create-irq-pin-mapping.patch | |
parent | 6e912a1e62ebb1ab2fdd3f63bff61936be65a84b (diff) | |
download | master-187ad058-d0d3be5d8287ff737cfe4381c44706f1d8f7b881.tar.gz master-187ad058-d0d3be5d8287ff737cfe4381c44706f1d8f7b881.tar.bz2 master-187ad058-d0d3be5d8287ff737cfe4381c44706f1d8f7b881.zip |
sunxi: initial 3.14 patchset
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42313 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/sunxi/patches-3.14/137-1-pinctrl-create-irq-pin-mapping.patch')
-rw-r--r-- | target/linux/sunxi/patches-3.14/137-1-pinctrl-create-irq-pin-mapping.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.14/137-1-pinctrl-create-irq-pin-mapping.patch b/target/linux/sunxi/patches-3.14/137-1-pinctrl-create-irq-pin-mapping.patch new file mode 100644 index 0000000000..cd209cdb59 --- /dev/null +++ b/target/linux/sunxi/patches-3.14/137-1-pinctrl-create-irq-pin-mapping.patch @@ -0,0 +1,41 @@ +From 4c228d02d1339a286e259893062ea445be82b573 Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai <wens@csie.org> +Date: Tue, 7 Jan 2014 18:56:29 +0800 +Subject: [PATCH] pinctrl: sunxi: create irq/pin mapping during init + +The irq/pin mapping is used to lookup the pin to mux to the irq +function when the irq is enabled. It is created when gpio_to_irq +is called. Creating the mapping during init allows us to map the +interrupts directly from the device tree. + +Signed-off-by: Chen-Yu Tsai <wens@csie.org> +--- + drivers/pinctrl/pinctrl-sunxi.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c +index d16da53..067e7e10 100644 +--- a/drivers/pinctrl/pinctrl-sunxi.c ++++ b/drivers/pinctrl/pinctrl-sunxi.c +@@ -531,8 +531,6 @@ static int sunxi_pinctrl_gpio_to_irq(struct gpio_chip *chip, unsigned offset) + if (!desc) + return -EINVAL; + +- pctl->irq_array[desc->irqnum] = offset; +- + dev_dbg(chip->dev, "%s: request IRQ for GPIO %d, return %d\n", + chip->label, offset + chip->base, desc->irqnum); + +@@ -759,6 +757,9 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev) + struct sunxi_desc_function *func = pin->functions; + + while (func->name) { ++ /* Create interrupt mapping while we're at it */ ++ if (!strcmp(func->name, "irq")) ++ pctl->irq_array[func->irqnum] = pin->pin.number; + sunxi_pinctrl_add_function(pctl, func->name); + func++; + } +-- +2.0.3 + |