mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 00/12] add bus device
Date: Mon, 15 Oct 2012 21:09:15 +0200	[thread overview]
Message-ID: <20121015190915.GQ27665@pengutronix.de> (raw)
In-Reply-To: <20121015144935.GA5803@game.jcrosoft.org>

On Mon, Oct 15, 2012 at 04:49:35PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 15:21 Mon 15 Oct     , Sascha Hauer wrote:
> > > > --- a/drivers/base/driver.c
> > > > +++ b/drivers/base/driver.c
> > > > @@ -127,6 +127,11 @@ int register_device(struct device_d *new_device)
> > > >  
> > > >  	list_add_tail(&new_device->bus_list, &new_device->bus->device_list);
> > > >  
> > > > +	if (!new_device->parent) {
> > > > +		new_device->parent = &new_device->bus->dev;
> > > > +		dev_add_child(new_device->parent, new_device);
> > > and I was wanting to add global name "barebox" and add everyone under to it
> > > 
> > > I choose to do let the bus manage the child
> > > and to create a device or not
> > 
> > Any idea why we would need this?
> mdio bus as example I was thinking to drop the device as they are always
> attached to a ethernet device
> 
> input bus too
> 
> as example some bus as device specific so no need to add device as the device
> is already here
> 
> I already implement this on arm and so it in the kernel arm too

The patch only makes the new device a child of the bus device when no
parent is set, so it would still be possible to make the phy a child
of the ethernet device.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-10-15 19:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 20:59 Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01 ` [PATCH 01/12] bus_for_each_device/bus_for_each_driver: add () to allow use &bus Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 02/12] platform: add bus device Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 03/12] amba: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 04/12] fs: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 05/12] mdio: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 06/12] i2c: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 07/12] spi: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 08/12] usb: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 09/12] fb: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 10/12] mtd: register device a pure device Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 11/12] mtd: add parent support Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 21:01   ` [PATCH 12/12] eth: register device a pure device Jean-Christophe PLAGNIOL-VILLARD
2012-10-15  7:10 ` [PATCH 00/12] add bus device Sascha Hauer
2012-10-15 10:23   ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 13:21     ` Sascha Hauer
2012-10-15 14:49       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 19:09         ` Sascha Hauer [this message]
2012-10-29 10:41         ` Sascha Hauer

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=20121015190915.GQ27665@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.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