aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-handheld-4.4/locomo/0037-mfd-ucb1x00-make-use-of-provided-irq.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-handheld-4.4/locomo/0037-mfd-ucb1x00-make-use-of-provided-irq.patch')
-rw-r--r--recipes-kernel/linux/linux-handheld-4.4/locomo/0037-mfd-ucb1x00-make-use-of-provided-irq.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-handheld-4.4/locomo/0037-mfd-ucb1x00-make-use-of-provided-irq.patch b/recipes-kernel/linux/linux-handheld-4.4/locomo/0037-mfd-ucb1x00-make-use-of-provided-irq.patch
new file mode 100644
index 0000000..6808fd8
--- /dev/null
+++ b/recipes-kernel/linux/linux-handheld-4.4/locomo/0037-mfd-ucb1x00-make-use-of-provided-irq.patch
@@ -0,0 +1,36 @@
+From 575eaab8b19175bac7478d9489a6f2103dfbf730 Mon Sep 17 00:00:00 2001
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Date: Sat, 15 Nov 2014 14:21:56 +0300
+Subject: [PATCH 37/44] mfd: ucb1x00: make use of provided irq
+
+If the platform data provides IRQ information, use that instead always
+probing the IRQ.
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/ucb1x00-core.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
+index ecceee5..dd4127d2 100644
+--- a/drivers/mfd/ucb1x00-core.c
++++ b/drivers/mfd/ucb1x00-core.c
+@@ -465,9 +465,12 @@ static int ucb1x00_probe(struct mcp *mcp)
+ if (ret)
+ goto err_dev_add;
+
+- ucb1x00_enable(ucb);
+- ucb->irq = ucb1x00_detect_irq(ucb);
+- ucb1x00_disable(ucb);
++ ucb->irq = pdata ? pdata->irq : NO_IRQ;
++ if (ucb->irq == NO_IRQ) {
++ ucb1x00_enable(ucb);
++ ucb->irq = ucb1x00_detect_irq(ucb);
++ ucb1x00_disable(ucb);
++ }
+ if (ucb->irq == NO_IRQ) {
+ dev_err(&ucb->dev, "IRQ probe failed\n");
+ ret = -ENODEV;
+--
+1.9.1
+