lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 4 May 2014 23:17:21 -0500
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Mark Brown <broonie@...nel.org>,
	linux-spi <linux-spi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Subject: Re: [PATCH] spi: Force the registration of the spidev devices

Hi Geert

On Fri, May 02, 2014 at 01:28:26AM +0200, Geert Uytterhoeven wrote:
> Hi Maxime,
> 
> On Fri, May 2, 2014 at 12:36 AM, Maxime Ripard
> <maxime.ripard@...e-electrons.com> wrote:
> > But it actually doesn't work in a case where you can't really predict
> > what is on the other side of the bus. Either because, on the board
> > you're using the pins are exposed and it's pretty much up to the user
> > to know what to put on it. That could be handled by DT overlays
> > though.
> >
> > What never works is where the device on the other side is so generic
> > that you really can't tell what it does. Think of a microcontroller
> > that would behave as a SPI slave. It's behaviour and what it does is
> > pretty much dependant of what we flashed on it, and suddenly the
> > compatible string is not the proper reprensentation anymore.
> 
> So you will (hopefully soon) use overlay DT to change the DTS to match what's
> connected?

Not really, because you can't declare a spidev device in the DT.

> And then you want spidev to bind to it. Would it help if DT offered a feature
> to add a compatible entry to a driver at runtime, cfr.
> /sys/bus/pci/drivers/.../new_id on PCI?

The thing is, in the core SPI bus, devices are only instiated (in the
DT case), by parsing the DT. So, to bind a device to a new driver, it
has to exist in the first place, and it won't exist, because there
won't be any node in the DT for this device. But since DT is
unsuitable for such a device, you go back to where we were initially.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ