diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-12-15 23:50:43 +0100 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-01-25 09:24:20 +0900 |
commit | d4e62d0094e1b0f69946c3f16ce8ec882302a461 (patch) | |
tree | fd39f7a3ee241d0c8af31220143caebdafe45c7c /include/linux | |
parent | e62ebcdbce9eff4dc48168e86960c0dfcba086ea (diff) | |
download | linux-d4e62d0094e1b0f69946c3f16ce8ec882302a461.tar.gz linux-d4e62d0094e1b0f69946c3f16ce8ec882302a461.tar.bz2 linux-d4e62d0094e1b0f69946c3f16ce8ec882302a461.zip |
sh-pfc: Split platform data from the sh_pfc structure
Create a sh_pfc_platform_data structure to store platform data and
reference it from the core sh_pfc structure.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sh_pfc.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h index c19a0925829a..58587f94d67a 100644 --- a/include/linux/sh_pfc.h +++ b/include/linux/sh_pfc.h @@ -94,7 +94,7 @@ struct pfc_window { unsigned long size; }; -struct sh_pfc { +struct sh_pfc_platform_data { char *name; pinmux_enum_t reserved_id; struct pinmux_range data; @@ -117,17 +117,21 @@ struct sh_pfc { struct pinmux_irq *gpio_irq; unsigned int gpio_irq_size; - spinlock_t lock; - struct resource *resource; unsigned int num_resources; - struct pfc_window *window; unsigned long unlock_reg; }; +struct sh_pfc { + struct sh_pfc_platform_data *pdata; + spinlock_t lock; + + struct pfc_window *window; +}; + /* XXX compat for now */ -#define pinmux_info sh_pfc +#define pinmux_info sh_pfc_platform_data /* drivers/sh/pfc/gpio.c */ int sh_pfc_register_gpiochip(struct sh_pfc *pfc); @@ -136,7 +140,7 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc); int sh_pfc_register_pinctrl(struct sh_pfc *pfc); /* drivers/sh/pfc/core.c */ -int register_sh_pfc(struct sh_pfc *pfc); +int register_sh_pfc(struct sh_pfc_platform_data *pfc); int sh_pfc_read_bit(struct pinmux_data_reg *dr, unsigned long in_pos); void sh_pfc_write_bit(struct pinmux_data_reg *dr, unsigned long in_pos, @@ -151,8 +155,8 @@ int sh_pfc_config_gpio(struct sh_pfc *pfc, unsigned gpio, int pinmux_type, /* xxx */ static inline int register_pinmux(struct pinmux_info *pip) { - struct sh_pfc *pfc = pip; - return register_sh_pfc(pfc); + struct sh_pfc_platform_data *pdata = pip; + return register_sh_pfc(pdata); } enum { GPIO_CFG_DRYRUN, GPIO_CFG_REQ, GPIO_CFG_FREE }; |