public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jamie Iles <jamie@jamieiles.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Grant Likely <grant.likely@secretlab.ca>,
	Stephen Warren <swarren@nvidia.com>,
	Russell King <linux@arm.linux.org.uk>,
	Joe Perches <joe@perches.com>,
	Linaro Dev <linaro-dev@lists.linaro.org>,
	Lee Jones <lee.jones@linaro.org>, Greg KH <greg@kroah.com>
Subject: Re: [PATCH 1/4 v4] drivers: create a pin control subsystem
Date: Fri, 19 Aug 2011 16:36:28 +0200	[thread overview]
Message-ID: <201108191636.29161.arnd@arndb.de> (raw)
In-Reply-To: <CACRpkdZhg_1WM37uqT1PNmpUjWS_groWJmNnR4SBjqJ6LFQQWQ@mail.gmail.com>

On Friday 19 August 2011, Linus Walleij wrote:
> On Fri, Aug 19, 2011 at 12:48 PM, Jamie Iles <jamie@jamieiles.com> wrote:
> 
> >> +static struct class pinctrl_class = {
> >> +     .name = "pinctrl",
> >> +     .dev_release = pinctrl_dev_release,
> >> +     .dev_attrs = pinctrl_dev_attrs,
> >> +};
> >
> > Greg K-H has mentioned in the past that class is now deprecated for new
> > use and that a bus_type should be used instead.
> 
> Can you provide a reference with some detail?
> The pin control devices are usually aleady on a bus like the
> platform_bus or amba_bus or i2c_bus, then they register a
> class device in this case.
> 
> The kerneldoc documentation says
> "A bus is a channel between the processor and one or more devices."
> 
> This isn't the case here.
> 
> Anyhthing that help me understand this is appreciated, Arnd?

Taking Greg on Cc as well.

The main difference between a normal device and a class device is
that one is linked from /sys/bus/*/devices/* and the other is linked
from /sys/class/*/*. However, they both live in /sys/devices/.../*
as directories.

I always liked the separation between the two, although there are
a few cases where there is a grey area (e.g. /sys/bus/hid or
/sys/class/mmc_host) and the abstraction doesn't really fit.

IIRC Greg would prefer now to never have had the distinction
and wants to make all future uses use a bus_type.

	Arnd

  parent reply	other threads:[~2011-08-19 14:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19  9:53 [PATCH 1/4 v4] drivers: create a pin control subsystem Linus Walleij
2011-08-19 10:48 ` Jamie Iles
2011-08-19 14:04   ` Linus Walleij
2011-08-19 14:26     ` Jamie Iles
2011-08-21 14:24       ` Jamie Iles
2011-08-22 12:38         ` Linus Walleij
2011-08-22 12:54           ` Jamie Iles
2011-08-19 14:36     ` Arnd Bergmann [this message]
2011-08-19 16:52       ` Greg KH
2011-08-22 12:29         ` Linus Walleij
2011-08-21 14:53 ` Barry Song
2011-08-24  6:24 ` Barry Song
2011-08-24  7:41   ` Linus Walleij
2011-08-24 18:29 ` Stephen Warren
2011-08-25 10:12   ` Linus Walleij
2011-08-25 11:04     ` Sascha Hauer
2011-08-25 11:58       ` Linus Walleij
2011-08-25 12:07         ` Sascha Hauer
2011-08-25 15:12     ` David Brown
2011-08-25 18:14       ` Gregory Bean
2011-08-25 19:13     ` Stephen Warren
2011-08-26  8:35       ` Linus Walleij
2011-08-26 17:33         ` Stephen Warren
2011-08-29  8:40           ` Linus Walleij
2011-08-26  3:12 ` Barry Song
2011-08-26  8:36   ` Linus Walleij
2011-09-02  7:02 ` Stijn Devriendt
2011-09-02  7:57   ` Linus Walleij

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=201108191636.29161.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=grant.likely@secretlab.ca \
    --cc=greg@kroah.com \
    --cc=jamie@jamieiles.com \
    --cc=joe@perches.com \
    --cc=lee.jones@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=swarren@nvidia.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