diff options
author | Mattia Dongili <malattia@linux.it> | 2012-12-20 17:21:11 -0500 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-02-27 08:30:37 -0500 |
commit | 7517a17c1abfc081d19298459f3d2a0d14a86566 (patch) | |
tree | 744636d6fc264fb0d17d0bf19b25110dca6e49c4 /drivers/platform | |
parent | 3a7abcd809e75b3588dd4a6529238e2a9b009c9a (diff) |
sony-laptop: support basic functions for handle 0x14B and 0x14C
Z series and other recent models have 0x14? for lid and keyboard
backlight.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 46c71f49a6b4..438c7fa999f8 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -1373,6 +1373,8 @@ static void sony_nc_function_setup(struct acpi_device *device, | |||
1373 | break; | 1373 | break; |
1374 | case 0x0137: | 1374 | case 0x0137: |
1375 | case 0x0143: | 1375 | case 0x0143: |
1376 | case 0x014b: | ||
1377 | case 0x014c: | ||
1376 | result = sony_nc_kbd_backlight_setup(pf_device, handle); | 1378 | result = sony_nc_kbd_backlight_setup(pf_device, handle); |
1377 | if (result) | 1379 | if (result) |
1378 | pr_err("couldn't set up keyboard backlight function (%d)\n", | 1380 | pr_err("couldn't set up keyboard backlight function (%d)\n", |
@@ -1435,6 +1437,8 @@ static void sony_nc_function_cleanup(struct platform_device *pd) | |||
1435 | break; | 1437 | break; |
1436 | case 0x0137: | 1438 | case 0x0137: |
1437 | case 0x0143: | 1439 | case 0x0143: |
1440 | case 0x014b: | ||
1441 | case 0x014c: | ||
1438 | sony_nc_kbd_backlight_cleanup(pd); | 1442 | sony_nc_kbd_backlight_cleanup(pd); |
1439 | break; | 1443 | break; |
1440 | default: | 1444 | default: |
@@ -1479,6 +1483,8 @@ static void sony_nc_function_resume(void) | |||
1479 | break; | 1483 | break; |
1480 | case 0x0137: | 1484 | case 0x0137: |
1481 | case 0x0143: | 1485 | case 0x0143: |
1486 | case 0x014b: | ||
1487 | case 0x014c: | ||
1482 | sony_nc_kbd_backlight_resume(); | 1488 | sony_nc_kbd_backlight_resume(); |
1483 | break; | 1489 | break; |
1484 | default: | 1490 | default: |
@@ -2636,6 +2642,8 @@ static void sony_nc_backlight_ng_read_limits(int handle, | |||
2636 | lvl_table_len = 9; | 2642 | lvl_table_len = 9; |
2637 | break; | 2643 | break; |
2638 | case 0x143: | 2644 | case 0x143: |
2645 | case 0x14b: | ||
2646 | case 0x14c: | ||
2639 | lvl_table_len = 16; | 2647 | lvl_table_len = 16; |
2640 | break; | 2648 | break; |
2641 | } | 2649 | } |
@@ -2687,6 +2695,18 @@ static void sony_nc_backlight_setup(void) | |||
2687 | sony_nc_backlight_ng_read_limits(0x143, &sony_bl_props); | 2695 | sony_nc_backlight_ng_read_limits(0x143, &sony_bl_props); |
2688 | max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset; | 2696 | max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset; |
2689 | 2697 | ||
2698 | } else if (sony_find_snc_handle(0x14b) >= 0) { | ||
2699 | ops = &sony_backlight_ng_ops; | ||
2700 | sony_bl_props.cmd_base = 0x3000; | ||
2701 | sony_nc_backlight_ng_read_limits(0x14b, &sony_bl_props); | ||
2702 | max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset; | ||
2703 | |||
2704 | } else if (sony_find_snc_handle(0x14c) >= 0) { | ||
2705 | ops = &sony_backlight_ng_ops; | ||
2706 | sony_bl_props.cmd_base = 0x3000; | ||
2707 | sony_nc_backlight_ng_read_limits(0x14c, &sony_bl_props); | ||
2708 | max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset; | ||
2709 | |||
2690 | } else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", | 2710 | } else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", |
2691 | &unused))) { | 2711 | &unused))) { |
2692 | ops = &sony_backlight_ops; | 2712 | ops = &sony_backlight_ops; |