Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1397488

Re: [PATCH v4 3/7] phy: Add set_mode callback

From David Lechner <david@lechnology.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/7] phy: Add set_mode callback
Date 2016-05-10 00:50 +0200
Message-ID <rx29Y-6uv-3@gated-at.bofh.it> (permalink)
References <rnUlk-6mH-3@gated-at.bofh.it> <rnUlk-6mH-1@gated-at.bofh.it> <rv9yW-DZ-1@gated-at.bofh.it> <rv9IC-Ky-15@gated-at.bofh.it> <rva1Y-TX-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/04/2016 01:39 PM, Bin Liu wrote:
> On Wed, May 04, 2016 at 01:20:36PM -0500, David Lechner wrote:
>> This is something I actually plan on using because the device I am
>> using (LEGO MINDSTORMS EV3) is not wired for OTG, so the callback is
>> needed to override the ID and VBUS signals when switching between
>> host and peripheral mode.
>
> Have you already tested this? I never tried changing mode via sysfs, but
> by quickly reviewing the code, I am wondering how it works. the core
> only calls ops->set_mode() but nothing else. To really switch the mode,
> the driver has to talk to the root hub, and manipulate the SESSION
> bit...
>

I have tested this now and it works. It works because by setting the 
mode, we are overriding the VBUS and ID signals, which in turn triggers 
interrupts. I have tested switching to both peripheral mode and host 
mode via sysfs. Host mode has some issues if you are using a 
self-powered device, but that is a bug in the da8xx glue layer and 
shouldn't hold up this patch series. Aside from that, it works exactly 
as expected.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 3/7] phy: Add set_mode callback Bin Liu <b-liu@ti.com> - 2016-05-04 20:20 +0200
  Re: [PATCH v4 3/7] phy: Add set_mode callback David Lechner <david@lechnology.com> - 2016-05-04 20:30 +0200
    Re: [PATCH v4 3/7] phy: Add set_mode callback Bin Liu <b-liu@ti.com> - 2016-05-04 20:50 +0200
      Re: [PATCH v4 3/7] phy: Add set_mode callback David Lechner <david@lechnology.com> - 2016-05-04 21:50 +0200
      Re: [PATCH v4 3/7] phy: Add set_mode callback David Lechner <david@lechnology.com> - 2016-05-10 00:50 +0200

csiph-web