summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>2015-06-01 13:07:15 (GMT)
committerStefano Babic <sbabic@denx.de>2015-06-08 06:41:54 (GMT)
commitae89bb0d363eba33074106309c81c02f84b91ef8 (patch)
treec8bf866075005fdb7dc96b4dd61dc00092e249c2 /drivers
parentcd6ddc48134297497d226209a4e6ea72b71c87c5 (diff)
downloadu-boot-fsl-qoriq-ae89bb0d363eba33074106309c81c02f84b91ef8.tar.xz
dm: gpio: uclass: Add flag to control sequence numbering
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpio-uclass.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 530bb3e..bf982b9 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -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),