[PATCH 00/12] add bus device
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Oct 15 10:49:35 EDT 2012
On 15:21 Mon 15 Oct , Sascha Hauer wrote:
> On Mon, Oct 15, 2012 at 12:23:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 09:10 Mon 15 Oct , Sascha Hauer wrote:
> > > + ret = register_device(&bus->bus_dev);
> > > + if (ret)
> > > + return ret;
> > > +
> > > list_add_tail(&bus->list, &bus_list);
> > >
> > > return 0;
> > > diff --git a/drivers/base/driver.c b/drivers/base/driver.c
> > > index 5b7286a..395546b 100644
> > > --- 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
Best Regards,
J.
More information about the barebox
mailing list