Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03e128ca authored by Charulatha V's avatar Charulatha V Committed by Tarun Kanti DebBarma
Browse files

gpio/omap: remove dependency on gpio_bank_count



The gpio_bank_count is the count of number of GPIO devices in a SoC. Remove this
dependency from the driver by using list. Also remove the dependency on array of
pointers to gpio_bank struct of all GPIO devices.

Signed-off-by: default avatarCharulatha V <charu@ti.com>
Reviewed-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent 62aa2b53
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -115,7 +115,6 @@ static int __init omap15xx_gpio_init(void)
	platform_device_register(&omap15xx_mpu_gpio);
	platform_device_register(&omap15xx_gpio);

	gpio_bank_count = 2;
	return 0;
}
postcore_initcall(omap15xx_gpio_init);
+0 −2
Original line number Diff line number Diff line
@@ -221,8 +221,6 @@ static int __init omap16xx_gpio_init(void)
	for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++)
		platform_device_register(omap16xx_gpio_dev[i]);

	gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev);

	return 0;
}
postcore_initcall(omap16xx_gpio_init);
+0 −2
Original line number Diff line number Diff line
@@ -282,8 +282,6 @@ static int __init omap7xx_gpio_init(void)
	for (i = 0; i < ARRAY_SIZE(omap7xx_gpio_dev); i++)
		platform_device_register(omap7xx_gpio_dev[i]);

	gpio_bank_count = ARRAY_SIZE(omap7xx_gpio_dev);

	return 0;
}
postcore_initcall(omap7xx_gpio_init);
+0 −1
Original line number Diff line number Diff line
@@ -111,7 +111,6 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)

	omap_device_disable_idle_on_suspend(pdev);

	gpio_bank_count++;
	return 0;
}

+0 −3
Original line number Diff line number Diff line
@@ -202,9 +202,6 @@ struct omap_gpio_platform_data {
	struct omap_gpio_reg_offs *regs;
};

/* TODO: Analyze removing gpio_bank_count usage from driver code */
extern int gpio_bank_count;

extern void omap2_gpio_prepare_for_idle(int off_mode);
extern void omap2_gpio_resume_after_idle(void);
extern void omap_set_gpio_debounce(int gpio, int enable);
Loading