Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1184723 > unrolled thread
| Started by | Ramneek Mehresh <ramneek.mehresh@freescale.com> |
|---|---|
| First post | 2015-07-15 14:10 +0200 |
| Last post | 2015-07-15 14:10 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/8][v2]Add OTG support for FSL socs Ramneek Mehresh <ramneek.mehresh@freescale.com> - 2015-07-15 14:10 +0200
[PATCH 6/8][v2]usb:fsl:otg: Combine host/gadget start/resume for ID change Ramneek Mehresh <ramneek.mehresh@freescale.com> - 2015-07-15 14:10 +0200
| From | Ramneek Mehresh <ramneek.mehresh@freescale.com> |
|---|---|
| Date | 2015-07-15 14:10 +0200 |
| Subject | [PATCH 0/8][v2]Add OTG support for FSL socs |
| Message-ID | <pMtvY-6Av-3@gated-at.bofh.it> |
Add support for otg for all freescale socs having internal usb phy. Ramneek Mehresh (8): usb:fsl:otg: Make fsl otg driver as tristate usb:fsl:otg: Add controller version based ULPI and UTMI phy usb:fsl:otg: Add support to add/remove usb host driver usb:fsl:otg: Signal host drv when host is otg usb:fsl:otg: Modify otg_event to start host drv usb:fsl:otg: Combine host/gadget start/resume for ID change usb:fsl:otg: Remove host drv upon otg bring-up usb:fsl:otg: Add host-gadget drv sync delay drivers/usb/host/ehci-fsl.c | 85 +++++++++++++++++++++++++++++++++---------- drivers/usb/host/ehci-fsl.h | 20 ++++++++++ drivers/usb/phy/Kconfig | 2 +- drivers/usb/phy/phy-fsl-usb.c | 58 ++++++++++++++++++++++------- drivers/usb/phy/phy-fsl-usb.h | 7 ++++ include/linux/usb.h | 1 + 6 files changed, 139 insertions(+), 34 deletions(-) -- Changes for v2: - moved struct ehci_fsl out of ehci-fsl.c to ehci-fsl.h - made struct ehci_fsl private of struct ehci_hcd 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Ramneek Mehresh <ramneek.mehresh@freescale.com> |
|---|---|
| Date | 2015-07-15 14:10 +0200 |
| Subject | [PATCH 6/8][v2]usb:fsl:otg: Combine host/gadget start/resume for ID change |
| Message-ID | <pMtFE-71X-7@gated-at.bofh.it> |
| In reply to | #1184723 |
Make call to fsl_otg_event for each id change even.
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
---
drivers/usb/phy/phy-fsl-usb.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index 3b8a9e5..689516d 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -733,6 +733,7 @@ irqreturn_t fsl_otg_isr(int irq, void *dev_id)
{
struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm;
struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg;
+ struct fsl_otg *otg_dev = dev_id;
u32 otg_int_src, otg_sc;
otg_sc = fsl_readl(&usb_dr_regs->otgsc);
@@ -762,18 +763,8 @@ irqreturn_t fsl_otg_isr(int irq, void *dev_id)
otg->gadget->is_a_peripheral = !fsm->id;
VDBG("ID int (ID is %d)\n", fsm->id);
- if (fsm->id) { /* switch to gadget */
- schedule_delayed_work(
- &((struct fsl_otg *)dev_id)->otg_event,
- 100);
- } else { /* switch to host */
- cancel_delayed_work(&
- ((struct fsl_otg *)dev_id)->
- otg_event);
- fsl_otg_start_gadget(fsm, 0);
- otg_drv_vbus(fsm, 1);
- fsl_otg_start_host(fsm, 1);
- }
+ schedule_delayed_work(&otg_dev->otg_event, 100);
+
return IRQ_HANDLED;
}
}
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web