Merge branch 'for-1111' of git://gitorious.org/smack-next/kernel into for-linus
[pandora-kernel.git] / drivers / platform / x86 / samsung-laptop.c
index 8ffab50..09e26bf 100644 (file)
@@ -404,8 +404,9 @@ static int get_brightness(struct backlight_device *bd)
 
 static void check_for_stepping_quirk(void)
 {
-       u8 initial_level = read_brightness();
+       u8 initial_level;
        u8 check_level;
+       u8 orig_level = read_brightness();
 
        /*
         * Some laptops exhibit the strange behaviour of stepping toward
@@ -414,6 +415,11 @@ static void check_for_stepping_quirk(void)
         * around in set_brightness.
         */
 
+       if (orig_level == 0)
+               set_brightness(1);
+
+       initial_level = read_brightness();
+
        if (initial_level <= 2)
                check_level = initial_level + 2;
        else
@@ -427,7 +433,7 @@ static void check_for_stepping_quirk(void)
                pr_info("enabled workaround for brightness stepping quirk\n");
        }
 
-       set_brightness(initial_level);
+       set_brightness(orig_level);
 }
 
 static int update_status(struct backlight_device *bd)
@@ -662,6 +668,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
                },
                .callback = dmi_check_cb,
        },
+       {
+               .ident = "N220",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR,
+                                       "SAMSUNG ELECTRONICS CO., LTD."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "N220"),
+                       DMI_MATCH(DMI_BOARD_NAME, "N220"),
+               },
+               .callback = dmi_check_cb,
+       },
        {
                .ident = "N150/N210/N220/N230",
                .matches = {
@@ -682,6 +698,15 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
                },
                .callback = dmi_check_cb,
        },
+       {
+               .ident = "R700",
+               .matches = {
+                     DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+                     DMI_MATCH(DMI_PRODUCT_NAME, "SR700"),
+                     DMI_MATCH(DMI_BOARD_NAME, "SR700"),
+               },
+               .callback = dmi_check_cb,
+       },
        {
                .ident = "R530/R730",
                .matches = {
@@ -745,6 +770,15 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"),
                },
                .callback = dmi_check_cb,
+       },
+               {
+               .ident = "X520",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "X520"),
+                       DMI_MATCH(DMI_BOARD_NAME, "X520"),
+               },
+               .callback = dmi_check_cb,
        },
        { },
 };