Search
SailfishOS Open Build Service
>
Projects
>
home:dcthang:branches:nemo:devel:hw:ti:omap3:n900
>
kernel-adaptation-n900
> linux-2.6-usb-otg-add-detect_charger-field-to-otg_transceiver.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File linux-2.6-usb-otg-add-detect_charger-field-to-otg_transceiver.patch of Package kernel-adaptation-n900
From 7d6c0a22b5c6c83bda70f82329cf8ed1d0549c7c Mon Sep 17 00:00:00 2001 From: Felipe Balbi <felipe.balbi@nokia.com> Date: Mon, 4 Jan 2010 15:20:28 +0200 Subject: [PATCH 03/42] usb: otg: add detect_charger field to otg_transceiver Then we can allow musb to kick charger detection on transceiver. This is added as __deprecated because it only exists to mimic the behavior we had in Fremantle. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> --- include/linux/usb/otg.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 0a5b371..2ad773a 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h @@ -110,6 +110,8 @@ struct otg_transceiver { /* start or continue HNP role switch */ int (*start_hnp)(struct otg_transceiver *otg); + /* detect a charger */ + int (*detect_charger)(struct otg_transceiver *otg) __deprecated; }; @@ -230,6 +232,15 @@ otg_start_srp(struct otg_transceiver *otg) return otg->start_srp(otg); } +static inline int +otg_detect_charger(struct otg_transceiver *otg) +{ + if (otg->detect_charger) + return otg->detect_charger(otg); + + return 0; +} + /* notifiers */ static inline int otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) -- 1.7.0.4