Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chen Yu
Hi, On 2019/3/4 14:55, Andy Shevchenko wrote: > On Mon, Mar 4, 2019 at 4:35 AM Chen Yu wrote: >> On 2019/3/3 0:01, Andy Shevchenko wrote: >>> On Sat, Mar 2, 2019 at 11:05 AM Yu Chen wrote: > +config HISI_HIKEY_USB + tristate "USB functionality of HiSilicon Hikey Platform" +

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chunfeng Yun
hi, On Mon, 2019-03-04 at 08:50 +0200, Andy Shevchenko wrote: > On Mon, Mar 4, 2019 at 3:47 AM Chunfeng Yun wrote: > > On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote: > > > > + hisi_hikey_usb->role_sw = usb_role_switch_get(dev); > > > + if (!hisi_hikey_usb->role_sw) > > > +

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Andy Shevchenko
On Mon, Mar 4, 2019 at 4:35 AM Chen Yu wrote: > On 2019/3/3 0:01, Andy Shevchenko wrote: > > On Sat, Mar 2, 2019 at 11:05 AM Yu Chen wrote: > >> +config HISI_HIKEY_USB > >> + tristate "USB functionality of HiSilicon Hikey Platform" > >> + depends on OF && GPIOLIB > >> + help >

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Andy Shevchenko
On Mon, Mar 4, 2019 at 3:47 AM Chunfeng Yun wrote: > On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote: > > + hisi_hikey_usb->role_sw = usb_role_switch_get(dev); > > + if (!hisi_hikey_usb->role_sw) > > + return -EPROBE_DEFER; > Here return EPROBE_DEFFER means the related device

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chen Yu
Hi Andy, On 2019/3/3 0:01, Andy Shevchenko wrote: > On Sat, Mar 2, 2019 at 11:05 AM Yu Chen wrote: >> >> This driver handles usb hub power on and typeC port event of HiKey960 board: >> 1)DP&DM switching between usb hub and typeC port base on typeC port >> state >> 2)Control power of usb hub on Hi

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chen Yu
Hi Chunfeng Yun, On 2019/3/4 9:47, Chunfeng Yun wrote: >> + >> +hisi_hikey_usb->role_sw = usb_role_switch_get(dev); >> +if (!hisi_hikey_usb->role_sw) >> +return -EPROBE_DEFER; > Here return EPROBE_DEFFER means the related device_connection is > registered after this probe is c

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chunfeng Yun
hi, On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote: > This driver handles usb hub power on and typeC port event of HiKey960 board: > 1)DP&DM switching between usb hub and typeC port base on typeC port > state > 2)Control power of usb hub on Hikey960 > 3)Control vbus of typeC port > > Cc: Chunfen

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chen Yu
On 2019/3/4 4:17, John Stultz wrote: > On Sat, Mar 2, 2019 at 4:05 AM Yu Chen wrote: >> +static int hisi_hikey_usb_probe(struct platform_device *pdev) >> +{ >> + struct device *dev = &pdev->dev; >> + struct device_node *root = dev->of_node; > > Minor nit: root is unused and generat

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread John Stultz
On Sat, Mar 2, 2019 at 4:05 AM Yu Chen wrote: > +static int hisi_hikey_usb_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct device_node *root = dev->of_node; Minor nit: root is unused and generates build warnings. thanks -john

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-02 Thread Andy Shevchenko
On Sat, Mar 2, 2019 at 11:05 AM Yu Chen wrote: > > This driver handles usb hub power on and typeC port event of HiKey960 board: > 1)DP&DM switching between usb hub and typeC port base on typeC port > state > 2)Control power of usb hub on Hikey960 > 3)Control vbus of typeC port > +config HISI_HIKE

[PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-02 Thread Yu Chen
This driver handles usb hub power on and typeC port event of HiKey960 board: 1)DP&DM switching between usb hub and typeC port base on typeC port state 2)Control power of usb hub on Hikey960 3)Control vbus of typeC port Cc: Chunfeng Yun Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Greg Kroah-Hartma