Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759002AbcDAQC1 (ORCPT ); Fri, 1 Apr 2016 12:02:27 -0400 Received: from vern.gendns.com ([206.190.152.46]:40091 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752247AbcDAQCZ (ORCPT ); Fri, 1 Apr 2016 12:02:25 -0400 Subject: Re: [PATCH v2 06/11] phy: da8xx-usb: new driver for DA8XX SoC USB PHY To: Bin Liu , 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 , =?UTF-8?Q?Andreas_F=c3=a4rber?= , 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> From: David Lechner Message-ID: <56FE9B8F.7050605@lechnology.com> Date: Fri, 1 Apr 2016 11:02:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160401144510.GA6264@uda0271908> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 817 Lines: 26 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. By the way, there is v3 of this patch series already, although this patch is nearly the same.