Commit 7517a17c authored by Mattia Dongili's avatar Mattia Dongili Committed by Matthew Garrett

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: default avatarMattia Dongili <malattia@linux.it>
Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
parent 3a7abcd8
...@@ -1373,6 +1373,8 @@ static void sony_nc_function_setup(struct acpi_device *device, ...@@ -1373,6 +1373,8 @@ static void sony_nc_function_setup(struct acpi_device *device,
break; break;
case 0x0137: case 0x0137:
case 0x0143: case 0x0143:
case 0x014b:
case 0x014c:
result = sony_nc_kbd_backlight_setup(pf_device, handle); result = sony_nc_kbd_backlight_setup(pf_device, handle);
if (result) if (result)
pr_err("couldn't set up keyboard backlight function (%d)\n", 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,6 +1437,8 @@ static void sony_nc_function_cleanup(struct platform_device *pd)
break; break;
case 0x0137: case 0x0137:
case 0x0143: case 0x0143:
case 0x014b:
case 0x014c:
sony_nc_kbd_backlight_cleanup(pd); sony_nc_kbd_backlight_cleanup(pd);
break; break;
default: default:
...@@ -1479,6 +1483,8 @@ static void sony_nc_function_resume(void) ...@@ -1479,6 +1483,8 @@ static void sony_nc_function_resume(void)
break; break;
case 0x0137: case 0x0137:
case 0x0143: case 0x0143:
case 0x014b:
case 0x014c:
sony_nc_kbd_backlight_resume(); sony_nc_kbd_backlight_resume();
break; break;
default: default:
...@@ -2636,6 +2642,8 @@ static void sony_nc_backlight_ng_read_limits(int handle, ...@@ -2636,6 +2642,8 @@ static void sony_nc_backlight_ng_read_limits(int handle,
lvl_table_len = 9; lvl_table_len = 9;
break; break;
case 0x143: case 0x143:
case 0x14b:
case 0x14c:
lvl_table_len = 16; lvl_table_len = 16;
break; break;
} }
...@@ -2687,6 +2695,18 @@ static void sony_nc_backlight_setup(void) ...@@ -2687,6 +2695,18 @@ static void sony_nc_backlight_setup(void)
sony_nc_backlight_ng_read_limits(0x143, &sony_bl_props); sony_nc_backlight_ng_read_limits(0x143, &sony_bl_props);
max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset; max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset;
} else if (sony_find_snc_handle(0x14b) >= 0) {
ops = &sony_backlight_ng_ops;
sony_bl_props.cmd_base = 0x3000;
sony_nc_backlight_ng_read_limits(0x14b, &sony_bl_props);
max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset;
} else if (sony_find_snc_handle(0x14c) >= 0) {
ops = &sony_backlight_ng_ops;
sony_bl_props.cmd_base = 0x3000;
sony_nc_backlight_ng_read_limits(0x14c, &sony_bl_props);
max_brightness = sony_bl_props.maxlvl - sony_bl_props.offset;
} else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", } else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT",
&unused))) { &unused))) {
ops = &sony_backlight_ops; ops = &sony_backlight_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment