All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] drivers/base: add bus for System-on-Chip devices
Date: Tue, 18 Oct 2011 16:00:03 +0200	[thread overview]
Message-ID: <201110181600.03834.arnd@arndb.de> (raw)
In-Reply-To: <20111017182542.GB14416@suse.de>

On Monday 17 October 2011, Greg KH wrote:
> > You also commented that the argument to soc_device_unregister should
> > be a soc_device (as, consequently, the return type of soc_device_register).
> > Agree with that comment, but it means that the definition of struct
> > soc_device needs to remain visible in order to be used as the parent
> > for other devices.
> 
> No it doesn't:
>         struct device * soc_device_to_device(struct soc device *soc);

Right, that works of course. I believe the more common way is to
expose the derived type to its users, and it also simplifies the
interface.

> Anyway, what are you using this soc device to be the parent of?

Basically everything. The SoC is probably about 90% of the system in
modern embedded systems. Typically, there are on-chip buses like
AMBA or PLB that contain dozens of internal devices (interrupt
controller, serial, dmaengine, rtc, timer, watchdog, ...) as well
as buses (i2c, spi, mmc, usb, pci, ...) that have off-chip child
devices. You can think of an soc device as a kind of ?ber-MFD
that holds all of these together.

If you remember the early discussions about this patch set, I
specifically asked for making the soc_device be a representation
of the whole soc with a hierarchical view of its child devices
under it, as opposed to having an artificial device node that only
serves to export strings along the lines of /proc/cpuinfo.

See patch 5/6 for the one that moves all platform devices that
are part of the dbx500 soc below the soc_device.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <gregkh@suse.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Lee Jones <lee.jones@linaro.org>,
	jamie@jamieiles.com, linux-kernel@vger.kernel.org,
	linus.walleij@stericsson.com
Subject: Re: [PATCH 2/6] drivers/base: add bus for System-on-Chip devices
Date: Tue, 18 Oct 2011 16:00:03 +0200	[thread overview]
Message-ID: <201110181600.03834.arnd@arndb.de> (raw)
In-Reply-To: <20111017182542.GB14416@suse.de>

On Monday 17 October 2011, Greg KH wrote:
> > You also commented that the argument to soc_device_unregister should
> > be a soc_device (as, consequently, the return type of soc_device_register).
> > Agree with that comment, but it means that the definition of struct
> > soc_device needs to remain visible in order to be used as the parent
> > for other devices.
> 
> No it doesn't:
>         struct device * soc_device_to_device(struct soc device *soc);

Right, that works of course. I believe the more common way is to
expose the derived type to its users, and it also simplifies the
interface.

> Anyway, what are you using this soc device to be the parent of?

Basically everything. The SoC is probably about 90% of the system in
modern embedded systems. Typically, there are on-chip buses like
AMBA or PLB that contain dozens of internal devices (interrupt
controller, serial, dmaengine, rtc, timer, watchdog, ...) as well
as buses (i2c, spi, mmc, usb, pci, ...) that have off-chip child
devices. You can think of an soc device as a kind of über-MFD
that holds all of these together.

If you remember the early discussions about this patch set, I
specifically asked for making the soc_device be a representation
of the whole soc with a hierarchical view of its child devices
under it, as opposed to having an artificial device node that only
serves to export strings along the lines of /proc/cpuinfo.

See patch 5/6 for the one that moves all platform devices that
are part of the dbx500 soc below the soc_device.

	Arnd

  reply	other threads:[~2011-10-18 14:00 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 11:52 [PATCH 0/6] ux500: Export SoC information and some platform clean-up Lee Jones
2011-10-17 11:52 ` Lee Jones
2011-10-17 11:52 ` [PATCH 1/6] mach-ux500: pass parent pointer to each platform device Lee Jones
2011-10-17 11:52   ` Lee Jones
2011-10-17 11:52 ` [PATCH 2/6] drivers/base: add bus for System-on-Chip devices Lee Jones
2011-10-17 11:52   ` Lee Jones
2011-10-17 12:13   ` Jamie Iles
2011-10-17 12:13     ` Jamie Iles
2011-10-17 16:16   ` Greg KH
2011-10-17 16:16     ` Greg KH
2011-10-17 18:03     ` Arnd Bergmann
2011-10-17 18:03       ` Arnd Bergmann
2011-10-17 18:25       ` Greg KH
2011-10-17 18:25         ` Greg KH
2011-10-18 14:00         ` Arnd Bergmann [this message]
2011-10-18 14:00           ` Arnd Bergmann
2011-10-18 14:44           ` Greg KH
2011-10-18 14:44             ` Greg KH
2011-10-18 11:12     ` Lee Jones
2011-10-18 11:12       ` Lee Jones
2011-10-18 14:14       ` Arnd Bergmann
2011-10-18 14:14         ` Arnd Bergmann
2011-10-18 14:41         ` Greg KH
2011-10-18 14:41           ` Greg KH
2011-10-18 14:43       ` Greg KH
2011-10-18 14:43         ` Greg KH
2011-10-17 16:18   ` Greg KH
2011-10-17 16:18     ` Greg KH
2011-10-18 11:14     ` Lee Jones
2011-10-18 11:14       ` Lee Jones
2011-10-18 14:05       ` Arnd Bergmann
2011-10-18 14:05         ` Arnd Bergmann
2011-10-18 14:15         ` Jamie Iles
2011-10-18 14:15           ` Jamie Iles
2011-10-18 14:38           ` Greg KH
2011-10-18 14:38             ` Greg KH
2011-10-18 14:53           ` Arnd Bergmann
2011-10-18 14:53             ` Arnd Bergmann
2011-10-18 14:56             ` Jamie Iles
2011-10-18 14:56               ` Jamie Iles
2011-10-17 11:52 ` [PATCH 3/6] Documentation: add information for new sysfs soc bus functionality Lee Jones
2011-10-17 11:52   ` Lee Jones
2011-10-17 11:52 ` [PATCH 4/6] mach-ux500: export System-on-Chip information ux500 via sysfs Lee Jones
2011-10-17 11:52   ` Lee Jones
2011-10-17 11:52 ` [PATCH 5/6] mach-ux500: move top level platform devices in sysfs to /sys/devices/socX Lee Jones
2011-10-17 11:52   ` Lee Jones
2011-10-17 11:52 ` [PATCH 6/6] mach-ux500: remove intermediary add_platform_device* functions Lee Jones
2011-10-17 11:52   ` Lee Jones
2011-10-17 11:59   ` Jamie Iles
2011-10-17 11:59     ` Jamie Iles
2011-10-19 14:43     ` Lee Jones
2011-10-19 14:43       ` Lee Jones
2011-10-19 14:45       ` Jamie Iles
2011-10-19 14:45         ` Jamie Iles
  -- strict thread matches above, loose matches on Subject: below --
2012-01-20 16:10 [PATCH 0/6] ux500: Export SoC information and some platform clean-up Lee Jones
2012-01-20 16:10 ` [PATCH 2/6] drivers/base: add bus for System-on-Chip devices Lee Jones
2012-01-20 16:36   ` Greg KH
     [not found]     ` <CANmRt2gZe7dfRe5T8fS-1LGkeQXOBzcrbzL8xU+J9M7X4ZuDrA@mail.gmail.com>
2012-01-20 18:20       ` Greg KH
2012-01-20 16:39   ` Greg KH
     [not found]     ` <CANmRt2j4woAAg3dEtyQG4rjxRQ5Sx+4OW84Mathk4_YrFTjChQ@mail.gmail.com>
2012-01-20 18:10       ` Greg KH
2012-01-21 17:08 [PATCH 0/6] ux500: Export SoC information and some platform clean-up Lee Jones
2012-01-21 17:08 ` [PATCH 2/6] drivers/base: add bus for System-on-Chip devices Lee Jones
2012-01-28  1:05   ` Greg KH
2012-01-30 17:58     ` Arnd Bergmann
2012-01-30 18:34       ` Greg KH
2012-02-01  9:23 [PATCH 0/6] ux500: Export SoC information and some platform clean-up Lee Jones
2012-02-01  9:23 ` [PATCH 2/6] drivers/base: add bus for System-on-Chip devices Lee Jones
2012-02-01 15:52   ` Jamie Iles
2012-02-01 16:55     ` Arnd Bergmann
2012-02-06 19:22 [PATCH 0/6] ux500: Export SoC information and some platform clean-up Lee Jones
2012-02-06 19:22 ` [PATCH 2/6] drivers/base: add bus for System-on-Chip devices Lee 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=201110181600.03834.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.