[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2fe132b534a4b1ca717932e78cc3cdae5aacba0d.1526533188.git.hns@goldelico.com>
Date: Thu, 17 May 2018 06:59:48 +0200
From: "H. Nikolaus Schaller" <hns@...delico.com>
To: galak@...eaurora.org, andy.shevchenko@...il.com,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>
Cc: devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, letux-kernel@...nphoenux.org,
kernel@...a-handheld.com,
"H. Nikolaus Schaller" <hns@...delico.com>
Subject: [PATCH v7 2/3] gpio: pca953x: define masks for addressing common and extended registers
These mask bits are to be used to map the extended register
addreseses (which are defined for an unsupported 8-bit pcal chip)
to 16 and 24 bit chips (pcal6524).
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>
---
drivers/gpio/gpio-pca953x.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 2b667166e855..c682921d7019 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -56,6 +56,10 @@
#define PCAL6524_DEBOUNCE 0x2d
#define PCA_GPIO_MASK 0x00FF
+
+#define PCAL_GPIO_MASK 0x1f
+#define PCAL_PINCTRL_MASK 0xe0
+
#define PCA_INT 0x0100
#define PCA_PCAL 0x0200
#define PCA_LATCH_INT (PCA_PCAL | PCA_INT)
--
2.12.2
Powered by blists - more mailing lists