lkml.org 
[lkml]   [2016]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6] drivers: amba: properly handle devices with power domains
From
[...]

>
> +static int __init amba_deferred_device_init(void)
> +{
> + struct deferred_device *ddev, *tmp;
> +
> + list_for_each_entry_safe(ddev, tmp, &deferred_devices, node) {
> + int ret = amba_device_try_add(ddev->dev, ddev->parent);
> +
> + if (ret == -EPROBE_DEFER)
> + continue;

What happens with devices that still fails to be added here? Should we
schedule a periodic work to re-try?

> +
> + list_del_init(&ddev->node);
> + kfree(ddev);
> + }
> +
> + return 0;
> +}
> +late_initcall(amba_deferred_device_init);
> +
> static struct amba_device *
> amba_aphb_device_add(struct device *parent, const char *name,
> resource_size_t base, size_t size, int irq1, int irq2,
> --
> 1.9.2
>

I assume there are other similar buses like AMBA that needs
enumeration before it can bind an appropriate driver for its device.

Perhaps that's a good reason to make this new "device add re-try"
mechanism a generic thing supported by the driver core?

Kind regards
Uffe

\
 
 \ /
  Last update: 2016-04-12 17:01    [W:0.172 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site