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
* 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
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)
},
.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 = {
},
.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 = {
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,
},
{ },
};