linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Abraham <thomas.abraham@linaro.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Olof Johansson <olof@lixom.net>,
	spi-devel-general@lists.sourceforge.net,
	devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, rob.herring@calxeda.com,
	grant.likely@secretlab.ca, kgene.kim@samsung.com,
	jaswinder.singh@linaro.org
Subject: Re: [PATCH v2 4/6] ARM: Samsung: Modify s3c64xx_spi{0|1|2}_set_platdata function
Date: Sun, 3 Jun 2012 14:59:50 +0530	[thread overview]
Message-ID: <CAJuYYwS6xgTQD=azEc_020fBCvEzpu5bF6ANvnu1_iZfGptP-Q@mail.gmail.com> (raw)
In-Reply-To: <20120601123902.GL24139@opensource.wolfsonmicro.com>

On 1 June 2012 18:09, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Fri, Jun 01, 2012 at 10:47:44AM +0800, Thomas Abraham wrote:
>
>> 1. There is one instance of 'struct platform_device' for each of the
>> spi controller instances (0/1/2) named "s3c64xx-spi" (in
>> arch/arm/plat-samsung/devs.c).
>
> Right, which looks rather like it is specific to s3c64xx at least given
> the naming...  there aren't any current in tree users, though I do have
> one out of tree user on s3c6410.  If this is supposed to be used on the
> later SoCs too then I guess it ought to be renamed anyway since what's
> there looks wrong.

The spi platform device is not really s3c64xx specific. It can be
reused on all other Samsung SoC's as well, but there are no users of
this except for s3c64xx SoC. The resources for this platform devices
are statically bound for a SoC during compile time. I would not
consider the existing spi platform device instance name
(s3c64xx_device_spi0) or the .name (s3c64xx-spi) to be factor in
reusing it on other Samsung SoC's.

>
>> 5. If point 4 is not correct, the other option is to create a separate
>> instances of 'struct platform_device' for each of the s3c, s5p and
>> Exynos4/5 SoC's. Is this the correct way, and if yes, could you please
>> help me understand the issues in setting the name of the platform
>> device at runtime.
>
> That would seem less painful to me.  The big problem I've found is with
> things like matching clocks up where if you look at the device that's
> being registered it has one name but at runtime it has another name, it
> makes everything much harder to follow.  There was one of the devices
> where the .id also ended up getting changed which created even more
> confusion.

Yes, I agree with you that changing device names at runtime can be
confusing at times. Probably, additional comments to indicate possible
runtime changes in device names could be useful.

For now, I will avoid runtime setting of platform device name as you
have suggested. Thank your for providing clarification for my
questions.

Regards,
Thomas.

  reply	other threads:[~2012-06-03  9:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  9:33 [PATCH v2 0/6] spi: s3c64xx: add support for device tree Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 1/6] spi: s3c64xx: remove unused S3C64XX_SPI_ST_TRLCNTZ macro Thomas Abraham
2012-05-20  5:03   ` Grant Likely
2012-05-18  9:33 ` [PATCH v2 2/6] spi: s3c64xx: move controller information into driver data Thomas Abraham
2012-05-20  5:06   ` Grant Likely
2012-05-24  7:18   ` Kukjin Kim
2012-05-24  8:43     ` Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 3/6] ARM: Samsung: Remove pdev pointer paremeter from spi gpio setup functions Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 4/6] ARM: Samsung: Modify s3c64xx_spi{0|1|2}_set_platdata function Thomas Abraham
2012-05-20  9:21   ` Mark Brown
2012-05-30  7:28     ` Olof Johansson
2012-05-30  7:47       ` Thomas Abraham
2012-05-30  9:34       ` Mark Brown
2012-05-30 10:05         ` Thomas Abraham
2012-05-30 10:13           ` Mark Brown
     [not found]             ` <20120530101326.GF9947-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-05-31  2:05               ` Thomas Abraham
2012-05-31 11:36                 ` Mark Brown
     [not found]                   ` <20120531113659.GB2666-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-01  2:47                     ` Thomas Abraham
2012-06-01 12:39                       ` Mark Brown
2012-06-03  9:29                         ` Thomas Abraham [this message]
2012-05-18  9:33 ` [PATCH v2 5/6] spi: s3c64xx: Remove the 'set_level' callback from controller data Thomas Abraham
2012-05-20  5:07   ` Grant Likely
2012-05-18  9:33 ` [PATCH v2 6/6] spi: s3c64xx: add device tree support Thomas Abraham
2012-05-20  5:10   ` Grant Likely
2012-05-20  5:02 ` [PATCH v2 0/6] spi: s3c64xx: add support for device tree Grant Likely

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='CAJuYYwS6xgTQD=azEc_020fBCvEzpu5bF6ANvnu1_iZfGptP-Q@mail.gmail.com' \
    --to=thomas.abraham@linaro.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jaswinder.singh@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=rob.herring@calxeda.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).