Skip to contentSkip to conversation

pinctrl: broxton: Provide Interrupt Status register offset

PATCH In review Andy Shevchenko 2 participants 9 messages Jul 23, 2019 – Aug 6, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/8 pinctrl: broxton: Provide Interrupt Status register offset

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-broxton.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-broxton.c +3 -1
index e2d4505d6747..2be7e414f803 100644
@@ -15,8 +15,9 @@
 #include "pinctrl-intel.h"
 
 #define BXT_PAD_OWN	0x020
-#define BXT_HOSTSW_OWN	0x080
 #define BXT_PADCFGLOCK	0x060
+#define BXT_HOSTSW_OWN	0x080
+#define BXT_GPI_IS	0x100
 #define BXT_GPI_IE	0x110
 
 #define BXT_COMMUNITY(s, e)				\
@@ -24,6 +25,7 @@
 		.padown_offset = BXT_PAD_OWN,		\
 		.padcfglock_offset = BXT_PADCFGLOCK,	\
 		.hostown_offset = BXT_HOSTSW_OWN,	\
+		.is_offset = BXT_GPI_IS,		\
 		.ie_offset = BXT_GPI_IE,		\
 		.gpp_size = 32,                         \
 		.pin_base = (s),			\
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/8 pinctrl: cannonlake: Provide Interrupt Status register offset

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-cannonlake.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-cannonlake.c +2 -0
index 08024b065033..f51b27bbf9f1 100644
@@ -19,6 +19,7 @@
 #define CNL_PADCFGLOCK		0x080
 #define CNL_LP_HOSTSW_OWN	0x0b0
 #define CNL_H_HOSTSW_OWN	0x0c0
+#define CNL_GPI_IS		0x100
 #define CNL_GPI_IE		0x120
 
 #define CNL_GPP(r, s, e, g)				\
@@ -37,6 +38,7 @@
 		.padown_offset = CNL_PAD_OWN,		\
 		.padcfglock_offset = CNL_PADCFGLOCK,	\
 		.hostown_offset = (o),			\
+		.is_offset = CNL_GPI_IS,		\
 		.ie_offset = CNL_GPI_IE,		\
 		.pin_base = (s),			\
 		.npins = ((e) - (s) + 1),		\
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/8 pinctrl: geminilake: Provide Interrupt Status register offset

In reply to Andy Shevchenko

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-geminilake.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-geminilake.c +2 -0
index b49a484754b9..de96aa9794a2 100644
@@ -17,6 +17,7 @@
 #define GLK_PAD_OWN	0x020
 #define GLK_PADCFGLOCK	0x080
 #define GLK_HOSTSW_OWN	0x0b0
+#define GLK_GPI_IS	0x100
 #define GLK_GPI_IE	0x110
 
 #define GLK_COMMUNITY(s, e)				\
@@ -24,6 +25,7 @@
 		.padown_offset = GLK_PAD_OWN,		\
 		.padcfglock_offset = GLK_PADCFGLOCK,	\
 		.hostown_offset = GLK_HOSTSW_OWN,	\
+		.is_offset = GLK_GPI_IS,		\
 		.ie_offset = GLK_GPI_IE,		\
 		.gpp_size = 32,                         \
 		.pin_base = (s),			\
Signature · 1 line
2.20.1
#3 lore raw

PATCH 4/8 pinctrl: icelake: Provide Interrupt Status register offset

In reply to Andy Shevchenko

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-icelake.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-icelake.c +2 -0
index 5f2f5c61ad41..6489e9bbb61f 100644
@@ -18,6 +18,7 @@
 #define ICL_PAD_OWN	0x020
 #define ICL_PADCFGLOCK	0x080
 #define ICL_HOSTSW_OWN	0x0b0
+#define ICL_GPI_IS	0x100
 #define ICL_GPI_IE	0x110
 
 #define ICL_GPP(r, s, e, g)				\
@@ -36,6 +37,7 @@
 		.padown_offset = ICL_PAD_OWN,		\
 		.padcfglock_offset = ICL_PADCFGLOCK,	\
 		.hostown_offset = ICL_HOSTSW_OWN,	\
+		.is_offset = ICL_GPI_IS,		\
 		.ie_offset = ICL_GPI_IE,		\
 		.pin_base = (s),			\
 		.npins = ((e) - (s) + 1),		\
Signature · 1 line
2.20.1
#4 lore raw

PATCH 5/8 pinctrl: sunrisepoint: Provide Interrupt Status register offset

In reply to Andy Shevchenko

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-sunrisepoint.c +2 -0
index ccafeea4939c..44d7f50bbc82 100644
@@ -18,6 +18,7 @@
 #define SPT_PAD_OWN	0x020
 #define SPT_PADCFGLOCK	0x0a0
 #define SPT_HOSTSW_OWN	0x0d0
+#define SPT_GPI_IS	0x100
 #define SPT_GPI_IE	0x120
 
 #define SPT_COMMUNITY(b, s, e)				\
@@ -26,6 +27,7 @@
 		.padown_offset = SPT_PAD_OWN,		\
 		.padcfglock_offset = SPT_PADCFGLOCK,	\
 		.hostown_offset = SPT_HOSTSW_OWN,	\
+		.is_offset = SPT_GPI_IS,		\
 		.ie_offset = SPT_GPI_IE,		\
 		.gpp_size = 24,				\
 		.gpp_num_padown_regs = 4,		\
Signature · 1 line
2.20.1
#5 lore raw

PATCH 6/8 pinctrl: denverton: Provide Interrupt Status register offset

In reply to Andy Shevchenko

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-denverton.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-denverton.c +3 -1
index 3a4932b557b4..fde83cd4aac5 100644
@@ -15,8 +15,9 @@
 #include "pinctrl-intel.h"
 
 #define DNV_PAD_OWN	0x020
-#define DNV_HOSTSW_OWN	0x0C0
 #define DNV_PADCFGLOCK	0x090
+#define DNV_HOSTSW_OWN	0x0C0
+#define DNV_GPI_IS	0x100
 #define DNV_GPI_IE	0x120
 
 #define DNV_GPP(n, s, e)				\
@@ -32,6 +33,7 @@
 		.padown_offset = DNV_PAD_OWN,		\
 		.padcfglock_offset = DNV_PADCFGLOCK,	\
 		.hostown_offset = DNV_HOSTSW_OWN,	\
+		.is_offset = DNV_GPI_IS,		\
 		.ie_offset = DNV_GPI_IE,		\
 		.pin_base = (s),			\
 		.npins = ((e) - (s) + 1),		\
Signature · 1 line
2.20.1
#6 lore raw

PATCH 7/8 pinctrl: lewisburg: Provide Interrupt Status register offset

In reply to Andy Shevchenko

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the driver.

---
 drivers/pinctrl/intel/pinctrl-lewisburg.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-lewisburg.c +2 -0
index 03b04c7ae9e8..2e06fb1464ab 100644
@@ -17,6 +17,7 @@
 #define LBG_PAD_OWN	0x020
 #define LBG_PADCFGLOCK	0x060
 #define LBG_HOSTSW_OWN	0x080
+#define LBG_GPI_IS	0x100
 #define LBG_GPI_IE	0x110
 
 #define LBG_COMMUNITY(b, s, e)				\
@@ -25,6 +26,7 @@
 		.padown_offset = LBG_PAD_OWN,		\
 		.padcfglock_offset = LBG_PADCFGLOCK,	\
 		.hostown_offset = LBG_HOSTSW_OWN,	\
+		.is_offset = LBG_GPI_IS,		\
 		.ie_offset = LBG_GPI_IE,		\
 		.gpp_size = 24,				\
 		.pin_base = (s),			\
Signature · 1 line
2.20.1
#7 lore raw

PATCH 8/8 pinctrl: intel: Remove default Interrupt Status offset

In reply to Andy Shevchenko

Since some of the GPIO controllers use different Interrupt Status offset, it make sense to provide it explicitly in the drivers.

---
 drivers/pinctrl/intel/pinctrl-intel.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/pinctrl/intel/pinctrl-intel.c +0 -4
index 1e8018edde4d..3a945997b8eb 100644
@@ -30,7 +30,6 @@
 #define REVID_MASK			GENMASK(31, 16)
 
 #define PADBAR				0x00c
-#define GPI_IS				0x100
 
 #define PADOWN_BITS			4
 #define PADOWN_SHIFT(p)			((p) % 8 * PADOWN_BITS)
@@ -1343,9 +1342,6 @@ static int intel_pinctrl_probe(struct platform_device *pdev,
 		community->regs = regs;
 		community->pad_regs = regs + padbar;
 
-		if (!community->is_offset)
-			community->is_offset = GPI_IS;
-
 		ret = intel_pinctrl_add_padgroups(pctrl, community);
 		if (ret)
 			return ret;
Signature · 1 line
2.20.1