summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2017-06-06 15:18:17 +0200
committerLinus Walleij <linus.walleij@linaro.org>2017-06-09 13:01:35 +0200
commit919eb4756ef41fd71b5eaae8a2a067fcde9d44d7 (patch)
treedd2daeb7b15201bf2e16ef63b48d38913eaf97c2 /drivers/pinctrl/intel/pinctrl-sunrisepoint.c
parentpinctrl: sunxi: Add support for A83T R_PIO (diff)
downloadlinux-919eb4756ef41fd71b5eaae8a2a067fcde9d44d7.tar.xz
linux-919eb4756ef41fd71b5eaae8a2a067fcde9d44d7.zip
pinctrl: intel: Add support for variable size pad groups
The Intel GPIO hardware has a concept of pad groups, which means 1 to 32 pads occupying their own GPI_IS, GPI_IE, PAD_OWN and so on registers. The existing hardware has the same amount of pads in each pad group (except the last one) so it is possible to use community->gpp_size to calculate start offset of each register. With the next generation SoCs the pad group size is not always the same anymore which means we cannot use community->gpp_size for register offset calculations directly. To support variable size pad groups we introduce struct intel_padgroup that can be filled in by the client drivers according the hardware pad group layout. The core driver will always use these when it performs calculations for pad register offsets. The core driver will automatically populate pad groups based on community->gpp_size if the driver does not provide any. This makes sure the existing drivers still work as expected. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Chuah, Kim Tatt <kim.tatt.chuah@intel.com> Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to '')
-rw-r--r--drivers/pinctrl/intel/pinctrl-sunrisepoint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
index 9877526c0807..8870a4100164 100644
--- a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
+++ b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
@@ -31,6 +31,7 @@
.hostown_offset = SPT_HOSTSW_OWN, \
.ie_offset = SPT_GPI_IE, \
.gpp_size = 24, \
+ .gpp_num_padown_regs = 4, \
.pin_base = (s), \
.npins = ((e) - (s) + 1), \
}