aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/core.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-07-15 18:38:30 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-07-29 15:17:48 +0200
commitacac8ed5e2aa2c0d364d06f364fd9ed0dc27d28a (patch)
treeead3d7bedad1e373dd69c481161149bce69f47d8 /drivers/pinctrl/sh-pfc/core.h
parentsh-pfc: Rename struct sh_pfc nr_pins field to nr_gpio_pins (diff)
downloadlinux-dev-acac8ed5e2aa2c0d364d06f364fd9ed0dc27d28a.tar.xz
linux-dev-acac8ed5e2aa2c0d364d06f364fd9ed0dc27d28a.zip
sh-pfc: Compute pin ranges automatically
Remove the manually specified ranges from PFC SoC data and compute the ranges automatically. This prevents ranges from being out-of-sync with pins definitions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/core.h')
-rw-r--r--drivers/pinctrl/sh-pfc/core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h
index 93963a19b340..a1b23762ac90 100644
--- a/drivers/pinctrl/sh-pfc/core.h
+++ b/drivers/pinctrl/sh-pfc/core.h
@@ -25,6 +25,11 @@ struct sh_pfc_window {
struct sh_pfc_chip;
struct sh_pfc_pinctrl;
+struct sh_pfc_pin_range {
+ u16 start;
+ u16 end;
+};
+
struct sh_pfc {
struct device *dev;
const struct sh_pfc_soc_info *info;
@@ -34,6 +39,9 @@ struct sh_pfc {
unsigned int num_windows;
struct sh_pfc_window *window;
+ struct sh_pfc_pin_range *ranges;
+ unsigned int nr_ranges;
+
unsigned int nr_gpio_pins;
struct sh_pfc_chip *gpio;