Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934645AbcCPE5x (ORCPT ); Wed, 16 Mar 2016 00:57:53 -0400 Received: from vern.gendns.com ([206.190.152.46]:52346 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934477AbcCPE5t (ORCPT ); Wed, 16 Mar 2016 00:57:49 -0400 Subject: Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources To: Sergei Shtylyov , Sekhar Nori , Kevin Hilman , Alan Stern , Bin Liu , Petr Kulhavy References: <1458081473-8223-1-git-send-email-david@lechnology.com> <1458081473-8223-3-git-send-email-david@lechnology.com> <56E8906E.7070800@cogentembedded.com> <56E8D720.7000508@lechnology.com> Cc: Russell King , Greg Kroah-Hartman , Felipe Balbi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: David Lechner Message-ID: <56E8E7C7.70901@lechnology.com> Date: Tue, 15 Mar 2016 23:57:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56E8D720.7000508@lechnology.com> 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: 1042 Lines: 22 On 03/15/2016 10:46 PM, David Lechner wrote: > On 03/15/2016 05:45 PM, Sergei Shtylyov wrote: >> >> No, this register is shared b/w MUSB and OHCI. The proper thing to >> do is to write the PHY driver and let it control this shared register. >> > > OK. I've started working on this. I am looking at using struct usb_phy, > however, enum usb_phy_type only has USB_PHY_TYPE_UNDEFINED, > USB_PHY_TYPE_USB2, and USB_PHY_TYPE_USB3. Would it be acceptable to use > USB_PHY_TYPE_UNDEFINED for the ohci since it is USB 1.1? Or perhaps I > should use the more generic struct phy for that one? > Also, I am not finding any existing data structure to pass the musb set_mode function to the phy in either usb_phy or usb_otg. Setting the mode (host/peripheral/otg) is done in the same PHY register, so it seems like it should be implemented in the new phy driver as well. I guess I could use a generic phy instead and use phy_set_drvdata() to share data between the phy driver and the musb driver. Does this sound like a reasonable thing to do?