aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-07-15 07:03:20 -0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-07-29 09:17:41 -0400
commit533743dccb517b0331eccc111e3c2b8f021559b5 (patch)
tree8683492a077fdc9e4629a14b3a596ecce3147112
parenta1a3580cb322f71cc5aa7e9180ffb6df609b530d (diff)
sh-pfc: Replace pinmux_enum_id typedef with u16
The typedef only conceals the real variable type without bringing any additional value (see Documentation/CodingStyle, section 5.b). Moreover, it polutes the pinmux namespace. Replace it with the integer type it used to hide. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
-rw-r--r--drivers/pinctrl/sh-pfc/core.c13
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a73a4.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7740.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7778.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7779.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7790.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7203.c3
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7264.c3
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7269.c3
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7372.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh73a0.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7720.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7722.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7723.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7724.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7734.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7757.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7785.c3
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7786.c3
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-shx3.c3
-rw-r--r--drivers/pinctrl/sh-pfc/sh_pfc.h26
21 files changed, 37 insertions, 46 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
index 1c8597cf57be..96b02246796a 100644
--- a/drivers/pinctrl/sh-pfc/core.c
+++ b/drivers/pinctrl/sh-pfc/core.c
@@ -98,8 +98,7 @@ int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin)
98 return -EINVAL; 98 return -EINVAL;
99} 99}
100 100
101static int sh_pfc_enum_in_range(pinmux_enum_t enum_id, 101static int sh_pfc_enum_in_range(u16 enum_id, const struct pinmux_range *r)
102 const struct pinmux_range *r)
103{ 102{
104 if (enum_id < r->begin) 103 if (enum_id < r->begin)
105 return 0; 104 return 0;
@@ -194,7 +193,7 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc,
194 sh_pfc_write_raw_reg(mapped_reg, crp->reg_width, data); 193 sh_pfc_write_raw_reg(mapped_reg, crp->reg_width, data);
195} 194}
196 195
197static int sh_pfc_get_config_reg(struct sh_pfc *pfc, pinmux_enum_t enum_id, 196static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id,
198 const struct pinmux_cfg_reg **crp, int *fieldp, 197 const struct pinmux_cfg_reg **crp, int *fieldp,
199 int *valuep) 198 int *valuep)
200{ 199{
@@ -238,10 +237,10 @@ static int sh_pfc_get_config_reg(struct sh_pfc *pfc, pinmux_enum_t enum_id,
238 return -EINVAL; 237 return -EINVAL;
239} 238}
240 239
241static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, pinmux_enum_t mark, int pos, 240static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, u16 mark, int pos,
242 pinmux_enum_t *enum_idp) 241 u16 *enum_idp)
243{ 242{
244 const pinmux_enum_t *data = pfc->info->gpio_data; 243 const u16 *data = pfc->info->gpio_data;
245 int k; 244 int k;
246 245
247 if (pos) { 246 if (pos) {
@@ -264,7 +263,7 @@ static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, pinmux_enum_t mark, int pos,
264int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type) 263int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type)
265{ 264{
266 const struct pinmux_cfg_reg *cr = NULL; 265 const struct pinmux_cfg_reg *cr = NULL;
267 pinmux_enum_t enum_id; 266 u16 enum_id;
268 const struct pinmux_range *range; 267 const struct pinmux_range *range;
269 int in_range, pos, field, value; 268 int in_range, pos, field, value;
270 int ret; 269 int ret;
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
index 82bf6aba0074..d5cbbc72ee4f 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
@@ -431,7 +431,7 @@ enum {
431#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx) 431#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx)
432#define PINMUX_DATA_ALL() CPU_ALL_PORT(_PORT_DATA, , unused) 432#define PINMUX_DATA_ALL() CPU_ALL_PORT(_PORT_DATA, , unused)
433 433
434static const pinmux_enum_t pinmux_data[] = { 434static const u16 pinmux_data[] = {
435 /* specify valid pin states for each pin in GPIO mode */ 435 /* specify valid pin states for each pin in GPIO mode */
436 PINMUX_DATA_ALL(), 436 PINMUX_DATA_ALL(),
437 437
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index 3fb1e0b40d90..214ac6ce3104 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -586,7 +586,7 @@ enum {
586#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx) 586#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx)
587#define PINMUX_DATA_GP_ALL() CPU_ALL_PORT(_PORT_DATA, , unused) 587#define PINMUX_DATA_GP_ALL() CPU_ALL_PORT(_PORT_DATA, , unused)
588 588
589static const pinmux_enum_t pinmux_data[] = { 589static const u16 pinmux_data[] = {
590 PINMUX_DATA_GP_ALL(), 590 PINMUX_DATA_GP_ALL(),
591 591
592 /* Port0 */ 592 /* Port0 */
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c
index f9039102bb43..018d8bcb23ae 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c
@@ -579,7 +579,7 @@ enum {
579 PINMUX_MARK_END, 579 PINMUX_MARK_END,
580}; 580};
581 581
582static const pinmux_enum_t pinmux_data[] = { 582static const u16 pinmux_data[] = {
583 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 583 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
584 584
585 PINMUX_DATA(PENC0_MARK, FN_PENC0), 585 PINMUX_DATA(PENC0_MARK, FN_PENC0),
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7779.c b/drivers/pinctrl/sh-pfc/pfc-r8a7779.c
index 8e22ca6c1044..290de9a9815b 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7779.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7779.c
@@ -664,7 +664,7 @@ enum {
664 PINMUX_MARK_END, 664 PINMUX_MARK_END,
665}; 665};
666 666
667static const pinmux_enum_t pinmux_data[] = { 667static const u16 pinmux_data[] = {
668 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 668 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
669 669
670 PINMUX_DATA(AVS1_MARK, FN_AVS1), 670 PINMUX_DATA(AVS1_MARK, FN_AVS1),
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
index 14f3ec267e1f..3713c0088b0c 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
@@ -844,7 +844,7 @@ enum {
844 PINMUX_MARK_END, 844 PINMUX_MARK_END,
845}; 845};
846 846
847static const pinmux_enum_t pinmux_data[] = { 847static const u16 pinmux_data[] = {
848 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 848 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
849 849
850 PINMUX_DATA(VI1_DATA7_VI1_B7_MARK, FN_VI1_DATA7_VI1_B7), 850 PINMUX_DATA(VI1_DATA7_VI1_B7_MARK, FN_VI1_DATA7_VI1_B7),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7203.c b/drivers/pinctrl/sh-pfc/pfc-sh7203.c
index f63d51dc3f4c..448781403a26 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7203.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7203.c
@@ -272,8 +272,7 @@ enum {
272 PINMUX_MARK_END, 272 PINMUX_MARK_END,
273}; 273};
274 274
275static const pinmux_enum_t pinmux_data[] = { 275static const u16 pinmux_data[] = {
276
277 /* PA */ 276 /* PA */
278 PINMUX_DATA(PA7_DATA, PA7_IN), 277 PINMUX_DATA(PA7_DATA, PA7_IN),
279 PINMUX_DATA(PA6_DATA, PA6_IN), 278 PINMUX_DATA(PA6_DATA, PA6_IN),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7264.c b/drivers/pinctrl/sh-pfc/pfc-sh7264.c
index 284675249ed9..641c6af3a0ee 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7264.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7264.c
@@ -604,8 +604,7 @@ enum {
604 PINMUX_MARK_END, 604 PINMUX_MARK_END,
605}; 605};
606 606
607static const pinmux_enum_t pinmux_data[] = { 607static const u16 pinmux_data[] = {
608
609 /* Port A */ 608 /* Port A */
610 PINMUX_DATA(PA3_DATA, PA3_IN), 609 PINMUX_DATA(PA3_DATA, PA3_IN),
611 PINMUX_DATA(PA2_DATA, PA2_IN), 610 PINMUX_DATA(PA2_DATA, PA2_IN),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7269.c b/drivers/pinctrl/sh-pfc/pfc-sh7269.c
index 4c401a74acd5..415812ff741f 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7269.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7269.c
@@ -781,8 +781,7 @@ enum {
781 PINMUX_MARK_END, 781 PINMUX_MARK_END,
782}; 782};
783 783
784static const pinmux_enum_t pinmux_data[] = { 784static const u16 pinmux_data[] = {
785
786 /* Port A */ 785 /* Port A */
787 PINMUX_DATA(PA1_DATA, PA1_IN), 786 PINMUX_DATA(PA1_DATA, PA1_IN),
788 PINMUX_DATA(PA0_DATA, PA0_IN), 787 PINMUX_DATA(PA0_DATA, PA0_IN),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
index cd431e45c15d..f269c46ad3fa 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
@@ -387,7 +387,7 @@ enum {
387#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx) 387#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx)
388#define PINMUX_DATA_GP_ALL() CPU_ALL_PORT(_PORT_DATA, , unused) 388#define PINMUX_DATA_GP_ALL() CPU_ALL_PORT(_PORT_DATA, , unused)
389 389
390static const pinmux_enum_t pinmux_data[] = { 390static const u16 pinmux_data[] = {
391 PINMUX_DATA_GP_ALL(), 391 PINMUX_DATA_GP_ALL(),
392 392
393 /* IRQ */ 393 /* IRQ */
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
index 7956df58d751..985acd023dd2 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
@@ -469,7 +469,7 @@ enum {
469#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx) 469#define _PORT_DATA(pfx, sfx) PORT_DATA_IO(pfx)
470#define PINMUX_DATA_GP_ALL() CPU_ALL_PORT(_PORT_DATA, , unused) 470#define PINMUX_DATA_GP_ALL() CPU_ALL_PORT(_PORT_DATA, , unused)
471 471
472static const pinmux_enum_t pinmux_data[] = { 472static const u16 pinmux_data[] = {
473 /* specify valid pin states for each pin in GPIO mode */ 473 /* specify valid pin states for each pin in GPIO mode */
474 PINMUX_DATA_GP_ALL(), 474 PINMUX_DATA_GP_ALL(),
475 475
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7720.c b/drivers/pinctrl/sh-pfc/pfc-sh7720.c
index 3b96d612b9ac..1009fc9c867b 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7720.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7720.c
@@ -232,7 +232,7 @@ enum {
232 PINMUX_MARK_END, 232 PINMUX_MARK_END,
233}; 233};
234 234
235static const pinmux_enum_t pinmux_data[] = { 235static const u16 pinmux_data[] = {
236 /* PTA GPIO */ 236 /* PTA GPIO */
237 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 237 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
238 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT), 238 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7722.c b/drivers/pinctrl/sh-pfc/pfc-sh7722.c
index 0982c4ff8eac..0c8d011f5025 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7722.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7722.c
@@ -263,7 +263,7 @@ enum {
263 PINMUX_FUNCTION_END, 263 PINMUX_FUNCTION_END,
264}; 264};
265 265
266static const pinmux_enum_t pinmux_data[] = { 266static const u16 pinmux_data[] = {
267 /* PTA */ 267 /* PTA */
268 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 268 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
269 PINMUX_DATA(PTA6_DATA, PTA6_IN), 269 PINMUX_DATA(PTA6_DATA, PTA6_IN),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7723.c b/drivers/pinctrl/sh-pfc/pfc-sh7723.c
index da0dbb0b6221..853093efa187 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7723.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7723.c
@@ -344,7 +344,7 @@ enum {
344 PINMUX_MARK_END, 344 PINMUX_MARK_END,
345}; 345};
346 346
347static const pinmux_enum_t pinmux_data[] = { 347static const u16 pinmux_data[] = {
348 /* PTA GPIO */ 348 /* PTA GPIO */
349 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 349 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
350 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT), 350 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7724.c b/drivers/pinctrl/sh-pfc/pfc-sh7724.c
index e8563cf61636..fe2693f6638d 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7724.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7724.c
@@ -526,7 +526,7 @@ enum {
526 PINMUX_MARK_END, 526 PINMUX_MARK_END,
527}; 527};
528 528
529static const pinmux_enum_t pinmux_data[] = { 529static const u16 pinmux_data[] = {
530 /* PTA GPIO */ 530 /* PTA GPIO */
531 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 531 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
532 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT), 532 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7734.c b/drivers/pinctrl/sh-pfc/pfc-sh7734.c
index 2fd5b7d4cb94..1e1e3e02ec62 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7734.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7734.c
@@ -592,7 +592,7 @@ enum {
592 PINMUX_MARK_END, 592 PINMUX_MARK_END,
593}; 593};
594 594
595static const pinmux_enum_t pinmux_data[] = { 595static const u16 pinmux_data[] = {
596 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 596 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
597 597
598 PINMUX_DATA(CLKOUT_MARK, FN_CLKOUT), 598 PINMUX_DATA(CLKOUT_MARK, FN_CLKOUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7757.c b/drivers/pinctrl/sh-pfc/pfc-sh7757.c
index d974b0851140..f4271167c25b 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7757.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7757.c
@@ -486,7 +486,7 @@ enum {
486 PINMUX_MARK_END, 486 PINMUX_MARK_END,
487}; 487};
488 488
489static const pinmux_enum_t pinmux_data[] = { 489static const u16 pinmux_data[] = {
490 /* PTA GPIO */ 490 /* PTA GPIO */
491 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 491 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
492 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT), 492 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7785.c b/drivers/pinctrl/sh-pfc/pfc-sh7785.c
index ddae426069d0..209289c80a02 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7785.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7785.c
@@ -325,8 +325,7 @@ enum {
325 PINMUX_MARK_END, 325 PINMUX_MARK_END,
326}; 326};
327 327
328static const pinmux_enum_t pinmux_data[] = { 328static const u16 pinmux_data[] = {
329
330 /* PA GPIO */ 329 /* PA GPIO */
331 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT), 330 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT),
332 PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT), 331 PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7786.c b/drivers/pinctrl/sh-pfc/pfc-sh7786.c
index c855fca56f48..353fde1f6706 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7786.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7786.c
@@ -172,8 +172,7 @@ enum {
172 PINMUX_MARK_END, 172 PINMUX_MARK_END,
173}; 173};
174 174
175static const pinmux_enum_t pinmux_data[] = { 175static const u16 pinmux_data[] = {
176
177 /* PA GPIO */ 176 /* PA GPIO */
178 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT), 177 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT),
179 PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT), 178 PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/pfc-shx3.c b/drivers/pinctrl/sh-pfc/pfc-shx3.c
index 50d9c5d83b8d..48a6c60f41e5 100644
--- a/drivers/pinctrl/sh-pfc/pfc-shx3.c
+++ b/drivers/pinctrl/sh-pfc/pfc-shx3.c
@@ -127,8 +127,7 @@ enum {
127 PINMUX_MARK_END, 127 PINMUX_MARK_END,
128}; 128};
129 129
130static const pinmux_enum_t shx3_pinmux_data[] = { 130static const u16 shx3_pinmux_data[] = {
131
132 /* PA GPIO */ 131 /* PA GPIO */
133 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT), 132 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT),
134 PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT), 133 PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT),
diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index 363ea8cb3be6..7ad1b040e4d7 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -14,8 +14,6 @@
14#include <linux/bug.h> 14#include <linux/bug.h>
15#include <linux/stringify.h> 15#include <linux/stringify.h>
16 16
17typedef unsigned short pinmux_enum_t;
18
19enum { 17enum {
20 PINMUX_TYPE_NONE, 18 PINMUX_TYPE_NONE,
21 PINMUX_TYPE_FUNCTION, 19 PINMUX_TYPE_FUNCTION,
@@ -30,7 +28,7 @@ enum {
30#define SH_PFC_PIN_CFG_PULL_DOWN (1 << 3) 28#define SH_PFC_PIN_CFG_PULL_DOWN (1 << 3)
31 29
32struct sh_pfc_pin { 30struct sh_pfc_pin {
33 pinmux_enum_t enum_id; 31 u16 enum_id;
34 const char *name; 32 const char *name;
35 unsigned int configs; 33 unsigned int configs;
36}; 34};
@@ -64,7 +62,7 @@ struct sh_pfc_function {
64}; 62};
65 63
66struct pinmux_func { 64struct pinmux_func {
67 pinmux_enum_t enum_id; 65 u16 enum_id;
68 const char *name; 66 const char *name;
69}; 67};
70 68
@@ -83,27 +81,27 @@ struct pinmux_func {
83 81
84struct pinmux_cfg_reg { 82struct pinmux_cfg_reg {
85 unsigned long reg, reg_width, field_width; 83 unsigned long reg, reg_width, field_width;
86 const pinmux_enum_t *enum_ids; 84 const u16 *enum_ids;
87 const unsigned long *var_field_width; 85 const unsigned long *var_field_width;
88}; 86};
89 87
90#define PINMUX_CFG_REG(name, r, r_width, f_width) \ 88#define PINMUX_CFG_REG(name, r, r_width, f_width) \
91 .reg = r, .reg_width = r_width, .field_width = f_width, \ 89 .reg = r, .reg_width = r_width, .field_width = f_width, \
92 .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) 90 .enum_ids = (u16 [(r_width / f_width) * (1 << f_width)])
93 91
94#define PINMUX_CFG_REG_VAR(name, r, r_width, var_fw0, var_fwn...) \ 92#define PINMUX_CFG_REG_VAR(name, r, r_width, var_fw0, var_fwn...) \
95 .reg = r, .reg_width = r_width, \ 93 .reg = r, .reg_width = r_width, \
96 .var_field_width = (unsigned long [r_width]) { var_fw0, var_fwn, 0 }, \ 94 .var_field_width = (unsigned long [r_width]) { var_fw0, var_fwn, 0 }, \
97 .enum_ids = (pinmux_enum_t []) 95 .enum_ids = (u16 [])
98 96
99struct pinmux_data_reg { 97struct pinmux_data_reg {
100 unsigned long reg, reg_width; 98 unsigned long reg, reg_width;
101 const pinmux_enum_t *enum_ids; 99 const u16 *enum_ids;
102}; 100};
103 101
104#define PINMUX_DATA_REG(name, r, r_width) \ 102#define PINMUX_DATA_REG(name, r, r_width) \
105 .reg = r, .reg_width = r_width, \ 103 .reg = r, .reg_width = r_width, \
106 .enum_ids = (pinmux_enum_t [r_width]) \ 104 .enum_ids = (u16 [r_width]) \
107 105
108struct pinmux_irq { 106struct pinmux_irq {
109 int irq; 107 int irq;
@@ -114,9 +112,9 @@ struct pinmux_irq {
114 { .irq = irq_nr, .gpios = (unsigned short []) { ids, 0 } } \ 112 { .irq = irq_nr, .gpios = (unsigned short []) { ids, 0 } } \
115 113
116struct pinmux_range { 114struct pinmux_range {
117 pinmux_enum_t begin; 115 u16 begin;
118 pinmux_enum_t end; 116 u16 end;
119 pinmux_enum_t force; 117 u16 force;
120}; 118};
121 119
122struct sh_pfc; 120struct sh_pfc;
@@ -152,7 +150,7 @@ struct sh_pfc_soc_info {
152 const struct pinmux_cfg_reg *cfg_regs; 150 const struct pinmux_cfg_reg *cfg_regs;
153 const struct pinmux_data_reg *data_regs; 151 const struct pinmux_data_reg *data_regs;
154 152
155 const pinmux_enum_t *gpio_data; 153 const u16 *gpio_data;
156 unsigned int gpio_data_size; 154 unsigned int gpio_data_size;
157 155
158 const struct pinmux_irq *gpio_irq; 156 const struct pinmux_irq *gpio_irq;
@@ -199,7 +197,7 @@ struct sh_pfc_soc_info {
199#define PORT_ALL(str) CPU_ALL_PORT(_PORT_ALL, PORT, str) 197#define PORT_ALL(str) CPU_ALL_PORT(_PORT_ALL, PORT, str)
200#define GPIO_FN(str) PINMUX_GPIO_FN(GPIO_FN_##str, PINMUX_FN_BASE, str##_MARK) 198#define GPIO_FN(str) PINMUX_GPIO_FN(GPIO_FN_##str, PINMUX_FN_BASE, str##_MARK)
201 199
202/* helper macro for pinmux_enum_t */ 200/* helper macro for pinmux data arrays */
203#define PORT_DATA_IO(nr) \ 201#define PORT_DATA_IO(nr) \
204 PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ 202 PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \
205 PORT##nr##_IN) 203 PORT##nr##_IN)