diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-07-20 15:17:08 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-12 20:47:35 -0400 |
commit | 7d5ac91832918a5fda0277aacb8c62421efdeaa2 (patch) | |
tree | 928da385cc21facbdd7c3a655e5090675cc01472 /include/twl4030.h | |
parent | 6dc443e6d7bc2e7e9e2145ba5657dbf309c27c62 (diff) | |
download | u-boot-imx-7d5ac91832918a5fda0277aacb8c62421efdeaa2.zip u-boot-imx-7d5ac91832918a5fda0277aacb8c62421efdeaa2.tar.gz u-boot-imx-7d5ac91832918a5fda0277aacb8c62421efdeaa2.tar.bz2 |
input: TWL4030 input support for power button, USB and charger
This adds support for detecting a few inputs exported by the TWL4030.
Currently-supported inputs are the power button, USB and charger presence.
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'include/twl4030.h')
-rw-r--r-- | include/twl4030.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/twl4030.h b/include/twl4030.h index 2d0ca18..a4d5fbd 100644 --- a/include/twl4030.h +++ b/include/twl4030.h @@ -208,6 +208,12 @@ #define TWL4030_PM_MASTER_SW_EVENTS_DEVSLP (1 << 1) #define TWL4030_PM_MASTER_SW_EVENTS_DEVOFF (1 << 0) +/* HW conditions */ +#define TWL4030_PM_MASTER_STS_HW_CONDITIONS_PWON (1 << 0) +#define TWL4030_PM_MASTER_STS_HW_CONDITIONS_CHG (1 << 1) +#define TWL4030_PM_MASTER_STS_HW_CONDITIONS_USB (1 << 2) +#define TWL4030_PM_MASTER_STS_HW_CONDITIONS_VBUS (1 << 7) + /* Power transition */ #define TWL4030_PM_MASTER_CFG_TRANSITION_STARTON_PWON (1 << 0) #define TWL4030_PM_MASTER_CFG_TRANSITION_STARTON_CHG (1 << 1) @@ -670,6 +676,14 @@ void twl4030_power_init(void); void twl4030_power_mmc_init(int dev_index); /* + * Input + */ + +int twl4030_input_power_button(void); +int twl4030_input_charger(void); +int twl4030_input_usb(void); + +/* * LED */ void twl4030_led_init(unsigned char ledon_mask); |