Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446608

Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves.

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves.
Date 2016-07-19 19:30 +0200
Message-ID <rWH0d-6Rp-9@gated-at.bofh.it> (permalink)
References (1 earlier) <rWpmF-3Qw-5@gated-at.bofh.it> <rWpPH-4he-11@gated-at.bofh.it> <rWBea-3l1-21@gated-at.bofh.it> <rWCDf-44x-11@gated-at.bofh.it> <rWFhM-5LH-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Jul 19, 2016 at 05:32:24PM +0200, Michal Suchanek wrote:
> On 19 July 2016 at 14:44, Mark Brown <broonie@kernel.org> wrote:

> >> -       status = register_chrdev(SPIDEV_MAJOR, "spi", &spidev_fops);
> >> +       status = register_chrdev(SPIDEV_MAJOR, "spidev", &spidev_fops);

> > also looks like a needless ABI change

> ABI change to what?

> The spidev ABI should be the IOCTLs on /dev/spidev*. These are preserved.

> What parts of the kernel or userspace should depend on spidev
> devices belonging to class spi?

It's a string that's exposed to userspace (via /proc/devices if nothing
else).

> > If userspace is managing to figure out how to control the device then
> > providing a description of the hardware is clearly within the bounds of
> > possibility and there is no need to fake anything.

> However. maintaining the hardware description in multiple places is
> redundant and error-prone. Since the userspace somehow managed to
> figure it out on legacy kernels without devicetree it does not need
> the information in devicetree. Users of such software will not want the
> hardware description in devicetree and if forced to provide it will stub it out.

Userspace is just as capable of looking at the DT as anything else, I'd
expect that where this is a viable way of deploying things people would
be writing udev/systemd magic to fire up userspace drivers automatically
when they see suitable hardware.  The only way this has ever worked in
the past has been with system specific hacks which lead to fragile,
non-portable userpaces that are hard to upgrade.  If we're trying to say
this is an interface that's there for all devices then we shouldn't be
defining it in a way that makes it difficult to automatically configure.

> Also world is not all devicetree so userspace applications should be free
> to consult devicetree information if present or use whatever other means
> at their disposal to determine what hardware they are dealing with.
> When portability is a concern consulting devicetree may be a secondary
> source at best.

ACPI has similar facilities (it's got a direct translation of DT in it
these days so most things with a DT binding also have an ACPI one for
free).

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] Spidev usability patchset update Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200
  [PATCH v3 2/3] spi: of: allow instantiating slaves without a driver Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200
    Re: [PATCH v3 2/3] spi: of: allow instantiating slaves without a  driver Mark Brown <broonie@kernel.org> - 2016-07-19 01:10 +0200
      Re: [PATCH v3 2/3] spi: of: allow instantiating slaves without a driver Michal Suchanek <hramrach@gmail.com> - 2016-07-19 10:40 +0200
        Re: [PATCH v3 2/3] spi: of: allow instantiating slaves without a  driver Mark Brown <broonie@kernel.org> - 2016-07-19 13:00 +0200
  [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200
    Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi  slaves. Mark Brown <broonie@kernel.org> - 2016-07-19 01:10 +0200
      Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 13:20 +0200
        Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi  slaves. Mark Brown <broonie@kernel.org> - 2016-07-19 14:50 +0200
          Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 17:40 +0200
            Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi  slaves. Mark Brown <broonie@kernel.org> - 2016-07-19 19:30 +0200
              Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 20:40 +0200
    Re: [lkp] [PATCH v3 1/3] spi: spidev: create spidev device for all  spi slaves. Fengguang Wu <fengguang.wu@intel.com> - 2016-07-20 09:20 +0200
  [PATCH v3 3/3] spi: core: allow creating devices without spi-max-frequency Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200

csiph-web