linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: spi-devel-general@lists.sourceforge.net,
	Shawn Guo <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Brian Lilly <brian@crystalfontz.com>
Subject: Re: [PATCH 1/2] spi: spidev: Add device tree bindings
Date: Mon, 29 Oct 2012 16:10:24 +0000	[thread overview]
Message-ID: <20121029161023.GC4511@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <508EA013.7050907@free-electrons.com>


[-- Attachment #1.1: Type: text/plain, Size: 1403 bytes --]

On Mon, Oct 29, 2012 at 04:26:11PM +0100, Maxime Ripard wrote:

> Ok, so I guess that leaves us with 2 choices here:

>   * Declare the device in the dt as you would have with any other
>     driver, with its own compatible string, and we add this compatible
>     string to the spidev dt ids array. It allows to use the existing
>     code and thus doesn't require any effort at all, but it will
>     generate a lot of noise for the spidev driver, since all of us will
>     need to add its compatible string to spidev.

>   * Rework the spidev code so that it behaves mostly like i2c-dev, that
>     is you have an instance of it for every device enumerated in the dt,
>     regardless of wether it has a driver loaded or not. If the
>     userspace opens the device file corresponding to a device already
>     attached to a driver, you return EBUSY, and that's it. I guess it
>     would be the cleaner solution, since you only select spidev in
>     configuration, but it definitely requires way more development than
>     the first one.

> What's your views on this?
> Did you have in mind another solution?

I think either solution is good, obviously Grant's more the expert here.
Adding the IDs is obviously simpler and doesn't preclude later doing the
i2c-dev style thing so short term I'd probably add the IDs to get things
going and punt on the difficult stuff for the time being but YMMV.

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2012-10-29 16:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26  8:07 [RESEND][PATCH 0/2] Add spidev to the CFA-10049 Maxime Ripard
     [not found] ` <1351238873-25230-1-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-10-26  8:07   ` [PATCH 1/2] spi: spidev: Add device tree bindings Maxime Ripard
2012-10-27 22:19     ` Mark Brown
     [not found]       ` <20121027221955.GO4564-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-10-29 15:26         ` Maxime Ripard
2012-10-29 16:10           ` Mark Brown [this message]
2012-10-26  8:07   ` [PATCH 2/2] ARM: dts: cfa10049: Add spidev to drive the DAC on SSP3 Maxime Ripard
  -- strict thread matches above, loose matches on Subject: below --
2012-10-18 13:59 [RESEND][PATCH 0/2] Add spidev to the CFA-10049 Maxime Ripard
     [not found] ` <1350568768-4374-1-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-10-18 13:59   ` [PATCH 1/2] spi: spidev: Add device tree bindings Maxime Ripard
     [not found]     ` <1350568768-4374-2-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-10-19  8:28       ` Shawn Guo
2012-09-28 12:50 [PATCH 0/2] Add spidev to the CFA-10049 Maxime Ripard
     [not found] ` <1348836616-29783-1-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-09-28 12:50   ` [PATCH 1/2] spi: spidev: Add device tree bindings Maxime Ripard

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=20121029161023.GC4511@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=brian@crystalfontz.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=shawn.guo@linaro.org \
    --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).