diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.h | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index a2ed524713e..c7d0b21c7f5 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -968,6 +968,16 @@ void omap_mux_set_gpio(u16 val, int gpio) pr_err("%s: Could not set gpio%i\n", __func__, gpio); } +bool omap_mux_get_wakeupevent(struct omap_mux *m) +{ + u16 val; + if (IS_ERR_OR_NULL(m) || !cpu_is_omap44xx()) + return false; + + val = omap_mux_read(m->partition, m->reg_offset); + return val & OMAP_WAKEUP_EVENT; +} + /* Has no locking, don't use on a pad that is remuxed (by hwmod or otherwise) */ bool omap_mux_get_wakeupenable(struct omap_mux *m) { diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 87bf022aa41..e631b5e82b9 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h @@ -286,6 +286,11 @@ int omap_mux_clear_wakeupenable(struct omap_mux *m); */ bool omap_mux_get_wakeupenable(struct omap_mux *m); +/** omap_mux_get_wakeupevent() - get the wakeupevent bit from a mux struct + * @m: mux struct + */ +bool omap_mux_get_wakeupevent(struct omap_mux *m); + /** * omap_mux_set_gpio() - set mux register value based on GPIO number * @val: New mux register value |