From mboxrd@z Thu Jan 1 00:00:00 1970 From: swarren@wwwdotorg.org (Stephen Warren) Date: Tue, 29 Jan 2013 10:11:31 -0700 Subject: [PATCH, RFC] usb: add devicetree helpers for determining dr_mode and phy_type In-Reply-To: <1359458548-25071-1-git-send-email-s.hauer@pengutronix.de> References: <1359458548-25071-1-git-send-email-s.hauer@pengutronix.de> Message-ID: <510802C3.7090803@wwwdotorg.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 01/29/2013 04:22 AM, Sascha Hauer wrote: > From: Michael Grzeschik > > This adds two little devicetree helper functions for determining the > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from > the devicetree. > > Signed-off-by: Michael Grzeschik > Signed-off-by: Marc Kleine-Budde > --- > > The properties and their values have been taken from the fsl-mph-dr driver. > This binding is also documented (though currently not used) for the tegra > ehci driver (Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt). > This is a first attempt to parse these bindings at a common place so that > others can make use of it. > > Basically I want to know whether this binding is recommended for new drivers > since normally the devicetree uses '-' instead of '_', and maybe there are > other problems with it. It's certainly typical to use - not _ for freshly defined properties. However, since this property already exists and is in-use, I don't think there's any choice but to maintain its current definition. The code looked fine to me. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH, RFC] usb: add devicetree helpers for determining dr_mode and phy_type Date: Tue, 29 Jan 2013 10:11:31 -0700 Message-ID: <510802C3.7090803@wwwdotorg.org> References: <1359458548-25071-1-git-send-email-s.hauer@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1359458548-25071-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sascha Hauer Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michael Grzeschik , alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Marc Kleine-Budde , kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, Simon Glass , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On 01/29/2013 04:22 AM, Sascha Hauer wrote: > From: Michael Grzeschik > > This adds two little devicetree helper functions for determining the > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from > the devicetree. > > Signed-off-by: Michael Grzeschik > Signed-off-by: Marc Kleine-Budde > --- > > The properties and their values have been taken from the fsl-mph-dr driver. > This binding is also documented (though currently not used) for the tegra > ehci driver (Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt). > This is a first attempt to parse these bindings at a common place so that > others can make use of it. > > Basically I want to know whether this binding is recommended for new drivers > since normally the devicetree uses '-' instead of '_', and maybe there are > other problems with it. It's certainly typical to use - not _ for freshly defined properties. However, since this property already exists and is in-use, I don't think there's any choice but to maintain its current definition. The code looked fine to me. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html