The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: David Brownell <david-b@pacbell.net>
Cc: Tony Jones <tonyj@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: [patch 09/14] Convert from class_device to device for SPI
Date: Sun, 26 Aug 2007 22:20:54 +0200	[thread overview]
Message-ID: <1188159654.4445.73.camel@lov.localdomain> (raw)
In-Reply-To: <200708261254.14641.david-b@pacbell.net>

On Sun, 2007-08-26 at 12:54 -0700, David Brownell wrote:
> On Thursday 23 August 2007, Kay Sievers wrote:
> > On Thu, 2007-08-23 at 14:03 -0700, David Brownell wrote:
> > > On Tuesday 21 August 2007, Tony Jones wrote:
> > > > I believe this is the necessary documentation changes.
> > > 
> > > Thanks.  I have an update, plus updates for the mmc_spi
> > > driver (now in MM) which you didn't update.
> > > 
> > > By the way, it's worth noting an incompatibility introduced
> > > through these conversions and CONFIG_SYSFS_DEPRECATED=n:
> > > 
> > >  ...
> > >  
> > >  - now, /sys/class/spi_master/spi2 is a symlink to
> > >    .../controller/spi_master (with DEPRECATED=n).
> > 
> > Ugh! Are you sure, that is doesn't point to:
> >   .../controller/spi_master/spi2/ ?
> 
> Turns out that it does -- once you tell Minicom to change its
> bogus default of discarding data rather than line wrapping!
> Which means there can still be multiple class instances that
> get coupled to a given physical device; no lossage there.

Great.

> Sigh.  It's hard sometimes to remember to apply all the
> right bug workarounds, when some of them are in userspace.

Yeah, it's a mess, I totally know that feeling. :)

> Still, that's a needless incompatibility.  Why isn't that
> pointing to a .../controller/spi_master:spi2 directory,
> so that the pathnames don't change (only symlink polarity)?

The directory name is the kernel's kobject name used by userspace, we
can't change the name. Most of these names are used to name the device
nodes.

Also the link would just point to the direct child directory with the
same name, which would be kind of strange. We could add them back, if
really needed, but they didn't exist for long, so we think it's fine to
get rid of them when !DEPRECATED is used.

With the hierarchy of class devices in recently changed subsytems, it
would be totally inconsistent to make a difference between a class
device parent/child (no "device" link, no <class>:<devname> link) and a
bus device parent/child (links). For userspace, there is no interesting
difference between class or bus device parents.

These links are really only needed with the !DEPRECATED mode, with the
directories all spread around in different places, and you need to use
these magic links to reconstruct the virtual device tree from it. They
are the counterpart of the "device" link which is also not too useful in
!DEPRECATED mode, because it's always just the next parent device.

With !DEPRECATED we get a big unified device tree with all devices in
_one_ hierarchy. All Child/parent relationships can be read by just
walking the up and down the tree. All the classification directories
(bus/, class/, block/) will only be lists of symlinks pointing to a
specific entry point in the unified tree. From there you can walk upward
or downwards the path, without any magic rules.

Thanks,
Kay


  reply	other threads:[~2007-08-26 20:17 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 22:48 [patch 00/14] More patches to convert from struct class_device to struct device tonyj
2007-08-20 22:48 ` [patch 01/14] Convert from class_device to device for block/paride tonyj
2007-08-20 22:48 ` [patch 02/14] Convert from class_device to device for block/pktcdvd tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-20 22:48 ` [patch 03/14] Convert from class_device to device for block/aoechr tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-20 22:48 ` [patch 04/14] Convert from class_device to device for drivers/macintosh tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-24  5:04   ` Benjamin Herrenschmidt
2007-08-20 22:48 ` [patch 05/14] Convert from class_device to device for cosa sync driver tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-22  9:49     ` Jan Kasprzak
2007-08-20 22:48 ` [patch 06/14] Convert from class_device to device for MTD/mtdchar tonyj
2007-08-21 15:00   ` Tony Jones
2007-08-20 22:48 ` [patch 07/14] Convert from class_device to device for IDE/ide-tape tonyj
2007-08-21 15:00   ` Tony Jones
2007-08-20 22:48 ` [patch 08/14] Convert from class_device to device for DMA engine tonyj
2007-08-21 15:01   ` Tony Jones
2007-08-20 22:48 ` [patch 09/14] Convert from class_device to device for SPI tonyj
2007-08-21 15:01   ` Tony Jones
2007-08-21 18:28     ` David Brownell
2007-08-21 18:48       ` Tony Jones
2007-08-22  3:05       ` Tony Jones
2007-08-23 21:03         ` David Brownell
2007-08-23 22:12           ` Kay Sievers
2007-08-26 19:54             ` David Brownell
2007-08-26 20:20               ` Kay Sievers [this message]
2007-08-20 22:48 ` [patch 10/14] Convert from class_device to device for USB core tonyj
2007-08-21 15:01   ` Tony Jones
2007-08-20 22:48 ` [patch 11/14] Convert from class_device to device for USB host tonyj
2007-08-21 18:06   ` Tony Jones
2007-08-25  0:15   ` Greg KH
2007-08-20 22:48 ` [patch 12/14] Convert from class_device to device for TI flash media tonyj
2007-08-21 15:02   ` Tony Jones
2007-08-20 22:48 ` [patch 13/14] Convert from class_device to device for UCB1x00 tonyj
2007-08-21 15:02   ` Tony Jones
2007-08-20 22:48 ` [patch 14/14] Convert from class_device to device for ISDN capi tonyj
2007-08-21  9:14   ` Karsten Keil
2007-08-21 14:56     ` Tony Jones

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=1188159654.4445.73.camel@lov.localdomain \
    --to=kay.sievers@vrfy.org \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tonyj@suse.de \
    /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