Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375293
b: refs/heads/master
c: 0572b12
h: refs/heads/master
i:
  375291: 6eb3bd0
v: v3
  • Loading branch information
Arthur Wirski authored and Matthew Garrett committed May 8, 2013
1 parent fba1cd5 commit d995285
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9e290a0ff16aaa51d968e7a0714ea5e2ca2407d
refs/heads/master: 0572b12aa23b96afacc936990539f4b67ae64bda
20 changes: 19 additions & 1 deletion trunk/drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,11 @@ static void sony_nc_notify(struct acpi_device *device, u32 event)
real_ev = __sony_nc_gfx_switch_status_get();
break;

case 0x015B:
/* Hybrid GFX switching SVS151290S */
ev_type = GFX_SWITCH;
real_ev = __sony_nc_gfx_switch_status_get();
break;
default:
dprintk("Unknown event 0x%x for handle 0x%x\n",
event, handle);
Expand Down Expand Up @@ -1353,6 +1358,7 @@ static void sony_nc_function_setup(struct acpi_device *device,
break;
case 0x0128:
case 0x0146:
case 0x015B:
result = sony_nc_gfx_switch_setup(pf_device, handle);
if (result)
pr_err("couldn't set up GFX Switch status (%d)\n",
Expand All @@ -1375,6 +1381,7 @@ static void sony_nc_function_setup(struct acpi_device *device,
case 0x0143:
case 0x014b:
case 0x014c:
case 0x0163:
result = sony_nc_kbd_backlight_setup(pf_device, handle);
if (result)
pr_err("couldn't set up keyboard backlight function (%d)\n",
Expand Down Expand Up @@ -1426,6 +1433,7 @@ static void sony_nc_function_cleanup(struct platform_device *pd)
break;
case 0x0128:
case 0x0146:
case 0x015B:
sony_nc_gfx_switch_cleanup(pd);
break;
case 0x0131:
Expand All @@ -1439,6 +1447,7 @@ static void sony_nc_function_cleanup(struct platform_device *pd)
case 0x0143:
case 0x014b:
case 0x014c:
case 0x0163:
sony_nc_kbd_backlight_cleanup(pd);
break;
default:
Expand Down Expand Up @@ -1485,6 +1494,7 @@ static void sony_nc_function_resume(void)
case 0x0143:
case 0x014b:
case 0x014c:
case 0x0163:
sony_nc_kbd_backlight_resume();
break;
default:
Expand Down Expand Up @@ -2390,7 +2400,9 @@ static int __sony_nc_gfx_switch_status_get(void)
{
unsigned int result;

if (sony_call_snc_handle(gfxs_ctl->handle, 0x0100, &result))
if (sony_call_snc_handle(gfxs_ctl->handle,
gfxs_ctl->handle == 0x015B ? 0x0000 : 0x0100,
&result))
return -EIO;

switch (gfxs_ctl->handle) {
Expand All @@ -2400,6 +2412,12 @@ static int __sony_nc_gfx_switch_status_get(void)
*/
return result & 0x1 ? SPEED : STAMINA;
break;
case 0x015B:
/* 0: discrete GFX (speed)
* 1: integrated GFX (stamina)
*/
return result & 0x1 ? STAMINA : SPEED;
break;
case 0x0128:
/* it's a more elaborated bitmask, for now:
* 2: integrated GFX (stamina)
Expand Down

0 comments on commit d995285

Please sign in to comment.