public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
	linux-spi@vger.kernel.org, Martin Sperl <kernel@martin.sperl.org>,
	Michal Suchanek <hramrach@gmail.com>
Subject: Re: [PATCH] spi: Force the registration of the spidev devices
Date: Wed, 13 May 2015 15:33:31 -0700	[thread overview]
Message-ID: <20150513223331.GA26748@kroah.com> (raw)
In-Reply-To: <20150513192640.GF4004@lukather>

On Wed, May 13, 2015 at 09:26:40PM +0200, Maxime Ripard wrote:
> On Wed, May 13, 2015 at 11:17:36AM -0700, Greg Kroah-Hartman wrote:
> > On Wed, May 13, 2015 at 07:50:34PM +0200, Maxime Ripard wrote:
> > > Hi Greg,
> > > 
> > > On Wed, May 13, 2015 at 08:37:40AM -0700, Greg Kroah-Hartman wrote:
> > > > On Wed, May 13, 2015 at 12:26:04PM +0100, Mark Brown wrote:
> > > > > On Tue, May 12, 2015 at 10:33:24PM +0200, Maxime Ripard wrote:
> > > > > 
> > > > > > While this is nicer than the DT solution because of its accurate hardware
> > > > > > representation, it's still not perfect because you might not have access to the
> > > > > > DT, or you might be driving a completely generic device (such as a
> > > > > > microcontroller) that might be used for something else in a different
> > > > > > context/board.
> > > > > 
> > > > > Greg, you're copied on this because this seems to be a generic problem
> > > > > that should perhaps be solved at a driver model level - having a way to
> > > > > bind userspace access to devices that we don't otherwise have a driver
> > > > > for.  The subsystem could specify the UIO driver to use when no other
> > > > > driver is available.
> > > > 
> > > > That doesn't really work.  I've been talking to the ACPI people about
> > > > this, and the problem is "don't otherwise have a driver for" is an
> > > > impossible thing to prove, as you never know when a driver is going to
> > > > be loaded from userspace.
> > > > 
> > > > You can easily bind drivers to devices today from userspace, why not
> > > > just use the built-in functionality you have today if you "know" that
> > > > there is no driver for this hardware.
> > > 
> > > What we're really after here is that we want to have an spidev
> > > instance when we don't even have a device.
> > 
> > That's crazy, just create a device, things do not work without one.
> 
> Our use case is this one: we want to export spidev files so that "dev
> boards" with a header that allows to plug virtually anything on it
> (Raspberry Pi, Cubieboards, Xplained, and all the likes) without
> having to change the kernel and / or device tree.

You want to do that on a bus that is not self-describing or dynamic?
I too want a pony.  Please go kick the hardware engineer who designed
such a mess, we solved this problem 20+ years ago with "real" busses.

> That would mean that if we plug something to that port, no device will
> be created because the DT itself won't have that device declared in
> the first place.

Because you can't dynamically determine that something was plugged in,
of course.

> This patch is actually doing this: creating a new device for all the
> chipselects that are not in use that will be bound to the spidev
> driver.

I have yet to see a patch...

  reply	other threads:[~2015-05-13 22:33 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 20:33 [PATCH] spi: Force the registration of the spidev devices Maxime Ripard
2015-05-13  9:34 ` [PATCH] spi: Add option to bind spidev to all chipselects Michal Suchanek
2015-05-13 10:16   ` Maxime Ripard
2015-05-13 10:40     ` Michal Suchanek
2015-05-13 11:05   ` Mark Brown
2015-05-13 11:26 ` [PATCH] spi: Force the registration of the spidev devices Mark Brown
2015-05-13 12:35   ` Michal Suchanek
2015-05-13 12:51   ` Maxime Ripard
2015-05-13 14:36     ` Mark Brown
2015-05-13 15:31       ` Michal Suchanek
2015-05-13 17:43         ` Mark Brown
2015-05-13 19:09       ` Maxime Ripard
2015-05-13 19:10     ` Geert Uytterhoeven
2015-05-13 19:41       ` Maxime Ripard
2015-05-13 15:37   ` Greg Kroah-Hartman
2015-05-13 15:52     ` Michal Suchanek
2015-05-13 17:13     ` Mark Brown
2015-05-13 17:20       ` Greg Kroah-Hartman
2015-05-13 17:39         ` Mark Brown
2015-05-13 18:16           ` Greg Kroah-Hartman
2015-05-13 18:32             ` Mark Brown
2015-05-13 18:36               ` Greg Kroah-Hartman
2015-05-13 18:51                 ` Mark Brown
2015-05-13 19:17                   ` Maxime Ripard
2015-05-13 17:50     ` Maxime Ripard
2015-05-13 18:12       ` Mark Brown
2015-05-13 18:17       ` Greg Kroah-Hartman
2015-05-13 19:23         ` Geert Uytterhoeven
2015-05-13 19:26         ` Maxime Ripard
2015-05-13 22:33           ` Greg Kroah-Hartman [this message]
2015-05-14 14:34             ` Mark Brown
2015-05-15  8:09             ` Maxime Ripard
2015-07-15  6:27             ` Lucas De Marchi
  -- strict thread matches above, loose matches on Subject: below --
2014-04-28 17:22 Maxime Ripard
2014-04-29 18:37 ` Mark Brown
2014-04-30 18:06   ` Maxime Ripard
2014-05-01  1:18     ` Mark Brown
2014-05-01 22:36       ` Maxime Ripard
2014-05-01 23:28         ` Geert Uytterhoeven
2014-05-02 16:55           ` Mark Brown
2014-05-05  4:17           ` Maxime Ripard
2014-05-05  7:10             ` Geert Uytterhoeven
2014-05-05 13:57               ` Alexandre Belloni
2014-05-05 14:22                 ` Geert Uytterhoeven
2014-05-05 19:16               ` Mark Brown
2014-05-02 17:40         ` Mark Brown
2014-05-05  4:21           ` Maxime Ripard
2014-05-05 19:17             ` Mark Brown
2014-05-08  2:22               ` 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=20150513223331.GA26748@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=hramrach@gmail.com \
    --cc=kernel@martin.sperl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.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