ARM: OMAP: Allow registering pin mux function
This patch changes pin multiplexing init to allow registering custom function. The omap_cfg_reg() func will be split into omap processor specific functions in later patch. This is done to make adding omap3 pin multiplexing easier. Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
|
||||
#ifdef CONFIG_OMAP_MUX
|
||||
|
||||
static struct omap_mux_cfg arch_mux_cfg;
|
||||
|
||||
/* NOTE: See mux.h for the enumeration */
|
||||
|
||||
struct pin_config __initdata_or_module omap24xx_pins[] = {
|
||||
@@ -169,10 +171,25 @@ MUX_CFG_24XX("B13_24XX_KBC6", 0x110, 3, 0, 0, 1)
|
||||
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP24XX
|
||||
int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int __init omap2_mux_init(void)
|
||||
{
|
||||
omap_mux_register(omap24xx_pins, ARRAY_SIZE(omap24xx_pins));
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP24XX
|
||||
if (cpu_is_omap24xx()) {
|
||||
arch_mux_cfg.pins = omap24xx_pins;
|
||||
arch_mux_cfg.size = ARRAY_SIZE(omap24xx_pins);
|
||||
arch_mux_cfg.cfg_reg = omap24xx_cfg_reg;
|
||||
}
|
||||
#endif
|
||||
|
||||
return omap_mux_register(&arch_mux_cfg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user