* [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files @ 2011-05-25 9:58 Lee, Chun-Yi 2011-05-25 9:58 ` [PATCH 1/2] acer-wmi: remove threeg sysfs support Lee, Chun-Yi 2011-05-27 16:30 ` [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Matthew Garrett 0 siblings, 2 replies; 5+ messages in thread From: Lee, Chun-Yi @ 2011-05-25 9:58 UTC (permalink / raw) To: mjg; +Cc: platform-driver-x86, Lee, Chun-Yi Remove threeg sysfs because we can autodetect internal 3G device and already have the threeg rfkill now. And, We also remove interface sysfs and replaced by information log. The above 2 files are the last two sysfs interfaces that were provided by acer-wmi. Lee, Chun-Yi (2): acer-wmi: remove threeg sysfs support acer-wmi: remove interface sysfs file drivers/platform/x86/acer-wmi.c | 96 +++------------------------------------ 1 files changed, 7 insertions(+), 89 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] acer-wmi: remove threeg sysfs support 2011-05-25 9:58 [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Lee, Chun-Yi @ 2011-05-25 9:58 ` Lee, Chun-Yi 2011-05-25 9:58 ` [PATCH 2/2] acer-wmi: remove interface sysfs file Lee, Chun-Yi 2011-05-27 16:30 ` [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Matthew Garrett 1 sibling, 1 reply; 5+ messages in thread From: Lee, Chun-Yi @ 2011-05-25 9:58 UTC (permalink / raw) To: mjg Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho, Dmitry Torokhov, Corentin Chary, Thomas Renninger We can now autodetect internal 3G device and already have the threeg rfkill device. So, we remove threeg sysfs support for it's no longer necessary. Tested on Acer Travelmate 8572 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> --- drivers/platform/x86/acer-wmi.c | 37 ------------------------------------- 1 files changed, 0 insertions(+), 37 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 1495539..ba10dba 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1391,33 +1391,6 @@ static void acer_rfkill_exit(void) /* * sysfs interface */ -static ssize_t show_bool_threeg(struct device *dev, - struct device_attribute *attr, char *buf) -{ - u32 result; \ - acpi_status status; - if (wmi_has_guid(WMID_GUID3)) - status = wmid3_get_device_status(&result, - ACER_WMID3_GDS_THREEG); - else - status = get_u32(&result, ACER_CAP_THREEG); - if (ACPI_SUCCESS(status)) - return sprintf(buf, "%u\n", result); - return sprintf(buf, "Read error\n"); -} - -static ssize_t set_bool_threeg(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) -{ - u32 tmp = simple_strtoul(buf, NULL, 10); - acpi_status status = set_u32(tmp, ACER_CAP_THREEG); - if (ACPI_FAILURE(status)) - return -EINVAL; - return count; -} -static DEVICE_ATTR(threeg, S_IRUGO | S_IWUSR, show_bool_threeg, - set_bool_threeg); - static ssize_t show_interface(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1754,9 +1727,6 @@ static struct platform_device *acer_platform_device; static int remove_sysfs(struct platform_device *device) { - if (has_cap(ACER_CAP_THREEG)) - device_remove_file(&device->dev, &dev_attr_threeg); - device_remove_file(&device->dev, &dev_attr_interface); return 0; @@ -1766,13 +1736,6 @@ static int create_sysfs(void) { int retval = -ENOMEM; - if (has_cap(ACER_CAP_THREEG)) { - retval = device_create_file(&acer_platform_device->dev, - &dev_attr_threeg); - if (retval) - goto error_sysfs; - } - retval = device_create_file(&acer_platform_device->dev, &dev_attr_interface); if (retval) -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] acer-wmi: remove interface sysfs file 2011-05-25 9:58 ` [PATCH 1/2] acer-wmi: remove threeg sysfs support Lee, Chun-Yi @ 2011-05-25 9:58 ` Lee, Chun-Yi 0 siblings, 0 replies; 5+ messages in thread From: Lee, Chun-Yi @ 2011-05-25 9:58 UTC (permalink / raw) To: mjg Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho, Dmitry Torokhov, Corentin Chary, Thomas Renninger Remove interface sysfs file that exposed which ACPI-WMI interface that was used by acer-wmi driver. It was replaced by information log when acer-wmi initial. Tested on Acer Travelmate 8572 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> --- drivers/platform/x86/acer-wmi.c | 59 ++++---------------------------------- 1 files changed, 7 insertions(+), 52 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index ba10dba..64b7e20 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1388,26 +1388,6 @@ static void acer_rfkill_exit(void) return; } -/* - * sysfs interface - */ -static ssize_t show_interface(struct device *dev, struct device_attribute *attr, - char *buf) -{ - switch (interface->type) { - case ACER_AMW0: - return sprintf(buf, "AMW0\n"); - case ACER_AMW0_V2: - return sprintf(buf, "AMW0 v2\n"); - case ACER_WMID: - return sprintf(buf, "WMID\n"); - default: - return sprintf(buf, "Error!\n"); - } -} - -static DEVICE_ATTR(interface, S_IRUGO, show_interface, NULL); - static void acer_wmi_notify(u32 value, void *context) { struct acpi_buffer response = { ACPI_ALLOCATE_BUFFER, NULL }; @@ -1725,29 +1705,6 @@ static struct platform_driver acer_platform_driver = { static struct platform_device *acer_platform_device; -static int remove_sysfs(struct platform_device *device) -{ - device_remove_file(&device->dev, &dev_attr_interface); - - return 0; -} - -static int create_sysfs(void) -{ - int retval = -ENOMEM; - - retval = device_create_file(&acer_platform_device->dev, - &dev_attr_interface); - if (retval) - goto error_sysfs; - - return 0; - -error_sysfs: - remove_sysfs(acer_platform_device); - return retval; -} - static void remove_debugfs(void) { debugfs_remove(interface->debug.devices); @@ -1791,11 +1748,15 @@ static int __init acer_wmi_init(void) /* * Detect which ACPI-WMI interface we're using. */ - if (wmi_has_guid(AMW0_GUID1) && wmi_has_guid(WMID_GUID1)) + if (wmi_has_guid(AMW0_GUID1) && wmi_has_guid(WMID_GUID1)) { + pr_info("Using AMW0 v2 interface\n"); interface = &AMW0_V2_interface; + } - if (!wmi_has_guid(AMW0_GUID1) && wmi_has_guid(WMID_GUID1)) + if (!wmi_has_guid(AMW0_GUID1) && wmi_has_guid(WMID_GUID1)) { + pr_info("Using WMID interface\n"); interface = &wmid_interface; + } if (wmi_has_guid(WMID_GUID2) && interface) { if (ACPI_FAILURE(WMID_set_capabilities())) { @@ -1808,6 +1769,7 @@ static int __init acer_wmi_init(void) } if (wmi_has_guid(AMW0_GUID1) && !wmi_has_guid(WMID_GUID1)) { + pr_info("Using AMW0 interface\n"); interface = &AMW0_interface; if (ACPI_FAILURE(AMW0_set_capabilities())) { @@ -1868,10 +1830,6 @@ static int __init acer_wmi_init(void) if (err) goto error_device_add; - err = create_sysfs(); - if (err) - goto error_create_sys; - if (wmi_has_guid(WMID_GUID2)) { interface->debug.wmid_devices = get_wmid_devices(); err = create_debugfs(); @@ -1885,8 +1843,6 @@ static int __init acer_wmi_init(void) return 0; error_create_debugfs: - remove_sysfs(acer_platform_device); -error_create_sys: platform_device_del(acer_platform_device); error_device_add: platform_device_put(acer_platform_device); @@ -1904,7 +1860,6 @@ static void __exit acer_wmi_exit(void) if (wmi_has_guid(ACERWMID_EVENT_GUID)) acer_wmi_input_destroy(); - remove_sysfs(acer_platform_device); remove_debugfs(); platform_device_unregister(acer_platform_device); platform_driver_unregister(&acer_platform_driver); -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files 2011-05-25 9:58 [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Lee, Chun-Yi 2011-05-25 9:58 ` [PATCH 1/2] acer-wmi: remove threeg sysfs support Lee, Chun-Yi @ 2011-05-27 16:30 ` Matthew Garrett 2011-05-28 1:06 ` Joey Lee 1 sibling, 1 reply; 5+ messages in thread From: Matthew Garrett @ 2011-05-27 16:30 UTC (permalink / raw) To: Lee, Chun-Yi; +Cc: platform-driver-x86, Lee, Chun-Yi I think that we should probably put these through a proper deprecation cycle. Can you document them in the deprecation listing and add some printks to tell people that they're going away, and then we'll drop them in a couple of releases? -- Matthew Garrett | mjg59@srcf.ucam.org ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files 2011-05-27 16:30 ` [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Matthew Garrett @ 2011-05-28 1:06 ` Joey Lee 0 siblings, 0 replies; 5+ messages in thread From: Joey Lee @ 2011-05-28 1:06 UTC (permalink / raw) To: mjg59; +Cc: Joey Lee, platform-driver-x86 Hi Matthew, 於 五,2011-05-27 於 17:30 +0100,Matthew Garrett 提到: > I think that we should probably put these through a proper deprecation > cycle. Can you document them in the deprecation listing and add some > printks to tell people that they're going away, and then we'll drop them > in a couple of releases? > Got it! Like the following patch? Thank's Joey Lee From c9308632bd0b17005d3f6cd2eaf27e1d053f40fb Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi <jlee@novell.com> Date: Sat, 28 May 2011 09:02:41 +0800 Subject: [PATCH] acer-wmi: schedule threeg and interface sysfs for feature removal we can now autodetect internal 3G device and already have the threeg rfkill device. So, we plan to remove threeg sysfs support for it's no longer necessary. We also plan to remove interface sysfs file that exposed which ACPI-WMI interface that was used by acer-wmi driver. It will replaced by information log when acer-wmi initial. We keep it around for userspace compatibility reasons, schedule removal in 2012. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> --- Documentation/feature-removal-schedule.txt | 13 +++++++++++++ drivers/platform/x86/acer-wmi.c | 3 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 492e81d..8427ad0 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -580,3 +580,16 @@ Why: These legacy callbacks should no longer be used as i2c-core offers Who: Jean Delvare <khali@linux-fr.org> ---------------------------- + +What: threeg and interface sysfs files in /sys/devices/platform/acer-wmi +When: 2012 +Why: In 2.6.40, we can now autodetect internal 3G device and already have + the threeg rfkill device. So, we plan to remove threeg sysfs support + for it's no longer necessary. + + We also plan to remove interface sysfs file that exposed which ACPI-WMI + interface that was used by acer-wmi driver. It will replaced by + information log when acer-wmi initial. +Who: Lee, Chun-Yi <jlee@novell.com> + +---------------------------- diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 1495539..7e7e668 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1396,6 +1396,8 @@ static ssize_t show_bool_threeg(struct device *dev, { u32 result; \ acpi_status status; + + pr_info("This threeg sysfs will be removed in 2012."); if (wmi_has_guid(WMID_GUID3)) status = wmid3_get_device_status(&result, ACER_WMID3_GDS_THREEG); @@ -1421,6 +1423,7 @@ static DEVICE_ATTR(threeg, S_IRUGO | S_IWUSR, show_bool_threeg, static ssize_t show_interface(struct device *dev, struct device_attribute *attr, char *buf) { + pr_info("This interface sysfs will be removed in 2012."); switch (interface->type) { case ACER_AMW0: return sprintf(buf, "AMW0\n"); -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-28 1:06 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-05-25 9:58 [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Lee, Chun-Yi 2011-05-25 9:58 ` [PATCH 1/2] acer-wmi: remove threeg sysfs support Lee, Chun-Yi 2011-05-25 9:58 ` [PATCH 2/2] acer-wmi: remove interface sysfs file Lee, Chun-Yi 2011-05-27 16:30 ` [PATCH 0/2] acer-wmi: remove threeg and interface sysfs files Matthew Garrett 2011-05-28 1:06 ` Joey Lee
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.