aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
diff options
context:
space:
mode:
authorPawel Dembicki <paweldembicki@gmail.com>2020-10-27 09:52:31 +0100
committerPetr Štetiar <ynezz@true.cz>2020-11-23 22:53:15 +0100
commit4dc27a026b7e308477adecbdf8e6da58e1d57716 (patch)
tree3bf02dcd1000926f7c44f529bfc4b42ea845821c /target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
parenta1158b3170b9bfcc346972242a62efeda8cf80b0 (diff)
downloadupstream-4dc27a026b7e308477adecbdf8e6da58e1d57716.tar.gz
upstream-4dc27a026b7e308477adecbdf8e6da58e1d57716.tar.bz2
upstream-4dc27a026b7e308477adecbdf8e6da58e1d57716.zip
layerscape: add i2c peripherials on LS1012A-RDB
LS1012A-RDB equipped in some i2c devices: - 3x GPIO Expander: PCAL9555A (NXP) - Gyro: FXAS21002 (NXP) - Accelerometer: FXOS8700 (NXP) - Current & Power Monitor: INA220 (TI) This patch enables i2c peripherials installed on LS1012A-RDB. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Diffstat (limited to 'target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch')
-rw-r--r--target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
new file mode 100644
index 0000000000..a00a240135
--- /dev/null
+++ b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
@@ -0,0 +1,28 @@
+From 12de4b5e7cbcd193d5abb753ca511fe8f2236846 Mon Sep 17 00:00:00 2001
+From: Pawel Dembicki <paweldembicki@gmail.com>
+Date: Fri, 13 Nov 2020 07:30:03 +0100
+Subject: [PATCH 1/1] gpio-pca953x: hack: Allow to use falling trigger
+
+Gpio-mpc8xxx driver of Layerscape gpio support only edge interrupts.
+Gpio-pca953x allow only low state trigger. This hack fix the problem.
+
+Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
+---
+
+--- a/drivers/gpio/gpio-pca953x.c
++++ b/drivers/gpio/gpio-pca953x.c
+@@ -879,10 +879,12 @@ static int pca953x_irq_setup(struct pca9
+ for (i = 0; i < NBANK(chip); i++)
+ chip->irq_stat[i] &= reg_direction[i];
+ mutex_init(&chip->irq_lock);
+-
++ /* gpio-mpc8xxx driver of Layerscape gpio support only edge interrupts.
++ * This hack fix the problem.
++ */
+ ret = devm_request_threaded_irq(&client->dev, client->irq,
+ NULL, pca953x_irq_handler,
+- IRQF_TRIGGER_LOW | IRQF_ONESHOT |
++ IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
+ IRQF_SHARED,
+ dev_name(&client->dev), chip);
+ if (ret) {