Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187101
b: refs/heads/master
c: ec76627
h: refs/heads/master
i:
  187099: 754d015
v: v3
  • Loading branch information
Lee, Chun-Yi authored and Greg Kroah-Hartman committed Mar 8, 2010
1 parent 34fd83a commit 3f71adc
Show file tree
Hide file tree
Showing 2 changed files with 26 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: 472ea12d1a265c868e1605abb59bf21f595eedfc
refs/heads/master: ec766278ba927f3d3c75211ea7697aae37f327f0
26 changes: 25 additions & 1 deletion trunk/drivers/platform/x86/msi-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
#define MSI_STANDARD_EC_SCM_LOAD_ADDRESS 0x2d
#define MSI_STANDARD_EC_SCM_LOAD_MASK (1 << 0)

static int msi_laptop_resume(struct platform_device *device);

static int force;
module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Force driver load, ignore DMI data");
Expand Down Expand Up @@ -395,7 +397,8 @@ static struct platform_driver msipf_driver = {
.driver = {
.name = "msi-laptop-pf",
.owner = THIS_MODULE,
}
},
.resume = msi_laptop_resume,
};

static struct platform_device *msipf_device;
Expand Down Expand Up @@ -584,6 +587,27 @@ static int rfkill_init(struct platform_device *sdev)
return retval;
}

static int msi_laptop_resume(struct platform_device *device)
{
u8 data;
int result;

if (!load_scm_model)
return 0;

/* set load SCM to disable hardware control by fn key */
result = ec_read(MSI_STANDARD_EC_SCM_LOAD_ADDRESS, &data);
if (result < 0)
return result;

result = ec_write(MSI_STANDARD_EC_SCM_LOAD_ADDRESS,
data | MSI_STANDARD_EC_SCM_LOAD_MASK);
if (result < 0)
return result;

return 0;
}

static int load_scm_model_init(struct platform_device *sdev)
{
u8 data;
Expand Down

0 comments on commit 3f71adc

Please sign in to comment.