diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:11:07 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:07 +0000 |
commit | a2710e79243f81b0a203eb04a311c8db07b919cb (patch) | |
tree | 05c8ba97230dce219c91879c7d3171c62044d336 /drivers/power/gta02_hdq.c | |
parent | f8b02bf658c479e5999511eb1f309dd232708347 (diff) |
fix-hdq-child-attach-callback.patch
Along the same lines as FIQ, HDQ can have children in device tree terms too.
Allow the same kind of callback in machine-specific code
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/power/gta02_hdq.c')
-rw-r--r-- | drivers/power/gta02_hdq.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/power/gta02_hdq.c b/drivers/power/gta02_hdq.c index 89fd3fa8b4f..ac52ea8be4c 100644 --- a/drivers/power/gta02_hdq.c +++ b/drivers/power/gta02_hdq.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #include <linux/platform_device.h> #include <mach/hardware.h> +#include <linux/gta02_hdq.h> #include <asm/mach-types.h> #include <mach/gta02.h> #include <mach/fiq_ipc_gta02.h> @@ -205,8 +206,9 @@ static int __init gta02hdq_probe(struct platform_device *pdev) { struct resource *r = platform_get_resource(pdev, 0, 0); int ret; - - if (!machine_is_neo1973_gta02()) + struct gta02_hdq_platform_data *pdata = pdev->dev.platform_data; + + if (!machine_is_neo1973_gta02()) return -EIO; if (!r) @@ -233,6 +235,14 @@ static int __init gta02hdq_probe(struct platform_device *pdev) fiq_ipc.hdq_probed = 1; /* we are ready to do stuff now */ + /* + * if wanted, users can defer registration of devices + * that depend on HDQ until after we register, and can use our + * device as parent so suspend-resume ordering is correct + */ + if (pdata->attach_child_devices) + (pdata->attach_child_devices)(&pdev->dev); + return 0; } |