For the I2C adapter number to read EDID in MM platform is 0, add a new
DMI match list to solve this issue.
And, there are 3 I2C adapter numbers in Moorestown platform, using
driver_data to denote which I2C adapter number is selected.

Patch against kernel-adaptation-mrst-2.6.37.6-8.1.

Reported-by: Jeff Cheng <[email protected]>
Tested-by: Jeff Cheng <[email protected]>
Signed-off-by: Major Lee <[email protected]>
---
 psb_intel_lvds.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

--- linux-2.6.37.6.bak/drivers/staging/mrst/drv/psb_intel_lvds.c
2011-04-12 09:59:52.500482563 +0800
+++ linux-2.6.37.6/drivers/staging/mrst/drv/psb_intel_lvds.c
2011-04-22 12:56:38.228026000 +0800
@@ -1238,6 +1238,16 @@ static const struct dmi_system_id psb_lv
                .matches = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "OakTrail
platform"),
                },
+               .driver_data = (void *)1,
+       },
+       {
+               .callback = psb_lvds_i2c_adap_callback,
+               .ident = "Intel Moorestown",
+               .matches = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "MM"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "MM 10"),
+               },
+               .driver_data = (void *)0,
        },
 
        { }     /* terminating entry */
@@ -1263,6 +1273,7 @@ void mrst_lvds_init(struct drm_device *d
        int i2c_adap_num;
        struct i2c_adapter *i2c_adap;
        struct drm_display_mode *scan;  /* *modes, *bios_mode; */
+       const struct dmi_system_id *dmi;
 
        PSB_DEBUG_ENTRY("\n");
 
@@ -1314,10 +1325,11 @@ void mrst_lvds_init(struct drm_device *d
         * 4) make sure lid is open
         *    if closed, act like it's not there for now
         */
-        if (dmi_check_system(psb_lvds_i2c_adap_table))
-               i2c_adap_num = 1;
+       dmi = dmi_first_match(psb_lvds_i2c_adap_table);
+       if (dmi)
+               i2c_adap_num = (int)dmi->driver_data;
        else
-               i2c_adap_num = 2;
+               i2c_adap_num = 2; /* default num if not match */
 
        i2c_adap = i2c_get_adapter(i2c_adap_num);
 

Attachment: psb_intel_lvds-add-support-for-mm-to-fix-i2c-adap-num.patch
Description: psb_intel_lvds-add-support-for-mm-to-fix-i2c-adap-num.patch

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

Reply via email to