diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-05-11 09:32:05 +0200 |
---|---|---|
committer | Henrik Aberg <henrik.aberg@stericsson.com> | 2011-05-18 09:40:10 +0200 |
commit | 441cf13911b95d6e59be5d8c651ab4a9b2e1c6e5 (patch) | |
tree | 966a500fb1e96d244b8345aae43aa6d725f02aa0 | |
parent | 0cebe4fda5b325f64804b99de106ddd8fa2bb443 (diff) |
ab5500: placeholder to pass devices platform data
Added placeholder in struct ab5500_platform_data
to add platform data of ab5500 devices.
Change-Id: I020cbcfd344d19c7f4268638ebf147e7080b127d
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/21907
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rwxr-xr-x | drivers/mfd/ab5500-core.c | 5 | ||||
-rw-r--r-- | include/linux/mfd/abx500/ab5500.h | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/drivers/mfd/ab5500-core.c b/drivers/mfd/ab5500-core.c index 7b4099ddb0a..43f7cad48e7 100755 --- a/drivers/mfd/ab5500-core.c +++ b/drivers/mfd/ab5500-core.c @@ -2366,6 +2366,11 @@ static int __init ab5500_probe(struct platform_device *pdev) goto exit_no_irq; } + /* Set up and register the platform devices. */ + for (i = 0; i < AB5500_NUM_DEVICES; i++) { + ab5500_devs[i].mfd_data = ab5500_plf_data->dev_data[i]; + } + err = mfd_add_devices(&pdev->dev, 0, ab5500_devs, ARRAY_SIZE(ab5500_devs), NULL, ab5500_plf_data->irq.base); diff --git a/include/linux/mfd/abx500/ab5500.h b/include/linux/mfd/abx500/ab5500.h index 72c2baf1b83..f9230b6444f 100644 --- a/include/linux/mfd/abx500/ab5500.h +++ b/include/linux/mfd/abx500/ab5500.h @@ -133,9 +133,11 @@ struct ab5500 { struct ab5500_regulator_platform_data; struct ab5500_platform_data { - struct {unsigned int base; unsigned int count; } irq; - struct ab5500_regulator_platform_data *regulator; - }; + struct {unsigned int base; unsigned int count; } irq; + void *dev_data[AB5500_NUM_DEVICES]; + size_t dev_data_sz[AB5500_NUM_DEVICES]; + struct ab5500_regulator_platform_data *regulator; +}; #endif /* MFD_AB5500_H */ |