[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-140-g23b564c
Nelson Castillo
arhuaco at freaks-unidos.net
Mon Jun 8 17:30:12 UTC 2009
The following commit has been merged in the andy-tracking branch:
commit f16c3431a1a7510eb3504ec5d96677dd0fac4cd6
Author: Mike Westerhof <mwester at dls.net>
Date: Wed May 13 20:15:54 2009 -0500
Add a vbus polling function for use by the udc driver.
Signed-off-by: Mike Westerhof <mwester at dls.net>
diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index d16e9d6..cb821ce 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -476,11 +476,22 @@ static void gta02_udc_vbus_draw(unsigned int ma)
schedule_delayed_work(>a02_charger_work,
GTA02_CHARGER_CONFIGURE_TIMEOUT);
}
+
+static int gta02_udc_vbus_status(void)
+{
+ struct pcf50633 *pcf = gta02_pcf;
+
+ if (!gta02_pcf)
+ return -ENODEV;
+
+ return !!(pcf50633_mbc_get_status(pcf) & PCF50633_MBC_USB_ONLINE);
+}
#else /* !CONFIG_CHARGER_PCF50633 */
#define gta02_get_charger_online_status NULL
#define gta02_get_charger_active_status NULL
#define gta02_pmu_event_callback NULL
#define gta02_udc_vbus_draw NULL
+#define gta02_udc_vbus_status NULL
#endif
static struct platform_device gta01_pm_gps_dev = {
@@ -954,6 +965,7 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e cmd)
static struct s3c2410_udc_mach_info gta02_udc_cfg = {
.vbus_draw = gta02_udc_vbus_draw,
.udc_command = gta02_udc_command,
+ .get_vbus_status= gta02_udc_vbus_status,
};
--
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko
More information about the pkg-fso-commits
mailing list