diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2009-04-21 11:09:10 -0600 |
---|---|---|
committer | Leann Ogasawara <leann.ogasawara@canonical.com> | 2012-06-18 07:00:56 -0700 |
commit | 203e64900b8ed6fea80cf7baab45ac2e6e35119c (patch) | |
tree | c2cdd96fdfb26f5db5a7533d901c2d0e053f6d10 /drivers | |
parent | 4b8d96aff13877fe493cf569fef62817af3256e9 (diff) |
UBUNTU: SAUCE: (no-up) Sony laptop: Some Sony Vaia laptops do not enable wwan power by default.
Bug: https://bugs.launchpad.net/bugs/364678
Added quirk to enable wwan power based on DMI information already present in the module.
Ity appears that Vaio's do not enable power to wwan from a cold boot.
We'll carry this patch indefinitely.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 210d4ae547c..9e9a55ec5e9 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -2760,6 +2760,10 @@ struct sonypi_eventtypes { struct sonypi_event *events; }; +struct sony_pic_quirk_entry { + u8 set_wwan_power; +}; + struct sony_pic_dev { struct acpi_device *acpi_dev; struct sony_pic_irq *cur_irq; @@ -2770,6 +2774,7 @@ struct sony_pic_dev { struct sonypi_eventtypes *event_types; int (*handle_irq)(const u8, const u8); int model; + struct sony_pic_quirk_entry *quirks; u16 evport_offset; u8 camera_power; u8 bluetooth_power; @@ -4204,6 +4209,12 @@ static int sony_pic_add(struct acpi_device *device) if (result) goto err_remove_pf; + if (spic_dev.quirks && spic_dev.quirks->set_wwan_power) { + /* + * Power isn't enabled by default. + */ + __sony_pic_set_wwanpower(1); + } return 0; err_remove_pf: @@ -4274,6 +4285,16 @@ static struct acpi_driver sony_pic_driver = { }, }; +static struct sony_pic_quirk_entry sony_pic_vaio_vgn = { + .set_wwan_power = 1, +}; + +static int dmi_matched(const struct dmi_system_id *dmi) +{ + spic_dev.quirks = dmi->driver_data; + return 0; +} + static struct dmi_system_id __initdata sonypi_dmi_table[] = { { .ident = "Sony Vaio", @@ -4288,6 +4309,8 @@ static struct dmi_system_id __initdata sonypi_dmi_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-"), }, + .callback = dmi_matched, + .driver_data = &sony_pic_vaio_vgn, }, { } }; |