gpio: Explicitly index samsung_gpio_cfgs
Make it easier to follow the by number references into samsung_gpio_cfgs by putting the indexes into the code initialising the array, improving readability a bit. Ideally we wouldn't be using magic array indexes at all but this is easier than coming up with a better way. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -467,33 +467,42 @@ static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
|
static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
|
||||||
{
|
[0] = {
|
||||||
.cfg_eint = 0x0,
|
.cfg_eint = 0x0,
|
||||||
}, {
|
},
|
||||||
|
[1] = {
|
||||||
.cfg_eint = 0x3,
|
.cfg_eint = 0x3,
|
||||||
}, {
|
},
|
||||||
|
[2] = {
|
||||||
.cfg_eint = 0x7,
|
.cfg_eint = 0x7,
|
||||||
}, {
|
},
|
||||||
|
[3] = {
|
||||||
.cfg_eint = 0xF,
|
.cfg_eint = 0xF,
|
||||||
}, {
|
},
|
||||||
|
[4] = {
|
||||||
.cfg_eint = 0x0,
|
.cfg_eint = 0x0,
|
||||||
.set_config = samsung_gpio_setcfg_2bit,
|
.set_config = samsung_gpio_setcfg_2bit,
|
||||||
.get_config = samsung_gpio_getcfg_2bit,
|
.get_config = samsung_gpio_getcfg_2bit,
|
||||||
}, {
|
},
|
||||||
|
[5] = {
|
||||||
.cfg_eint = 0x2,
|
.cfg_eint = 0x2,
|
||||||
.set_config = samsung_gpio_setcfg_2bit,
|
.set_config = samsung_gpio_setcfg_2bit,
|
||||||
.get_config = samsung_gpio_getcfg_2bit,
|
.get_config = samsung_gpio_getcfg_2bit,
|
||||||
}, {
|
},
|
||||||
|
[6] = {
|
||||||
.cfg_eint = 0x3,
|
.cfg_eint = 0x3,
|
||||||
.set_config = samsung_gpio_setcfg_2bit,
|
.set_config = samsung_gpio_setcfg_2bit,
|
||||||
.get_config = samsung_gpio_getcfg_2bit,
|
.get_config = samsung_gpio_getcfg_2bit,
|
||||||
}, {
|
},
|
||||||
|
[7] = {
|
||||||
.set_config = samsung_gpio_setcfg_2bit,
|
.set_config = samsung_gpio_setcfg_2bit,
|
||||||
.get_config = samsung_gpio_getcfg_2bit,
|
.get_config = samsung_gpio_getcfg_2bit,
|
||||||
}, {
|
},
|
||||||
|
[8] = {
|
||||||
.set_pull = exynos4_gpio_setpull,
|
.set_pull = exynos4_gpio_setpull,
|
||||||
.get_pull = exynos4_gpio_getpull,
|
.get_pull = exynos4_gpio_getpull,
|
||||||
}, {
|
},
|
||||||
|
[9] = {
|
||||||
.cfg_eint = 0x3,
|
.cfg_eint = 0x3,
|
||||||
.set_pull = exynos4_gpio_setpull,
|
.set_pull = exynos4_gpio_setpull,
|
||||||
.get_pull = exynos4_gpio_getpull,
|
.get_pull = exynos4_gpio_getpull,
|
||||||
|
Reference in New Issue
Block a user