sb/core/hcd.c| 55 +-
> drivers/usb/core/hub.c| 10 +-
> drivers/usb/gadget/udc/udc-core.c | 124 ++-
> drivers/usb/phy/Kconfig |2 +-
> drivers/usb/phy/phy-fsl-usb.c
On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote:
> On 09/09/15 11:45, Peter Chen wrote:
> > On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote:
> >> On 09/09/15 11:13, Peter Chen wrote:
> >>> On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Qua
On Thu, Sep 10, 2015 at 05:17:36PM +0300, Roger Quadros wrote:
> On 10/09/15 08:35, Peter Chen wrote:
> > On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote:
> >> On 09/09/15 11:45, Peter Chen wrote:
> >>> On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Qua
On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote:
> On 09/09/15 11:13, Peter Chen wrote:
> > On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote:
> >> On 09/09/15 05:21, Peter Chen wrote:
> >>> On Tue, Sep 08, 2015 at 03:25:2
On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote:
> On 09/09/15 05:21, Peter Chen wrote:
> > On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote:
> >>
> >>
> >> On 08/09/15 11:31, Peter Chen wrote:
> >>> On Mon, Sep 0
On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote:
> On 07/09/15 04:23, Peter Chen wrote:
> > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote:
> >> + * This is used by the USB Host stack to register the Host controller
> >> + * to the OTG
On Mon, Sep 07, 2015 at 12:57:21PM +0300, Roger Quadros wrote:
> On 07/09/15 04:24, Peter Chen wrote:
> > On Mon, Aug 24, 2015 at 04:21:15PM +0300, Roger Quadros wrote:
> >> This is to prevent missing symbol build error if OTG is
> >> enabled (built-in) and HCD
On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote:
>
>
> On 08/09/15 11:31, Peter Chen wrote:
> > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote:
> >> On 07/09/15 04:23, Peter Chen wrote:
> >>> On Mon, Aug 24, 2015 at 0
cts of usb_add_hcd(),
> + * invoking the HCD's stop() method.
> + * If it is an OTG device then it unregisters the HCD from OTG core
> + * as well.
> + */
> +void usb_remove_hcd(struct usb_hcd *hcd)
> +{
> + /* If OTG device, OTG core takes care of stopping HCD */
> + i
> +int usb_otg_start_host(struct otg_fsm *fsm, int on);
> +int usb_otg_start_gadget(struct otg_fsm *fsm, int on);
> +
> +#else /* CONFIG_USB_OTG */
> +
> +static inline struct otg_fsm *usb_otg_register(struct device *dev,
> +struct usb_o
On Mon, Aug 24, 2015 at 04:21:15PM +0300, Roger Quadros wrote:
> This is to prevent missing symbol build error if OTG is
> enabled (built-in) and HCD core (CONFIG_USB) is module.
>
> Signed-off-by: Roger Quadros <rog...@ti.com>
> Acked-by: Peter Chen <peter.c...@freesca
include/linux/usb/otg-fsm.h
> index fc5b4d9..20c8219 100644
> --- a/include/linux/usb/otg-fsm.h
> +++ b/include/linux/usb/otg-fsm.h
> @@ -195,6 +195,7 @@ struct otg_fsm {
> /* Current usb protocol used: 0:undefine; 1:host; 2:client */
> int protocol;
> str
> drivers/usb/common/usb-otg.h | 71 ++
> drivers/usb/core/Kconfig | 11 +-
> drivers/usb/core/hcd.c| 55 +-
> drivers/usb/core/hub.c| 10 +-
> drivers/usb/gadget/udc/udc-core.c
ops = _drd_ops;
> +
> + if (!dwc->edev) {
> + dev_err(dwc->dev, "No extcon device found for OTG mode\n");
> + return -ENODEV;
> + }
> +
Do All dwc3 platforms id/vbus need to get through extcon? Do the
SoCs have id/vbus pin?
--
Be
spin_lock(>lock);
>
> this seems unnecessary, we're already in hardirq with IRQs disabled.
> What sort of race could we have ? (in fact, this also needs change in
> dwc3/gadget.c).
>
Is it possible the kernel process is accessing the content you will
access?
--
Best Regards,
| 116 +-
include/linux/usb/otg.h | 191 +++-
23 files changed, 1808 insertions(+), 76 deletions(-)
create mode 100644 drivers/usb/common/usb-otg.c
create mode 100644 drivers/usb/common/usb-otg.h
--
2.1.4
--
Best Regards,
Peter Chen
On Fri, Aug 14, 2015 at 12:42:38PM +0300, Roger Quadros wrote:
Hi Peter,
On 13/07/15 13:20, Roger Quadros wrote:
On 13/07/15 05:14, Peter Chen wrote:
On Wed, Jul 08, 2015 at 01:19:33PM +0300, Roger Quadros wrote:
The OTG core instantiates the OTG Finite State Machine
per OTG controller
by platform
drivers, I think we all agree to call usb_add_hcd/usb_remove_hcd
to start/stop host roles, just some platforms may need more than
just call them.
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord
adp_change;
int power_up;
int a_srp_det;
cheers,
-roger
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
);
+};
/*-*/
--
2.1.4
Reviewed-by: Peter Chen peter.c...@freescale.com
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info
;
--
2.1.4
Reviewed-by: Peter Chen peter.c...@freescale.com
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
(*start_enum)(struct usb_bus *bus, unsigned port_num);
};
--
2.1.4
Acked-by: Peter Chen peter.c...@freescale.com
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info
On Wed, Jul 15, 2015 at 04:30:27PM +0300, Roger Quadros wrote:
On 14/07/15 03:34, Peter Chen wrote:
On Mon, Jul 13, 2015 at 01:13:54PM +0300, Roger Quadros wrote:
Peter,
On 13/07/15 04:58, Peter Chen wrote:
On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger Quadros wrote
On Tue, Jul 14, 2015 at 11:18:30AM -0700, Andrew Bresticker wrote:
Hi Peter,
On Mon, Jul 13, 2015 at 5:59 PM, Peter Chen peter.c...@freescale.com wrote:
On Mon, Jul 13, 2015 at 12:14:43PM -0700, Andrew Bresticker wrote:
Hi Roger,
On Wed, Jul 8, 2015 at 3:19 AM, Roger Quadros rog
@ {
...
};
usb_host: usb-host@... {
...
};
What do you think?
Thanks,
Andrew
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Mon, Jul 13, 2015 at 01:13:54PM +0300, Roger Quadros wrote:
Peter,
On 13/07/15 04:58, Peter Chen wrote:
On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger Quadros wrote:
This is to prevent missing symbol build error if OTG is
enabled (built-in) and HCD core (CONFIG_USB) is module
updated by OTG FSM helpers defined in this file
Only one tiny comment, others are ok.
Acked-by: Peter Chen peter.c...@freescale.com
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More
)
#define PROTO_GADGET (2)
@@ -195,6 +181,9 @@ struct otg_fsm {
int protocol;
struct mutex lock;
bool state_changed;
+
+ /* for debug prints */
+ struct device *dev;
};
struct otg_fsm_ops {
--
2.1.4
Acked-by: Peter Chen peter.c...@freescale.com
--
Best
(*start_gadget)(struct otg_fsm *fsm, int on);
+ int (*start_enum)(struct usb_bus *bus, unsigned port_num);
};
--
2.1.4
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
{
--
2.1.4
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
/usb/host/ohci*
-USB OTG FSM (Finite State Machine)
+USB OTG/DRD core and FSM (Finite State Machine)
M: Peter Chen peter.c...@freescale.com
+M: Roger Quadros rog...@ti.com
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
L: linux-...@vger.kernel.org
S
int hcd_giveback_urb_in_bh(struct usb_hcd *hcd)
{
return hcd-driver-flags HCD_BH;
--
2.1.4
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
USB_OTG_RSP, and this helper
can be upgraded in the future.
ok, it is the implementation detail.
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Wed, Apr 22, 2015 at 10:33:24AM +0300, Roger Quadros wrote:
On 22/04/15 05:17, Peter Chen wrote:
On Tue, Apr 21, 2015 at 10:34:01AM +0300, Roger Quadros wrote:
On 21/04/15 09:04, Peter Chen wrote:
On 20/04/15 06:05, Peter Chen wrote:
On Tue, Apr 14, 2015 at 01:41:47PM +0300
On 20/04/15 06:05, Peter Chen wrote:
On Tue, Apr 14, 2015 at 01:41:47PM +0300, Roger Quadros wrote:
This is an attempt to centralize OTG/Dual-role functionality in the kernel.
As of now I've got Dual-role functionality working pretty reliably on
dra7-evm. xhci side of things for OTG
On Tue, Apr 21, 2015 at 10:34:01AM +0300, Roger Quadros wrote:
On 21/04/15 09:04, Peter Chen wrote:
On 20/04/15 06:05, Peter Chen wrote:
On Tue, Apr 14, 2015 at 01:41:47PM +0300, Roger Quadros wrote:
This is an attempt to centralize OTG/Dual-role functionality in the
kernel
/common/usb-otg.c
create mode 100644 drivers/usb/common/usb-otg.h
create mode 100644 include/linux/usb/usb-otg.h
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo
)
+{
+ return true;
+}
+
+static inline struct device *usb_otg_fsm_to_dev(struct otg_fsm *fsm)
+{
+ return NULL;
+}
+#endif /* CONFIG_USB_OTG_CORE */
+
+#endif /* __LINUX_USB_OTG_CORE */
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe
*gadget);
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Apr 16, 2015 at 03:07:41PM +0300, Roger Quadros wrote:
On 16/04/15 14:48, Peter Chen wrote:
On Tue, Apr 14, 2015 at 01:41:51PM +0300, Roger Quadros wrote:
The OTG state machine needs a mechanism to start and
stop the gadget controller. Add usb_gadget_start()
and usb_gadget_stop
, __FILE__, __LINE__)
-#else
-#define MPC_LOC do {} while (0)
-#endif
-
#define PROTO_UNDEF (0)
#define PROTO_HOST (1)
#define PROTO_GADGET (2)
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message
;
- /* Informative variables */
+ /* Informative variables. All unused as of now */
int a_bus_drop_inf;
int a_bus_req_inf;
int a_clr_err_inf;
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body
On Thu, Apr 16, 2015 at 02:58:20PM +0300, Roger Quadros wrote:
On 16/04/15 14:36, Peter Chen wrote:
On Tue, Apr 14, 2015 at 01:41:49PM +0300, Roger Quadros wrote:
Move the state_changed variable into struct otg_fsm
so that we can support multiple instances.
OTG device has only one port
On Thu, Apr 16, 2015 at 02:59:12PM +0300, Roger Quadros wrote:
On 16/04/15 14:41, Peter Chen wrote:
On Tue, Apr 14, 2015 at 01:41:50PM +0300, Roger Quadros wrote:
If usb/otg-fsm.h and usb/composite.h are included together
then it results in the build warning [1].
Prevent that by moving
fsm.a_set_b_hnp_enable, but this flag is missing at current fsm
structure.
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
_usb_remove_hcd(struct usb_hcd *hcd);
extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1);
struct platform_device;
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
On Thu, Mar 19, 2015 at 12:18:55PM +0200, Roger Quadros wrote:
On 19/03/15 05:40, Peter Chen wrote:
On Wed, Mar 18, 2015 at 03:55:57PM +0200, Roger Quadros wrote:
The OTG core instantiates the OTG Finite State Machine
per OTG controller and manages starting/stopping the
host and gadget
to there are some de-bounce waitings.
In any case I can migrate to the add/remove hcd approach to simplify things.
It should be no problem, we use it more than 1 years.
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord
On Thu, Mar 19, 2015 at 04:50:31PM +0200, Roger Quadros wrote:
On 19/03/15 16:09, Li Jun wrote:
On Thu, Mar 19, 2015 at 12:14:39PM +0200, Roger Quadros wrote:
On 19/03/15 05:30, Peter Chen wrote:
On Wed, Mar 18, 2015 at 03:55:56PM +0200, Roger Quadros wrote:
The OTG state machine needs
- Registering an OTG capable controller
- Registering Host and Gadget controllers to OTG core
- Providing inputs to and kicking the OTG state machine
TODO:
- sysfs interface to allow application inputs to OTG state machine
- otg class?
Signed-off-by: Roger Quadros
On Fri, Mar 20, 2015 at 01:08:25PM +0200, Roger Quadros wrote:
On 20/03/15 11:46, Roger Quadros wrote:
On 20/03/15 09:18, Peter Chen wrote:
On Thu, Mar 19, 2015 at 04:50:31PM +0200, Roger Quadros wrote:
On 19/03/15 16:09, Li Jun wrote:
On Thu, Mar 19, 2015 at 12:14:39PM +0200, Roger
int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1);
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
device *dev));
extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget
*gadget);
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
;
- int a_clr_err_inf;
- int b_bus_req_inf;
/* Auxilary informative variables */
int a_suspend_req_inf;
But the above are defined at: ch 7.4.4, On-The-Go and Embedded Host
Supplement to the USB Revision 2.0 Specification
--
2.1.0
--
Best Regards,
Peter Chen
/* __LINUX_USB_OTG_CORE */
--
2.1.0
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
int usb_drd_stop_udc(struct device *parent)
+{ return 0; }
+static inline int usb_drd_get_state(struct device *parent)
+{ return 0; }
+#endif
--
1.8.3.1
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord
...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, May 8, 2013 at 6:53 AM, Stephen Warren swar...@wwwdotorg.org wrote:
From: Stephen Warren swar...@nvidia.com
Many USB host drivers contain code such as:
if (!pdev-dev.dma_mask)
pdev-dev.dma_mask = tegra_ehci_dma_mask;
... where tegra_ehci_dma_mask is a global. I suspect this
dev-dev.coherent_dma_mask = DMA_BIT_MASK(32);
at function of_platform_device_create, why can't add
dev-dev.dma_mask = dev-dev.coherent_dma_mask after that?
If DT core can do above things, can we delete dma_mask assignment
at every driver?
--
BR,
Peter Chen
--
To unsubscribe from this list: send
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-omap
61 matches
Mail list logo