Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755731AbcDAQVP (ORCPT ); Fri, 1 Apr 2016 12:21:15 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:37125 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbcDAQVN (ORCPT ); Fri, 1 Apr 2016 12:21:13 -0400 Date: Fri, 1 Apr 2016 11:19:31 -0500 From: Bin Liu To: David Lechner CC: Kishon Vijay Abraham I , Petr Kulhavy , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman , Andreas =?iso-8859-1?Q?F=E4rber?= , Tony Lindgren , Robert Jarzmik , Sergei Shtylyov , , , , Subject: Re: [PATCH v2 06/11] phy: da8xx-usb: new driver for DA8XX SoC USB PHY Message-ID: <20160401161931.GC6264@uda0271908> Mail-Followup-To: Bin Liu , David Lechner , Kishon Vijay Abraham I , Petr Kulhavy , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman , Andreas =?iso-8859-1?Q?F=E4rber?= , Tony Lindgren , Robert Jarzmik , Sergei Shtylyov , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org References: <1458181615-27782-1-git-send-email-david@lechnology.com> <1458181615-27782-7-git-send-email-david@lechnology.com> <56FE74AC.6080303@ti.com> <20160401144510.GA6264@uda0271908> <56FE9B8F.7050605@lechnology.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <56FE9B8F.7050605@lechnology.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 34 Hi, On Fri, Apr 01, 2016 at 11:02:23AM -0500, David Lechner wrote: > On 04/01/2016 09:45 AM, Bin Liu wrote: > >>>+EXPORT_SYMBOL_GPL(da8xx_usb20_phy_set_mode); > >> > >>Don't prefer export symbols from PHY driver. That'll create unnecessary > >>dependencies between the controller and the PHY. > > > >Agreed. > > > >> > >>I think it'll be better to create a new attribute and use it? > > > >Another simpler option is to not support _set_mode() for DA8xx, and the > >phy driver set the otgmode bit in probe() based on dr_mode of the > >controller. > > > >Regards, > >-Bin. > > > > This certainly works for my particular use case, however, Sergei > Shtylyov, who wrote the da8xx musb glue layer originally, seemed to > recall in his review of the patch series that this really is > necessary for OTG mode to work properly. I don't know much about the usb module on DA8xx, but it seems to me that _set_mode() has nothing to do with OTG mode. musb_core only calls _set_mode() in two places - 1) sysfs: musb_mode_store(), 2) init: musb_init_controller(). None of them should be related to OTG mode. Regards, -Bin.