diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2013-12-02 13:54:01 +0100 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2013-12-03 09:33:59 +0900 |
commit | 0938f5b275702107c736e05e377dd1045a8cba27 (patch) | |
tree | 3e9978c96ba54615512411700864c00826b951dd /board/samsung/trats/trats.c | |
parent | 09f980107db05d0c4b063298f29373a3790a5de6 (diff) | |
download | u-boot-imx-0938f5b275702107c736e05e377dd1045a8cba27.zip u-boot-imx-0938f5b275702107c736e05e377dd1045a8cba27.tar.gz u-boot-imx-0938f5b275702107c736e05e377dd1045a8cba27.tar.bz2 |
trats: usb: Add usb_cable_connected() function
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board/samsung/trats/trats.c')
-rw-r--r-- | board/samsung/trats/trats.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 7012c13..6bd106e 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -501,6 +501,17 @@ int board_usb_init(int index, enum usb_init_type init) debug("USB_udc_probe\n"); return s3c_udc_probe(&s5pc210_otg_data); } + +#ifdef CONFIG_USB_CABLE_CHECK +int usb_cable_connected(void) +{ + struct pmic *muic = pmic_get("MAX8997_MUIC"); + if (!muic) + return 0; + + return !!muic->chrg->chrg_type(muic); +} +#endif #endif static void pmic_reset(void) |