From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 9 Feb 2015 21:59:22 +0100 Subject: [U-Boot] [RFC PATCH 1/7] dm: usb: Add a uclass for USB controllers In-Reply-To: <1422644697-3735-2-git-send-email-sjg@chromium.org> References: <1422644697-3735-1-git-send-email-sjg@chromium.org> <1422644697-3735-2-git-send-email-sjg@chromium.org> Message-ID: <201502092159.23080.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, January 30, 2015 at 08:04:51 PM, Simon Glass wrote: > Add a uclass that can represent a USB controller. For now we do not create > devices for things attached to the controller. > > Signed-off-by: Simon Glass [...] > +UCLASS_DRIVER(usb) = { > + .id = UCLASS_USB, > + .name = "usb", > + .flags = DM_UC_FLAG_SEQ_ALIAS, > +/* > + .child_pre_probe = usb_child_pre_probe, > + .post_probe = i2c_post_probe, Certainly this is USB, right ? ;-) > +*/ What's the reason for this commented-out stuff please ? > + .per_device_auto_alloc_size = sizeof(struct dm_usb_info), > +/* > + .per_child_auto_alloc_size = sizeof(struct usb_device), > + .per_child_platdata_auto_alloc_size = sizeof(struct dm_i2c_chip), > + .child_post_bind = i2c_child_post_bind, > +*/ > +}; > diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h > index 91bb90d..baab810 100644 > --- a/include/dm/uclass-id.h > +++ b/include/dm/uclass-id.h > @@ -34,6 +34,7 @@ enum uclass_id { > UCLASS_I2C_GENERIC, /* Generic I2C device */ > UCLASS_I2C_EEPROM, /* I2C EEPROM device */ > UCLASS_MOD_EXP, /* RSA Mod Exp device */ > + UCLASS_USB, /* USB bus */ > > UCLASS_COUNT, > UCLASS_INVALID = -1, Best regards, Marek Vasut