diff options
Diffstat (limited to 'drivers/pinctrl/sh-pfc/core.h')
-rw-r--r-- | drivers/pinctrl/sh-pfc/core.h | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h index ba7c33c33599..89cb4289d761 100644 --- a/drivers/pinctrl/sh-pfc/core.h +++ b/drivers/pinctrl/sh-pfc/core.h | |||
@@ -26,13 +26,17 @@ struct sh_pfc_pinctrl; | |||
26 | 26 | ||
27 | struct sh_pfc { | 27 | struct sh_pfc { |
28 | struct device *dev; | 28 | struct device *dev; |
29 | struct sh_pfc_soc_info *info; | 29 | const struct sh_pfc_soc_info *info; |
30 | spinlock_t lock; | 30 | spinlock_t lock; |
31 | 31 | ||
32 | unsigned int num_windows; | 32 | unsigned int num_windows; |
33 | struct sh_pfc_window *window; | 33 | struct sh_pfc_window *window; |
34 | 34 | ||
35 | unsigned int nr_pins; | ||
36 | |||
35 | struct sh_pfc_chip *gpio; | 37 | struct sh_pfc_chip *gpio; |
38 | struct sh_pfc_chip *func; | ||
39 | |||
36 | struct sh_pfc_pinctrl *pinctrl; | 40 | struct sh_pfc_pinctrl *pinctrl; |
37 | }; | 41 | }; |
38 | 42 | ||
@@ -42,31 +46,30 @@ int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc); | |||
42 | int sh_pfc_register_pinctrl(struct sh_pfc *pfc); | 46 | int sh_pfc_register_pinctrl(struct sh_pfc *pfc); |
43 | int sh_pfc_unregister_pinctrl(struct sh_pfc *pfc); | 47 | int sh_pfc_unregister_pinctrl(struct sh_pfc *pfc); |
44 | 48 | ||
45 | int sh_pfc_read_bit(struct pinmux_data_reg *dr, unsigned long in_pos); | 49 | unsigned long sh_pfc_read_raw_reg(void __iomem *mapped_reg, |
46 | void sh_pfc_write_bit(struct pinmux_data_reg *dr, unsigned long in_pos, | 50 | unsigned long reg_width); |
47 | unsigned long value); | 51 | void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned long reg_width, |
48 | int sh_pfc_get_data_reg(struct sh_pfc *pfc, unsigned gpio, | 52 | unsigned long data); |
49 | struct pinmux_data_reg **drp, int *bitp); | 53 | |
50 | int sh_pfc_gpio_to_enum(struct sh_pfc *pfc, unsigned gpio, int pos, | 54 | int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin); |
51 | pinmux_enum_t *enum_idp); | 55 | int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type); |
52 | int sh_pfc_config_gpio(struct sh_pfc *pfc, unsigned gpio, int pinmux_type, | ||
53 | int cfg_mode); | ||
54 | 56 | ||
55 | extern struct sh_pfc_soc_info r8a7740_pinmux_info; | 57 | extern const struct sh_pfc_soc_info r8a73a4_pinmux_info; |
56 | extern struct sh_pfc_soc_info r8a7779_pinmux_info; | 58 | extern const struct sh_pfc_soc_info r8a7740_pinmux_info; |
57 | extern struct sh_pfc_soc_info sh7203_pinmux_info; | 59 | extern const struct sh_pfc_soc_info r8a7779_pinmux_info; |
58 | extern struct sh_pfc_soc_info sh7264_pinmux_info; | 60 | extern const struct sh_pfc_soc_info sh7203_pinmux_info; |
59 | extern struct sh_pfc_soc_info sh7269_pinmux_info; | 61 | extern const struct sh_pfc_soc_info sh7264_pinmux_info; |
60 | extern struct sh_pfc_soc_info sh7372_pinmux_info; | 62 | extern const struct sh_pfc_soc_info sh7269_pinmux_info; |
61 | extern struct sh_pfc_soc_info sh73a0_pinmux_info; | 63 | extern const struct sh_pfc_soc_info sh7372_pinmux_info; |
62 | extern struct sh_pfc_soc_info sh7720_pinmux_info; | 64 | extern const struct sh_pfc_soc_info sh73a0_pinmux_info; |
63 | extern struct sh_pfc_soc_info sh7722_pinmux_info; | 65 | extern const struct sh_pfc_soc_info sh7720_pinmux_info; |
64 | extern struct sh_pfc_soc_info sh7723_pinmux_info; | 66 | extern const struct sh_pfc_soc_info sh7722_pinmux_info; |
65 | extern struct sh_pfc_soc_info sh7724_pinmux_info; | 67 | extern const struct sh_pfc_soc_info sh7723_pinmux_info; |
66 | extern struct sh_pfc_soc_info sh7734_pinmux_info; | 68 | extern const struct sh_pfc_soc_info sh7724_pinmux_info; |
67 | extern struct sh_pfc_soc_info sh7757_pinmux_info; | 69 | extern const struct sh_pfc_soc_info sh7734_pinmux_info; |
68 | extern struct sh_pfc_soc_info sh7785_pinmux_info; | 70 | extern const struct sh_pfc_soc_info sh7757_pinmux_info; |
69 | extern struct sh_pfc_soc_info sh7786_pinmux_info; | 71 | extern const struct sh_pfc_soc_info sh7785_pinmux_info; |
70 | extern struct sh_pfc_soc_info shx3_pinmux_info; | 72 | extern const struct sh_pfc_soc_info sh7786_pinmux_info; |
73 | extern const struct sh_pfc_soc_info shx3_pinmux_info; | ||
71 | 74 | ||
72 | #endif /* __SH_PFC_CORE_H__ */ | 75 | #endif /* __SH_PFC_CORE_H__ */ |