All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antoine Ténart" <antoine.tenart@free-electrons.com>
To: Peter Chen <peter.chen@freescale.com>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>,
	sebastian.hesselbarth@gmail.com,
	alexandre.belloni@free-electrons.com,
	thomas.petazzoni@free-electrons.com, zmxu@marvell.com,
	jszhang@marvell.com, linux-arm-kernel@lists.infradead.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 07/12] usb: chipidea: add a generic driver
Date: Mon, 30 Jun 2014 15:33:13 +0200	[thread overview]
Message-ID: <20140630133313.GA11880@kwain> (raw)
In-Reply-To: <20140627032506.GA18039@shlinux1.ap.freescale.net>

Peter,

On Fri, Jun 27, 2014 at 11:25:07AM +0800, Peter Chen wrote:
> On Tue, Jun 24, 2014 at 12:35:16PM +0200, Antoine Ténart wrote:
> >  
> >  ifneq ($(CONFIG_OF),)
> >  	obj-$(CONFIG_USB_CHIPIDEA)	+= usbmisc_imx.o ci_hdrc_imx.o
> > +	obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_generic.o
> >  endif
> 
> As a generic driver, you may need to support both dt and non-dt
> solution.

Since the dt is now the best practice and since there is no need (yet)
for a non-dt usage of this driver shouldn't we let anyone needing it
implement it when the time comes?

> > +static int ci_hdrc_generic_probe(struct platform_device *pdev)
> > +{
> > +	struct device *dev = &pdev->dev;
> > +	struct ci_hdrc_generic_priv *priv;
> > +	struct ci_hdrc_platform_data ci_pdata = {
> > +		.name		= "ci_hdrc",
> 
> How about this using dev_name(&pdev->dev) for name?

Yes, why not. I don't have a strong preference.

> > +
> > +clk_err:
> > +	clk_disable_unprepare(priv->clk);
> 
> You may need to add "if (!IS_ERR(priv->clk))"

Right! I'll update this.

> > +
> > +static const struct of_device_id ci_hdrc_generic_of_match[] = {
> > +	{ .compatible = "chipidea-usb" },
> > +	{ }
> > +};
> 
> Even as a generic driver, you can also use your own compatible string.

Well, there is nothing specific about the Berlin CI. Some subsystems
use the 'generic' keyword in these cases. Do you see a particular reason
I should use some Berlin related compatible here?


Thanks for the review!

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: antoine.tenart@free-electrons.com (Antoine Ténart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 07/12] usb: chipidea: add a generic driver
Date: Mon, 30 Jun 2014 15:33:13 +0200	[thread overview]
Message-ID: <20140630133313.GA11880@kwain> (raw)
In-Reply-To: <20140627032506.GA18039@shlinux1.ap.freescale.net>

Peter,

On Fri, Jun 27, 2014 at 11:25:07AM +0800, Peter Chen wrote:
> On Tue, Jun 24, 2014 at 12:35:16PM +0200, Antoine T?nart wrote:
> >  
> >  ifneq ($(CONFIG_OF),)
> >  	obj-$(CONFIG_USB_CHIPIDEA)	+= usbmisc_imx.o ci_hdrc_imx.o
> > +	obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_generic.o
> >  endif
> 
> As a generic driver, you may need to support both dt and non-dt
> solution.

Since the dt is now the best practice and since there is no need (yet)
for a non-dt usage of this driver shouldn't we let anyone needing it
implement it when the time comes?

> > +static int ci_hdrc_generic_probe(struct platform_device *pdev)
> > +{
> > +	struct device *dev = &pdev->dev;
> > +	struct ci_hdrc_generic_priv *priv;
> > +	struct ci_hdrc_platform_data ci_pdata = {
> > +		.name		= "ci_hdrc",
> 
> How about this using dev_name(&pdev->dev) for name?

Yes, why not. I don't have a strong preference.

> > +
> > +clk_err:
> > +	clk_disable_unprepare(priv->clk);
> 
> You may need to add "if (!IS_ERR(priv->clk))"

Right! I'll update this.

> > +
> > +static const struct of_device_id ci_hdrc_generic_of_match[] = {
> > +	{ .compatible = "chipidea-usb" },
> > +	{ }
> > +};
> 
> Even as a generic driver, you can also use your own compatible string.

Well, there is nothing specific about the Berlin CI. Some subsystems
use the 'generic' keyword in these cases. Do you see a particular reason
I should use some Berlin related compatible here?


Thanks for the review!

Antoine

-- 
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2014-06-30 13:45 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 10:35 [PATCH v2 00/12] ARM: berlin: USB support Antoine Ténart
2014-06-24 10:35 ` Antoine Ténart
2014-06-24 10:35 ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 01/12] reset: add the Berlin reset controller driver Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 11:13   ` Philipp Zabel
2014-06-24 11:13     ` Philipp Zabel
2014-06-24 12:05     ` Antoine Ténart
2014-06-24 12:05       ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 02/12] Documentation: bindings: add reset bindings docs for Marvell Berlin SoCs Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 11:14   ` Philipp Zabel
2014-06-24 11:14     ` Philipp Zabel
2014-06-24 11:14     ` Philipp Zabel
2014-06-24 10:35 ` [PATCH v2 03/12] ARM: Berlin: select the reset controller Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 04/12] ARM: dts: berlin: add a required reset property in the chip controller node Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 11:14   ` Philipp Zabel
2014-06-24 11:14     ` Philipp Zabel
2014-06-24 11:14     ` Philipp Zabel
2014-06-24 10:35 ` [PATCH v2 05/12] usb: phy: add the Berlin USB PHY driver Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-27 15:56   ` Felipe Balbi
2014-06-27 15:56     ` Felipe Balbi
2014-06-27 16:05     ` Antoine Ténart
2014-06-27 16:05       ` Antoine Ténart
2014-06-27 23:04       ` Felipe Balbi
2014-06-27 23:04         ` Felipe Balbi
2014-06-30 14:52         ` Antoine Ténart
2014-06-30 14:52           ` Antoine Ténart
2014-06-30 18:34           ` Felipe Balbi
2014-06-30 18:34             ` Felipe Balbi
2014-06-24 10:35 ` [PATCH v2 06/12] Documentation: bindings: add doc for the Berlin USB PHY Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 07/12] usb: chipidea: add a generic driver Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:51   ` Jingoo Han
2014-06-24 10:51     ` Jingoo Han
2014-06-30 13:39     ` Antoine Ténart
2014-06-30 13:39       ` Antoine Ténart
2014-06-27  3:25   ` Peter Chen
2014-06-27  3:25     ` Peter Chen
2014-06-27  3:41     ` Peter Chen
2014-06-27  3:41       ` Peter Chen
2014-06-30 13:33     ` Antoine Ténart [this message]
2014-06-30 13:33       ` Antoine Ténart
2014-07-01  0:21       ` Peter Chen
2014-07-01  0:21         ` Peter Chen
2014-07-01  7:24         ` Antoine Ténart
2014-07-01  7:24           ` Antoine Ténart
2014-07-01  8:55         ` Sebastian Hesselbarth
2014-07-01  8:55           ` Sebastian Hesselbarth
2014-07-01  8:30           ` Peter Chen
2014-07-01  8:30             ` Peter Chen
2014-07-01 10:42             ` Alexandre Belloni
2014-07-01 10:42               ` Alexandre Belloni
2014-07-01 15:18               ` Sergei Shtylyov
2014-07-01 15:18                 ` Sergei Shtylyov
2014-07-02  1:10                 ` Peter Chen
2014-07-02  1:10                   ` Peter Chen
2014-07-15 15:22                   ` Antoine Ténart
2014-07-15 15:22                     ` Antoine Ténart
2014-07-16  0:32                     ` Peter Chen
2014-07-16  0:32                       ` Peter Chen
2014-07-03  2:47   ` punnaiah choudary kalluri
2014-07-03  2:47     ` punnaiah choudary kalluri
2014-07-15 15:24     ` Antoine Ténart
2014-07-15 15:24       ` Antoine Ténart
2014-07-16  0:44       ` Peter Chen
2014-07-16  0:44         ` Peter Chen
2014-06-24 10:35 ` [PATCH v2 08/12] Documentation: bindings: add doc for the generic ChipIdea USB driver Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 09/12] ARM: dts: berlin: add BG2Q nodes for USB support Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 10/12] ARM: dts: Berlin: enable USB on the BG2Q DMP Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 11/12] ARM: dts: berlin: add BG2CD nodes for USB support Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart
2014-06-24 10:35 ` [PATCH v2 12/12] ARM: dts: berlin: enable USB on the Google Chromecast Antoine Ténart
2014-06-24 10:35   ` Antoine Ténart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140630133313.GA11880@kwain \
    --to=antoine.tenart@free-electrons.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=jszhang@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@freescale.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=zmxu@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.