Signed-off-by: Mike Rapoport <mike@xxxxxxxxxxxxxx> --- arch/arm/plat-omap/include/plat/mux.h | 3 +++ arch/arm/plat-omap/mux.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h index f3c1d8a..edc3ff9 100644 --- a/arch/arm/plat-omap/include/plat/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h @@ -846,6 +846,7 @@ struct omap_mux_cfg { struct pin_config *pins; unsigned long size; int (*cfg_reg)(const struct pin_config *cfg); + int (*cfg_pin)(unsigned long pin_config); }; #ifdef CONFIG_OMAP_MUX @@ -854,11 +855,13 @@ extern int omap1_mux_init(void); extern int omap2_mux_init(void); extern int omap_mux_register(struct omap_mux_cfg *); extern int omap_cfg_reg(unsigned long reg_cfg); +extern int omap_cfg_pin(unsigned long pin_config); #else /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ static inline int omap1_mux_init(void) { return 0; } static inline int omap2_mux_init(void) { return 0; } static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } +static inline int omap_cfg_pin(unsigned long pin_config) { return 0; } #endif #endif diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c index 05aebca..94b37c1 100644 --- a/arch/arm/plat-omap/mux.c +++ b/arch/arm/plat-omap/mux.c @@ -77,7 +77,24 @@ int __init_or_module omap_cfg_reg(const unsigned long index) return mux_cfg->cfg_reg(reg); } EXPORT_SYMBOL(omap_cfg_reg); + +int __init_or_module omap_cfg_pin(unsigned long pin_config) +{ + if (mux_cfg == NULL) { + printk(KERN_ERR "MUX: pin mux table not initialized\n"); + return -ENODEV; + } + + if (!mux_cfg->cfg_pin) { + printk(KERN_ERR "MUX: cfg_pin interface is not supported\n"); + return -ENODEV; + } + + return mux_cfg->cfg_pin(pin_config); +} +EXPORT_SYMBOL(omap_cfg_pin); #else #define omap_mux_init() do {} while(0) #define omap_cfg_reg(x) do {} while(0) +#define omap_cfg_pin(x) do {} while(0) #endif /* CONFIG_OMAP_MUX */ -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html