Devicetree
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: Jingoo Han <jg1.han@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	'Maxime Coquelin' <maxime.coquelin@st.com>,
	'Patrice Chotard' <patrice.chotard@st.com>,
	'Srinivas Kandagatla' <srinivas.kandagatla@gmail.com>,
	devicetree@vger.kernel.org, 'Felipe Balbi' <balbi@ti.com>,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	'Lee Jones' <lee.jones@linaro.org>,
	'Giuseppe Cavallaro' <peppe.cavallaro@st.com>
Subject: Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC
Date: Tue, 22 Jul 2014 10:38:15 +0100	[thread overview]
Message-ID: <20140722093815.GA6817@griffinp-ThinkPad-X1-Carbon-2nd> (raw)
In-Reply-To: <000d01cf99e6$602096b0$2061c410$%han@samsung.com>

Hi Jingoo,

Sorry for the delay in replying. Thanks for reviewing, 
see my comments inline below: -

<snip>
> > +#include <linux/module.h>
> > +#include <linux/kernel.h>
> > +#include <linux/slab.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/ioport.h>
> > +#include <linux/io.h>
> > +#include <linux/of.h>
> > +#include <linux/of_platform.h>
> > +#include <linux/mfd/syscon.h>
> > +#include <linux/delay.h>
> > +#include <linux/regmap.h>
> > +#include <linux/reset.h>
> 
> Would you re-order these headers alphabetically?
> It enhances the readability.

Ok fixed in V3

> > +
> > +	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "reg-glue");
> > +	if (!res)
> > +		return -ENXIO;
> > +
> > +	dwc3_data->glue_base = devm_request_and_ioremap(dev, res);
> 
> Please don't use devm_request_and_ioremap() any more. It was deprecated
> and will be removed from 3.17-rc1.
> 
> Please, use devm_ioremap_resource() instead.

Ok changed over to use devm_ioremap_resource in V3.

> 
> +	dwc3_data->glue_base = devm_ioremap_resource(dev, res);
> +	if (IS_ERR(dwc3_data->glue_base))
> +		return PTR_ERR(dwc3_data->glue_base);
> 
> > +	if (!dwc3_data->glue_base)
> > +		return -EADDRNOTAVAIL;
> > +
<snip>
> > +
> > +static const struct dev_pm_ops st_dwc3_dev_pm_ops = {
> > +	SET_SYSTEM_SLEEP_PM_OPS(st_dwc3_suspend, st_dwc3_resume)
> > +};
> > +
> > +static struct of_device_id st_dwc3_match[] = {
> 
> Please add 'const' as below. This is because all OF functions
> handle of_device_id as const.
> 
> static const struct of_device_id st_dwc3_match[] = {

Ok, fixed in V3

> 
> > +	{ .compatible = "st,stih407-dwc3" },
> > +	{ /* sentinel */ },
> > +};
> > +
> > +MODULE_DEVICE_TABLE(of, st_dwc3_match);
> > +
> > +static struct platform_driver st_dwc3_driver = {
> > +	.probe = st_dwc3_probe,
> > +	.remove = st_dwc3_remove,
> > +	.driver = {
> > +		.name = "usb-st-dwc3",
> > +		.owner = THIS_MODULE,
> > +		.of_match_table = of_match_ptr(st_dwc3_match),
> 
> You already use OF dependency as below. So, of_match_ptr() is
> NOT necessary.
> 
> +config USB_DWC3_ST
> +	tristate "STMicroelectronics Platforms"
> +	depends on ARCH_STI && OF
> 
> Please remove of_match_ptr() as below.
> 
> +		.of_match_table = st_dwc3_match,

Ok fixed in V3

regards,

Peter.

  reply	other threads:[~2014-07-22  9:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05  6:25 [PATCH v2 0/3] Add ST dwc3 glue layer driver Peter Griffin
2014-07-05  6:25 ` [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC Peter Griffin
     [not found]   ` <1404541530-27856-2-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-07 12:46     ` Lee Jones
2014-07-22  9:18       ` Peter Griffin
2014-07-22 10:15         ` Lee Jones
2014-07-22 14:57         ` Felipe Balbi
2014-07-22 15:45           ` Lee Jones
2014-07-22 15:51             ` Felipe Balbi
     [not found]               ` <20140722155117.GF20588-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-07-22 15:56                 ` Lee Jones
2014-07-23 14:33           ` Peter Griffin
2014-08-20 18:24             ` Felipe Balbi
2014-07-07 13:21   ` Jingoo Han
2014-07-22  9:38     ` Peter Griffin [this message]
2014-07-05  6:25 ` [PATCH v2 2/3] ARM: dts: sti: Add st-dwc3 devicetree bindings documentation Peter Griffin
2014-07-07 11:00   ` Lee Jones
2014-07-05  6:25 ` [PATCH v2 3/3] MAINTAINERS: Add dwc3-st.c file to ARCH/STI architecture Peter Griffin
     [not found]   ` <1404541530-27856-4-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-07 10:51     ` Lee Jones
2014-07-08  7:40     ` Maxime Coquelin
     [not found]       ` <53BBA075.9040204-qxv4g6HH51o@public.gmane.org>
2014-07-08  7:53         ` Lee Jones
2014-07-08  9:01           ` Maxime Coquelin
2014-07-10 13:27           ` Felipe Balbi
2014-07-10 13:39             ` Lee Jones
2014-07-10 15:24             ` Peter Griffin

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=20140722093815.GA6817@griffinp-ThinkPad-X1-Carbon-2nd \
    --to=peter.griffin@linaro.org \
    --cc=balbi@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jg1.han@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=maxime.coquelin@st.com \
    --cc=patrice.chotard@st.com \
    --cc=peppe.cavallaro@st.com \
    --cc=srinivas.kandagatla@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox