Hi Arjan,

This patch adds the necessary code to mrst.c to get
Platform specific data required by the Medfield
Over Current Detection Driver(intel_mid_ocd.c)

Kindly review and merge.
-------------------------------------------------------
From: Durgadoss R <[email protected]>

Date: Sun, 28 Nov 2010 23:40:17 +0530
Subject: [PATCH 2/2] mrst.c_changes_for_intel_mid_ocd.c

This patch provides the platform specific data required by the
Medfield Over Current Detection Driver(intel_mid_ocd.c), by adding
necessary code in mrst.c

Signed-off-by: Durgadoss R <[email protected]>
---
 arch/x86/kernel/mrst.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c
index 7b1ad26..f491537 100644
--- a/arch/x86/kernel/mrst.c
+++ b/arch/x86/kernel/mrst.c
@@ -703,6 +703,19 @@ static void *max7315_platform_data(void *info)
        return max7315;
 }
 
+void *msic_ocd_platform_data(void *info)
+{
+       int gpio_base;
+       struct platform_device *pdev = (struct platform_device *)info;
+
+       gpio_base = get_gpio_by_name("msic_ocd");
+       if (gpio_base == -1)
+               return NULL;
+
+       pdev->id = gpio_base + MRST_IRQ_OFFSET;
+       return NULL;
+}
+
 void *emc1403_platform_data(void *info)
 {
        static short intr2nd_pdata;
@@ -1546,6 +1559,7 @@ static const struct devs_id device_ids[] = {
        {"pmic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data},
        {"msic_audio", SFI_DEV_TYPE_SPI, 1, &no_platform_data},
        {"msic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data},
+       {"msic_ocd", SFI_DEV_TYPE_IPC, 1, &msic_ocd_platform_data},
        {"mXT224", SFI_DEV_TYPE_I2C, 0, &qt602240_platform_data},
        {"i2c_TC35894-nEB1", SFI_DEV_TYPE_I2C, 0, &tc35894xbg_n_platform_data},
        {"i2c_TC35894-i", SFI_DEV_TYPE_I2C, 0, &tc35894xbg_i_platform_data},
-- 
1.6.5.2

Attachment: 0002-mrst.c_changes_for_intel_mid_ocd.c.patch
Description: 0002-mrst.c_changes_for_intel_mid_ocd.c.patch

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to