[U-Boot] [RFC PATCH 1/7] dm: usb: Add a uclass for USB controllers

Marek Vasut
2015-02-09T20:59:22Z

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 <sjg@chromium.org>

[...]

> +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