All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: addy ke <addy.ke@rock-chips.com>
Cc: heiko@sntech.de, grant.likely@linaro.org, robh+dt@kernel.org,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	olof@lixom.net, hj@rock-chips.com, kever.yang@rock-chips.com,
	xjq@rock-chips.com, huangtao@rock-chips.com, zyw@rock-chips.com,
	yzq@rock-chips.com, zhenfu.fang@rock-chips.com,
	cf@rock-chips.com, zhangqing@rock-chips.com,
	wei.luo@rock-chips.com
Subject: Re: [PATCH v2 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI
Date: Mon, 7 Jul 2014 08:16:45 +0100	[thread overview]
Message-ID: <20140707071645.GA30458@sirena.org.uk> (raw)
In-Reply-To: <53B9FB1C.7080008@rock-chips.com>

[-- Attachment #1: Type: text/plain, Size: 1645 bytes --]

On Mon, Jul 07, 2014 at 09:42:52AM +0800, addy ke wrote:

> > The driver shouldn't be doing this, if it needs a delay it needs to
> > implement it itself.  delay_usecs can be set by devices if they need a
> > delay between transfers, it should be in addition to the time taken for
> > the transfer to complete.

> > Please send a followup patch fixing this.

> Are the following modifications reasonable?

Yes, that looks sensible.

> >> +static const struct of_device_id rockchip_spi_dt_match[] = {
> >> +	{ .compatible = "rockchip,rk3066-spi", },
> >> +	{ },
> >> +};
> >> +MODULE_DEVICE_TABLE(of, rockchip_spi_dt_match);

> > Your DT binding defined some additional compatible strings, please add
> > those to the driver.

> So which is better to describe DT binding for rockchip spi driver as follow:

> 2. Add "rockchip,rk3066-spi", "rockchip,rk3066-spi", "rockchip,rk3066-spi" for each soc:
> 
> In Documentation/devicetree/bindings/spi/spi-rockchip.txt
> - compatible: should be one of the following.
>     "rockchip,rk3066-spi" for rk3066.
>     "rockchip,rk3188-spi", "rockchip,rk3066-spi" for rk3188.
>     "rockchip,rk3288-spi", "rockchip,rk3066-spi" for rk3288.
> 
> In drivers/spi/spi-rockchip.c
> static const struct of_device_id rockchip_spi_dt_match[] = {
>         { .compatible = "rockchip,rk3066-spi", },
>         { .compatible = "rockchip,rk3188-spi", },
>         { .compatible = "rockchip,rk3288-spi", },
>         { },
> };

This is better - that way if we need to care about the differences then
we already have device trees which have the specific compatible strings
in them.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: addy ke <addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org,
	hj-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	xjq-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	yzq-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	zhenfu.fang-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	wei.luo-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Subject: Re: [PATCH v2 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI
Date: Mon, 7 Jul 2014 08:16:45 +0100	[thread overview]
Message-ID: <20140707071645.GA30458@sirena.org.uk> (raw)
In-Reply-To: <53B9FB1C.7080008-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1645 bytes --]

On Mon, Jul 07, 2014 at 09:42:52AM +0800, addy ke wrote:

> > The driver shouldn't be doing this, if it needs a delay it needs to
> > implement it itself.  delay_usecs can be set by devices if they need a
> > delay between transfers, it should be in addition to the time taken for
> > the transfer to complete.

> > Please send a followup patch fixing this.

> Are the following modifications reasonable?

Yes, that looks sensible.

> >> +static const struct of_device_id rockchip_spi_dt_match[] = {
> >> +	{ .compatible = "rockchip,rk3066-spi", },
> >> +	{ },
> >> +};
> >> +MODULE_DEVICE_TABLE(of, rockchip_spi_dt_match);

> > Your DT binding defined some additional compatible strings, please add
> > those to the driver.

> So which is better to describe DT binding for rockchip spi driver as follow:

> 2. Add "rockchip,rk3066-spi", "rockchip,rk3066-spi", "rockchip,rk3066-spi" for each soc:
> 
> In Documentation/devicetree/bindings/spi/spi-rockchip.txt
> - compatible: should be one of the following.
>     "rockchip,rk3066-spi" for rk3066.
>     "rockchip,rk3188-spi", "rockchip,rk3066-spi" for rk3188.
>     "rockchip,rk3288-spi", "rockchip,rk3066-spi" for rk3288.
> 
> In drivers/spi/spi-rockchip.c
> static const struct of_device_id rockchip_spi_dt_match[] = {
>         { .compatible = "rockchip,rk3066-spi", },
>         { .compatible = "rockchip,rk3188-spi", },
>         { .compatible = "rockchip,rk3288-spi", },
>         { },
> };

This is better - that way if we need to care about the differences then
we already have device trees which have the specific compatible strings
in them.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI
Date: Mon, 7 Jul 2014 08:16:45 +0100	[thread overview]
Message-ID: <20140707071645.GA30458@sirena.org.uk> (raw)
In-Reply-To: <53B9FB1C.7080008@rock-chips.com>

On Mon, Jul 07, 2014 at 09:42:52AM +0800, addy ke wrote:

> > The driver shouldn't be doing this, if it needs a delay it needs to
> > implement it itself.  delay_usecs can be set by devices if they need a
> > delay between transfers, it should be in addition to the time taken for
> > the transfer to complete.

> > Please send a followup patch fixing this.

> Are the following modifications reasonable?

Yes, that looks sensible.

> >> +static const struct of_device_id rockchip_spi_dt_match[] = {
> >> +	{ .compatible = "rockchip,rk3066-spi", },
> >> +	{ },
> >> +};
> >> +MODULE_DEVICE_TABLE(of, rockchip_spi_dt_match);

> > Your DT binding defined some additional compatible strings, please add
> > those to the driver.

> So which is better to describe DT binding for rockchip spi driver as follow:

> 2. Add "rockchip,rk3066-spi", "rockchip,rk3066-spi", "rockchip,rk3066-spi" for each soc:
> 
> In Documentation/devicetree/bindings/spi/spi-rockchip.txt
> - compatible: should be one of the following.
>     "rockchip,rk3066-spi" for rk3066.
>     "rockchip,rk3188-spi", "rockchip,rk3066-spi" for rk3188.
>     "rockchip,rk3288-spi", "rockchip,rk3066-spi" for rk3288.
> 
> In drivers/spi/spi-rockchip.c
> static const struct of_device_id rockchip_spi_dt_match[] = {
>         { .compatible = "rockchip,rk3066-spi", },
>         { .compatible = "rockchip,rk3188-spi", },
>         { .compatible = "rockchip,rk3288-spi", },
>         { },
> };

This is better - that way if we need to care about the differences then
we already have device trees which have the specific compatible strings
in them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140707/c06dbf4a/attachment.sig>

  parent reply	other threads:[~2014-07-07  7:19 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  3:58 [PATCH 0/2] add rockchip spi drive addy ke
2014-06-24  3:58 ` addy ke
2014-06-24  3:58 ` addy ke
2014-06-24  3:58 ` [PATCH 1/2] documentation: add rockchip spi documentation addy ke
2014-06-24  3:58   ` addy ke
2014-06-24  3:58   ` addy ke
2014-06-24 10:18   ` Mark Rutland
2014-06-24 10:18     ` Mark Rutland
2014-06-24 10:18     ` Mark Rutland
2014-06-24 10:32     ` Heiko Stübner
2014-06-24 10:32       ` Heiko Stübner
2014-06-24 10:32       ` Heiko Stübner
2014-06-24 10:47       ` Mark Rutland
2014-06-24 10:47         ` Mark Rutland
2014-06-24 10:47         ` Mark Rutland
2014-06-24 10:33     ` Mark Brown
2014-06-24 10:33       ` Mark Brown
2014-06-24 10:33       ` Mark Brown
2014-07-01  1:02   ` [PATCH v2 " addy ke
2014-07-01  1:02     ` addy ke
2014-07-01  1:02     ` addy ke
2014-06-24  4:07 ` [PATCH 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI addy ke
2014-06-24  4:07   ` addy ke
2014-06-24  4:07   ` addy ke
2014-06-24 10:56   ` Mark Brown
2014-06-24 10:56     ` Mark Brown
2014-06-24 10:56     ` Mark Brown
2014-07-01  1:03   ` [PATCH v2 " addy ke
2014-07-01  1:03     ` addy ke
2014-07-01  1:03     ` addy ke
2014-07-04 18:32     ` Mark Brown
2014-07-04 18:32       ` Mark Brown
2014-07-04 18:32       ` Mark Brown
2014-07-05 18:56       ` Jonas Gorski
2014-07-05 18:56         ` Jonas Gorski
2014-07-05 18:56         ` Jonas Gorski
2014-07-07  1:42       ` addy ke
2014-07-07  1:42         ` addy ke
2014-07-07  1:42         ` addy ke
2014-07-07  7:08         ` Heiko Stübner
2014-07-07  7:08           ` Heiko Stübner
2014-07-07  7:21           ` Mark Brown
2014-07-07  7:21             ` Mark Brown
2014-07-07  7:21             ` Mark Brown
2014-07-07  7:26             ` Heiko Stübner
2014-07-07  7:26               ` Heiko Stübner
2014-07-07  7:26               ` Heiko Stübner
2014-07-07  7:16         ` Mark Brown [this message]
2014-07-07  7:16           ` Mark Brown
2014-07-07  7:16           ` Mark Brown
2014-07-08  1:53     ` [PATCH v3 " Addy Ke
2014-07-08  1:53       ` Addy Ke
2014-07-08  1:53       ` Addy Ke
2014-07-08 14:56       ` Mark Brown
2014-07-08 14:56         ` Mark Brown
2014-07-08 14:56         ` Mark Brown

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=20140707071645.GA30458@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=addy.ke@rock-chips.com \
    --cc=cf@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=heiko@sntech.de \
    --cc=hj@rock-chips.com \
    --cc=huangtao@rock-chips.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=wei.luo@rock-chips.com \
    --cc=xjq@rock-chips.com \
    --cc=yzq@rock-chips.com \
    --cc=zhangqing@rock-chips.com \
    --cc=zhenfu.fang@rock-chips.com \
    --cc=zyw@rock-chips.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.