]> git.sur5r.net Git - u-boot/commitdiff
dm: gpio: uclass: Add flag to control sequence numbering
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Mon, 1 Jun 2015 13:07:15 +0000 (18:37 +0530)
committerStefano Babic <sbabic@denx.de>
Mon, 8 Jun 2015 06:41:54 +0000 (08:41 +0200)
Like SPI and I2C few GPIO controllers also have
multiple chip instances. This patch adds the
flag 'DM_UC_FLAG_SEQ_ALIAS' in gpio_uclass driver
to control device sequence numbering. By defalut
the dev->r_seq for gpio_uclass will alwalys
returns -1, which leads the gpio driver probe
failure when using the driver with device trees.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
drivers/gpio/gpio-uclass.c

index 530bb3e1283a7681a5ee58d47ea128f2f2b1eea6..bf982b9d193143a9aed74eaed867f4267771d702 100644 (file)
@@ -757,6 +757,7 @@ static int gpio_pre_remove(struct udevice *dev)
 UCLASS_DRIVER(gpio) = {
        .id             = UCLASS_GPIO,
        .name           = "gpio",
+       .flags          = DM_UC_FLAG_SEQ_ALIAS,
        .post_probe     = gpio_post_probe,
        .pre_remove     = gpio_pre_remove,
        .per_device_auto_alloc_size = sizeof(struct gpio_dev_priv),