* [PATCH 0/7] sony-laptop for acpi-test @ 2008-11-03 9:41 Mattia Dongili 2008-11-03 9:41 ` [PATCH 1/7] [sony-laptop] merge Type4 into Type3 Mattia Dongili 2008-11-03 11:17 ` [PATCH 0/7] sony-laptop for acpi-test Norbert Preining 0 siblings, 2 replies; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi Hi Len, here is a first submission with some of the backlog I accumulated in these months. The target is 2.6.29. Thanks --- drivers/misc/sony-laptop.c | 116 ++++++++++++++++++++++++++++++++++----------- include/linux/sonypi.h | 3 + 2 files changed, 93 insertions(+), 26 deletions(-) -- mattia ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/7] [sony-laptop] merge Type4 into Type3 2008-11-03 9:41 [PATCH 0/7] sony-laptop for acpi-test Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 9:41 ` [PATCH 2/7] [sony-laptop] VGN-A317M hotkey support Mattia Dongili 2008-11-03 11:17 ` [PATCH 0/7] sony-laptop for acpi-test Norbert Preining 1 sibling, 1 reply; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, Mattia Dongili Creating Type4 was a mistake in the first place. Some users report that also Type3 vaios require the same extra hotkey handling which the Type4 for was menat to guard from. Merging down Type4 into Type3 will just remove a useless distinction. Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 28 ++++++---------------------- 1 files changed, 6 insertions(+), 22 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 06f07e1..7151cee 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -1188,7 +1188,6 @@ static struct acpi_driver sony_nc_driver = { #define SONYPI_TYPE1_OFFSET 0x04 #define SONYPI_TYPE2_OFFSET 0x12 #define SONYPI_TYPE3_OFFSET 0x12 -#define SONYPI_TYPE4_OFFSET 0x12 struct sony_pic_ioport { struct acpi_resource_io io1; @@ -1431,14 +1430,6 @@ static struct sonypi_eventtypes type3_events[] = { { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev }, { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev }, { 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev }, - { 0 }, -}; -static struct sonypi_eventtypes type4_events[] = { - { 0, 0xffffffff, sonypi_releaseev }, - { 0x21, SONYPI_FNKEY_MASK, sonypi_fnkeyev }, - { 0x31, SONYPI_WIRELESS_MASK, sonypi_wlessev }, - { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev }, - { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev }, { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev }, @@ -1504,11 +1495,11 @@ static u8 sony_pic_call3(u8 dev, u8 fn, u8 v) /* * minidrivers for SPIC models */ -static int type4_handle_irq(const u8 data_mask, const u8 ev) +static int type3_handle_irq(const u8 data_mask, const u8 ev) { /* * 0x31 could mean we have to take some extra action and wait for - * the next irq for some Type4 models, it will generate a new + * the next irq for some Type3 models, it will generate a new * irq and we can read new data from the device: * - 0x5c and 0x5f requires 0xA0 * - 0x61 requires 0xB3 @@ -1538,16 +1529,10 @@ static struct device_ctrl spic_types[] = { }, { .model = SONYPI_DEVICE_TYPE3, - .handle_irq = NULL, + .handle_irq = type3_handle_irq, .evport_offset = SONYPI_TYPE3_OFFSET, .event_types = type3_events, }, - { - .model = SONYPI_DEVICE_TYPE4, - .handle_irq = type4_handle_irq, - .evport_offset = SONYPI_TYPE4_OFFSET, - .event_types = type4_events, - }, }; static void sony_pic_detect_device_type(struct sony_pic_dev *dev) @@ -1571,14 +1556,14 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev) pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, NULL); if (pcidev) { - dev->control = &spic_types[3]; + dev->control = &spic_types[2]; goto out; } pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_4, NULL); if (pcidev) { - dev->control = &spic_types[3]; + dev->control = &spic_types[2]; goto out; } @@ -1591,8 +1576,7 @@ out: printk(KERN_INFO DRV_PFX "detected Type%d model\n", dev->control->model == SONYPI_DEVICE_TYPE1 ? 1 : - dev->control->model == SONYPI_DEVICE_TYPE2 ? 2 : - dev->control->model == SONYPI_DEVICE_TYPE3 ? 3 : 4); + dev->control->model == SONYPI_DEVICE_TYPE2 ? 2 : 3); } /* camera tests and poweron/poweroff */ -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/7] [sony-laptop] VGN-A317M hotkey support 2008-11-03 9:41 ` [PATCH 1/7] [sony-laptop] merge Type4 into Type3 Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 9:41 ` [PATCH 3/7] [sony-laptop] Eliminate BKL in ioctls Mattia Dongili 0 siblings, 1 reply; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, Harald Jenny, Mattia Dongili From: Harald Jenny <harald@a-little-linux-box.at> This laptop has 5 SPIC managed buttons above the keyboard: sound + and - as well as brightness, zoom and S1. Possibly the entire VGN-A serie behaves the same. Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 24 +++++++++++++++++++++++- include/linux/sonypi.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 7151cee..4c9a3e8 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -211,6 +211,9 @@ static int sony_laptop_input_index[] = { 48, /* 61 SONYPI_EVENT_WIRELESS_OFF */ 49, /* 62 SONYPI_EVENT_ZOOM_IN_PRESSED */ 50, /* 63 SONYPI_EVENT_ZOOM_OUT_PRESSED */ + 51, /* 64 SONYPI_EVENT_VOLUME_INC_PRESSED */ + 52, /* 65 SONYPI_EVENT_VOLUME_DEC_PRESSED */ + -1, /* 66 SONYPI_EVENT_BRIGHTNESS_PRESSED */ }; static int sony_laptop_input_keycode_map[] = { @@ -264,7 +267,9 @@ static int sony_laptop_input_keycode_map[] = { KEY_WLAN, /* 47 SONYPI_EVENT_WIRELESS_ON */ KEY_WLAN, /* 48 SONYPI_EVENT_WIRELESS_OFF */ KEY_ZOOMIN, /* 49 SONYPI_EVENT_ZOOM_IN_PRESSED */ - KEY_ZOOMOUT /* 50 SONYPI_EVENT_ZOOM_OUT_PRESSED */ + KEY_ZOOMOUT, /* 50 SONYPI_EVENT_ZOOM_OUT_PRESSED */ + KEY_VOLUMEUP, /* 51 SONYPI_EVENT_VOLUME_INC_PRESSED */ + KEY_VOLUMEDOWN, /* 52 SONYPI_EVENT_VOLUME_DEC_PRESSED */ }; /* release buttons after a short delay if pressed */ @@ -1320,6 +1325,7 @@ static struct sonypi_event sonypi_pkeyev[] = { { 0x01, SONYPI_EVENT_PKEY_P1 }, { 0x02, SONYPI_EVENT_PKEY_P2 }, { 0x04, SONYPI_EVENT_PKEY_P3 }, + { 0x20, SONYPI_EVENT_PKEY_P1 }, { 0, 0 } }; @@ -1363,6 +1369,7 @@ static struct sonypi_event sonypi_zoomev[] = { { 0x39, SONYPI_EVENT_ZOOM_PRESSED }, { 0x10, SONYPI_EVENT_ZOOM_IN_PRESSED }, { 0x20, SONYPI_EVENT_ZOOM_OUT_PRESSED }, + { 0x04, SONYPI_EVENT_ZOOM_PRESSED }, { 0, 0 } }; @@ -1393,6 +1400,19 @@ static struct sonypi_event sonypi_batteryev[] = { { 0, 0 } }; +/* The set of possible volume events */ +static struct sonypi_event sonypi_volumeev[] = { + { 0x01, SONYPI_EVENT_VOLUME_INC_PRESSED }, + { 0x02, SONYPI_EVENT_VOLUME_DEC_PRESSED }, + { 0, 0 } +}; + +/* The set of possible brightness events */ +static struct sonypi_event sonypi_brightnessev[] = { + { 0x80, SONYPI_EVENT_BRIGHTNESS_PRESSED }, + { 0, 0 } +}; + static struct sonypi_eventtypes type1_events[] = { { 0, 0xffffffff, sonypi_releaseev }, { 0x70, SONYPI_MEYE_MASK, sonypi_meyeev }, @@ -1433,6 +1453,8 @@ static struct sonypi_eventtypes type3_events[] = { { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev }, + { 0x05, SONYPI_PKEY_MASK, sonypi_volumeev }, + { 0x05, SONYPI_PKEY_MASK, sonypi_brightnessev }, { 0 }, }; diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index f41ffd7..ce0c80f 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h @@ -103,6 +103,9 @@ #define SONYPI_EVENT_WIRELESS_OFF 61 #define SONYPI_EVENT_ZOOM_IN_PRESSED 62 #define SONYPI_EVENT_ZOOM_OUT_PRESSED 63 +#define SONYPI_EVENT_VOLUME_INC_PRESSED 64 +#define SONYPI_EVENT_VOLUME_DEC_PRESSED 65 +#define SONYPI_EVENT_BRIGHTNESS_PRESSED 66 /* get/set brightness */ #define SONYPI_IOCGBRT _IOR('v', 0, __u8) -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/7] [sony-laptop] Eliminate BKL in ioctls 2008-11-03 9:41 ` [PATCH 2/7] [sony-laptop] VGN-A317M hotkey support Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 9:41 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 Mattia Dongili 0 siblings, 1 reply; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, Alan Cox, Alan Cox, Mattia Dongili From: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 4c9a3e8..c9e5651 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -1989,8 +1989,8 @@ static int ec_read16(u8 addr, u16 *value) return 0; } -static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, - unsigned int cmd, unsigned long arg) +static long sonypi_misc_ioctl(struct file *fp, unsigned int cmd, + unsigned long arg) { int ret = 0; void __user *argp = (void __user *)arg; @@ -2124,7 +2124,7 @@ static const struct file_operations sonypi_misc_fops = { .open = sonypi_misc_open, .release = sonypi_misc_release, .fasync = sonypi_misc_fasync, - .ioctl = sonypi_misc_ioctl, + .unlocked_ioctl = sonypi_misc_ioctl, }; static struct miscdevice sonypi_misc_device = { -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 2008-11-03 9:41 ` [PATCH 3/7] [sony-laptop] Eliminate BKL in ioctls Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 9:41 ` [PATCH 5/7] [sony-laptop] call the extra enable function for SNC on Vaio Z Mattia Dongili 2008-11-04 8:22 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 ISHIKAWA Mutsumi 0 siblings, 2 replies; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, ISHIKAWA Mutsumi, Mattia Dongili From: ISHIKAWA Mutsumi <ishikawa@hanzubon.jp> Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index c9e5651..19f3306 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -1589,6 +1589,13 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev) goto out; } + pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_ICH9_1, NULL); + if (pcidev) { + dev->control = &spic_types[4]; + goto out; + } + /* default */ dev->control = &spic_types[1]; -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/7] [sony-laptop] call the extra enable function for SNC on Vaio Z 2008-11-03 9:41 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 9:41 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Mattia Dongili 2008-11-04 8:22 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 ISHIKAWA Mutsumi 1 sibling, 1 reply; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, ISHIKAWA Mutsumi, Mattia Dongili From: ISHIKAWA Mutsumi <ishikawa@hanzubon.jp> Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 19f3306..31f84ce 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -894,6 +894,15 @@ static const struct dmi_system_id sony_nc_ids[] = { DMI_MATCH(DMI_PRODUCT_NAME, "VGN-N"), }, }, + { + .ident = "Sony Vaio Z Series", + .callback = sony_nc_C_enable, + .driver_data = sony_C_events, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z"), + }, + }, { } }; -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops 2008-11-03 9:41 ` [PATCH 5/7] [sony-laptop] call the extra enable function for SNC on Vaio Z Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 9:41 ` [PATCH 7/7] [sony-laptop] notify the hardware of a state change in wwanpower Mattia Dongili 2008-11-03 10:32 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Matthew Garrett 0 siblings, 2 replies; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, Sergey Yanovich, Mattia Dongili From: Sergey Yanovich <ynvich@gmail.com> Sony laptops have a single hardware rfkill switch, which controls several wireless devices: wifi, bluetooth, wwan. The code to selectively control bluetooth and wwan is already present. This patch adds handling of wifi. Signed-off-by: Sergey Yanovich <ynvich@gmail.com> Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 31f84ce..77fe584 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -1241,6 +1241,7 @@ struct sony_pic_dev { u8 camera_power; u8 bluetooth_power; u8 wwan_power; + u8 wifi_power; }; static struct sony_pic_dev spic_dev = { @@ -1806,6 +1807,44 @@ static ssize_t sony_pic_wwanpower_show(struct device *dev, return count; } +/* wifi power (TX series) */ +static void sony_pic_set_wifipower(u8 state) +{ + state = !!state; + mutex_lock(&spic_dev.lock); + if (spic_dev.wifi_power == state) { + mutex_unlock(&spic_dev.lock); + return; + } + sony_pic_call2(0x98, -state); + sony_pic_call1(0x82); + spic_dev.wifi_power = state; + mutex_unlock(&spic_dev.lock); +} + +static ssize_t sony_pic_wifipower_store(struct device *dev, + struct device_attribute *attr, + const char *buffer, size_t count) +{ + unsigned long value; + if (strict_strtoul(buffer, 10, &value)) + return -EINVAL; + + sony_pic_set_wifipower(value); + + return count; +} + +static ssize_t sony_pic_wifipower_show(struct device *dev, + struct device_attribute *attr, char *buffer) +{ + ssize_t count; + mutex_lock(&spic_dev.lock); + count = snprintf(buffer, PAGE_SIZE, "%d\n", spic_dev.wifi_power); + mutex_unlock(&spic_dev.lock); + return count; +} + /* bluetooth subsystem power state */ static void __sony_pic_set_bluetoothpower(u8 state) { @@ -1888,11 +1927,13 @@ struct device_attribute spic_attr_##_name = __ATTR(_name, \ static SPIC_ATTR(bluetoothpower, 0644); static SPIC_ATTR(wwanpower, 0644); +static SPIC_ATTR(wifipower, 0644); static SPIC_ATTR(fanspeed, 0644); static struct attribute *spic_attributes[] = { &spic_attr_bluetoothpower.attr, &spic_attr_wwanpower.attr, + &spic_attr_wifipower.attr, &spic_attr_fanspeed.attr, NULL }; -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/7] [sony-laptop] notify the hardware of a state change in wwanpower 2008-11-03 9:41 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Mattia Dongili @ 2008-11-03 9:41 ` Mattia Dongili 2008-11-03 10:32 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Matthew Garrett 1 sibling, 0 replies; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 9:41 UTC (permalink / raw) To: Len Brown; +Cc: linux-acpi, Sergey Yanovich, Mattia Dongili From: Sergey Yanovich <ynvich@gmail.com> From: Sergey Yanovich <ynvich@gmail.com> Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/misc/sony-laptop.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 77fe584..1c65e42 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -1779,6 +1779,7 @@ static void sony_pic_set_wwanpower(u8 state) return; } sony_pic_call2(0xB0, state); + sony_pic_call1(0x82); spic_dev.wwan_power = state; mutex_unlock(&spic_dev.lock); } -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops 2008-11-03 9:41 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Mattia Dongili 2008-11-03 9:41 ` [PATCH 7/7] [sony-laptop] notify the hardware of a state change in wwanpower Mattia Dongili @ 2008-11-03 10:32 ` Matthew Garrett 2008-11-03 10:55 ` Sergey Yanovich 1 sibling, 1 reply; 16+ messages in thread From: Matthew Garrett @ 2008-11-03 10:32 UTC (permalink / raw) To: Mattia Dongili; +Cc: Len Brown, linux-acpi, Sergey Yanovich On Mon, Nov 03, 2008 at 06:41:19PM +0900, Mattia Dongili wrote: > Sony laptops have a single hardware rfkill switch, which controls > several wireless devices: wifi, bluetooth, wwan. The code to > selectively control bluetooth and wwan is already present. This > patch adds handling of wifi. Please don't add more custom radio control switches. It'd be better to add rfkill support. Otherwise we have even more stuff in /sys to carry around for ages before deprecating. -- Matthew Garrett | mjg59@srcf.ucam.org ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops 2008-11-03 10:32 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Matthew Garrett @ 2008-11-03 10:55 ` Sergey Yanovich 2008-11-03 10:57 ` Matthew Garrett 0 siblings, 1 reply; 16+ messages in thread From: Sergey Yanovich @ 2008-11-03 10:55 UTC (permalink / raw) To: Matthew Garrett; +Cc: Mattia Dongili, Len Brown, linux-acpi Matthew Garrett wrote: > On Mon, Nov 03, 2008 at 06:41:19PM +0900, Mattia Dongili wrote: > >> Sony laptops have a single hardware rfkill switch, which controls >> several wireless devices: wifi, bluetooth, wwan. The code to >> selectively control bluetooth and wwan is already present. This >> patch adds handling of wifi. My Vaio VGN-TX770P has ipw2200, which IIUC understands hardware rfkill switch state. At the same time, when there is no wifi network around and I am on internal GRPS modem link, I would like global switch to be on, but wifi to be off. The main reason is to save power. The device has a dedicated key combination for this, on which Windows drivers by Sony operates. > Please don't add more custom radio control switches. It'd be better to > add rfkill support. Otherwise we have even more stuff in /sys to carry > around for ages before deprecating. Do you mean that the patch should use some other file instead of /sys/devices/platform/sony-laptop/wifipower for input/output? If so, could you please provide some pointers on what should be done, and where in the source tree to look for references? -- Cheers, Sergey Yanovich ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops 2008-11-03 10:55 ` Sergey Yanovich @ 2008-11-03 10:57 ` Matthew Garrett 0 siblings, 0 replies; 16+ messages in thread From: Matthew Garrett @ 2008-11-03 10:57 UTC (permalink / raw) To: Sergey Yanovich; +Cc: Mattia Dongili, Len Brown, linux-acpi On Mon, Nov 03, 2008 at 12:55:50PM +0200, Sergey Yanovich wrote: > Do you mean that the patch should use some other file instead of > /sys/devices/platform/sony-laptop/wifipower for input/output? Yes. It should register an rfkill device, which will then be exposed via /sys/class/rfkill. Checkout out Documentation/rfkill.txt. -- Matthew Garrett | mjg59@srcf.ucam.org ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 2008-11-03 9:41 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 Mattia Dongili 2008-11-03 9:41 ` [PATCH 5/7] [sony-laptop] call the extra enable function for SNC on Vaio Z Mattia Dongili @ 2008-11-04 8:22 ` ISHIKAWA Mutsumi 2008-11-04 13:21 ` Mattia Dongili 1 sibling, 1 reply; 16+ messages in thread From: ISHIKAWA Mutsumi @ 2008-11-04 8:22 UTC (permalink / raw) To: malattia; +Cc: lenb, linux-acpi, ishikawa >>>>> In <1225705280-12775-5-git-send-email-malattia@linux.it> >>>>> Mattia Dongili <malattia@linux.it> wrote: >> From: ISHIKAWA Mutsumi <ishikawa@hanzubon.jp> >> >> Signed-off-by: Mattia Dongili <malattia@linux.it> >> --- >> drivers/misc/sony-laptop.c | 7 +++++++ >> 1 files changed, 7 insertions(+), 0 deletions(-) >> diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c >> index c9e5651..19f3306 100644 >> --- a/drivers/misc/sony-laptop.c >> +++ b/drivers/misc/sony-laptop.c >> @@ -1589,6 +1589,13 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev) >> goto out; >> } >> + pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, >> + PCI_DEVICE_ID_INTEL_ICH9_1, NULL); >> + if (pcidev) { >> + dev->control = &spic_types[4]; In patch [PATCH 1/7] [sony-laptop] merge Type4 into Type3, type 3 and type 4 spic models are merged, and type 5 model I added (of cause It is not problem, it is completly same as type 4) are dropped. So I think spic_types[4] is invalid. This line should be as bellow (Use Type 3 on ICH9_1 machines): dev->control = &spic_types[2]; >> + goto out; >> + } >> + >> /* default */ >> dev->control = &spic_types[1]; >> -- >> 1.5.6.5 -- ISHIKAWA Mutsumi <ishikawa@hanzubon.jp>, <ishikawa@osdn.jp>, <ishikawa@debian.org> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 2008-11-04 8:22 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 ISHIKAWA Mutsumi @ 2008-11-04 13:21 ` Mattia Dongili 0 siblings, 0 replies; 16+ messages in thread From: Mattia Dongili @ 2008-11-04 13:21 UTC (permalink / raw) To: ISHIKAWA Mutsumi; +Cc: lenb, linux-acpi On Tue, Nov 04, 2008 at 05:22:17PM +0900, ISHIKAWA Mutsumi wrote: > >>>>> In <1225705280-12775-5-git-send-email-malattia@linux.it> > >>>>> Mattia Dongili <malattia@linux.it> wrote: > >> From: ISHIKAWA Mutsumi <ishikawa@hanzubon.jp> > >> > >> Signed-off-by: Mattia Dongili <malattia@linux.it> > >> --- > >> drivers/misc/sony-laptop.c | 7 +++++++ > >> 1 files changed, 7 insertions(+), 0 deletions(-) > > >> diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c > >> index c9e5651..19f3306 100644 > >> --- a/drivers/misc/sony-laptop.c > >> +++ b/drivers/misc/sony-laptop.c > >> @@ -1589,6 +1589,13 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev) > >> goto out; > >> } > > >> + pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, > >> + PCI_DEVICE_ID_INTEL_ICH9_1, NULL); > >> + if (pcidev) { > >> + dev->control = &spic_types[4]; > > In patch [PATCH 1/7] [sony-laptop] merge Type4 into Type3, > type 3 and type 4 spic models are merged, and type 5 model > I added (of cause It is not problem, it is completly same as > type 4) are dropped. > > So I think spic_types[4] is invalid. This line should be as > bellow (Use Type 3 on ICH9_1 machines): > > dev->control = &spic_types[2]; gosh! /me looks for his emergency brown paperbag Len, I'll resend the patchset in the next days, I'll also see if I can rework the rfkill one to use the proper subsystem. thanks -- mattia :wq! ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] sony-laptop for acpi-test 2008-11-03 9:41 [PATCH 0/7] sony-laptop for acpi-test Mattia Dongili 2008-11-03 9:41 ` [PATCH 1/7] [sony-laptop] merge Type4 into Type3 Mattia Dongili @ 2008-11-03 11:17 ` Norbert Preining 2008-11-03 12:48 ` Mattia Dongili 1 sibling, 1 reply; 16+ messages in thread From: Norbert Preining @ 2008-11-03 11:17 UTC (permalink / raw) To: Mattia Dongili; +Cc: linux-acpi Hi Mattia, On Mo, 03 Nov 2008, Mattia Dongili wrote: > here is a first submission with some of the backlog I accumulated in > these months. I tried your patches on top of 2.6.28-rc3 and the tests showed: - backlight is working via sys interface and xbacklight - hardkeys are still not working - wifipower, wwanpower, bluetoothpower sys files do not work All on Sony Vaio VGN-Z11 Best wishes Norbert ------------------------------------------------------------------------------- Dr. Norbert Preining <preining@logic.at> Vienna University of Technology Debian Developer <preining@debian.org> Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------------- AITH (n.) The single bristle that sticks out sideways on a cheap paintbrush. --- Douglas Adams, The Meaning of Liff ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] sony-laptop for acpi-test 2008-11-03 11:17 ` [PATCH 0/7] sony-laptop for acpi-test Norbert Preining @ 2008-11-03 12:48 ` Mattia Dongili 2008-11-03 13:02 ` Norbert Preining 0 siblings, 1 reply; 16+ messages in thread From: Mattia Dongili @ 2008-11-03 12:48 UTC (permalink / raw) To: Norbert Preining; +Cc: linux-acpi On Mon, Nov 03, 2008 at 12:17:21PM +0100, Norbert Preining wrote: > Hi Mattia, Hi, thanks for testing. > On Mo, 03 Nov 2008, Mattia Dongili wrote: > > here is a first submission with some of the backlog I accumulated in > > these months. > > I tried your patches on top of 2.6.28-rc3 and the tests showed: > - backlight is working via sys interface and xbacklight > - hardkeys are still not working what do you mean? some Fn backlight button (F5/F6 usually) or a separate button? Can you see if the kernel driver reports the events (pressing releasing keys) but loading it with debug=1 ? If it does it's just a matter for you to configure acpid or hal to behave as you expect. > - wifipower, wwanpower, bluetoothpower sys files do not work can you send the kernel output after loading sony-laptop with debug=1 and echoing some value to those files? thanks -- mattia :wq! ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] sony-laptop for acpi-test 2008-11-03 12:48 ` Mattia Dongili @ 2008-11-03 13:02 ` Norbert Preining 0 siblings, 0 replies; 16+ messages in thread From: Norbert Preining @ 2008-11-03 13:02 UTC (permalink / raw) To: Mattia Dongili; +Cc: linux-acpi [-- Attachment #1: Type: text/plain, Size: 1815 bytes --] Hi Mattia, On Mo, 03 Nov 2008, Mattia Dongili wrote: > > I tried your patches on top of 2.6.28-rc3 and the tests showed: > > - backlight is working via sys interface and xbacklight > > - hardkeys are still not working > > what do you mean? some Fn backlight button (F5/F6 usually) or a separate > button? F5 and F6 does not work. No message of events in the kernel log. > Can you see if the kernel driver reports the events (pressing releasing > keys) but loading it with debug=1 ? Nothing. > > - wifipower, wwanpower, bluetoothpower sys files do not work > > can you send the kernel output after loading sony-laptop with debug=1 > and echoing some value to those files? I did load with debug=1 and # pwd /sys/devices/platform/sony-laptop # cat wifipower 0 # echo 1 >wifipower # cat wifipower 1 # cat wwanpower 0 # echo 1 >wwanpower # cat wwanpower 1 # cat bluetoothpower 255 # echo 1 > bluetoothpower # cat bluetoothpower 1 Output of dmesg starting from loading the sony-laptop module is attached. If you need more tests just let me know, I can patch/hack things into the sony-laptop if you need it. Best wishes Norbert ------------------------------------------------------------------------------- Dr. Norbert Preining <preining@logic.at> Vienna University of Technology Debian Developer <preining@debian.org> Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------------- OUNDLE (vb.) To walk along leaning sideways, with one arm hanging limp and dragging one leg behind the other. Most commonly used by actors in amateur production of Richard III, or by people carrying a heavy suitcase in one hand. --- Douglas Adams, The Meaning of Liff [-- Attachment #2: dmesg.txt --] [-- Type: text/plain, Size: 4531 bytes --] [ 6610.638032] sony-laptop: Sony Programmable IO Control Driver v0.6. [ 6610.638087] sony-laptop: detected Type3 model [ 6610.638090] sony-laptop: Evaluating _STA [ 6610.638107] sony-laptop: Device enabled [ 6610.638111] sony-laptop: Evaluating _PRS [ 6610.638331] sony-laptop: IO1 at 0xc000 (0x20) [ 6610.638337] sony-laptop: IO1 at 0xc800 (0x20) [ 6610.638342] sony-laptop: IO1 at 0xd000 (0x20) [ 6610.638347] sony-laptop: IO1 at 0xd800 (0x20) [ 6610.640305] PM: Adding info for No Bus:input11 [ 6610.640369] input: Sony Vaio Keys as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0f/SNY6001:00/input/input11 [ 6610.684121] PM: Adding info for No Bus:event9 [ 6610.684194] PM: Adding info for No Bus:input12 [ 6610.684241] input: Sony Vaio Jogdial as /devices/virtual/input/input12 [ 6610.696037] PM: Adding info for No Bus:mouse2 [ 6610.716075] PM: Adding info for No Bus:event10 [ 6610.716102] PM: Adding info for No Bus:sonypi [ 6610.716108] sony-laptop: device allocated minor is 60 [ 6610.716113] sony-laptop: I/O port1: 0xc000 (0xc000) + 0x20 [ 6610.716128] sony-laptop: IRQ: 6 - triggering: 1 - polarity: 0 - shr: 0 [ 6610.716130] sony-laptop: Evaluating _SRS [ 6610.718939] sony-laptop: sony_pic_call1(0x82): 0xff0a [ 6610.719868] sony-laptop: event ([ff] [ff]) at port 0xc000(+0x1d9) [ 6610.720804] sony-laptop: sony_pic_call2(0x81 - 0xff): 0x00ff [ 6610.720896] sony-laptop: sony_pic_call1(0x82): 0xff0a [ 6610.720906] sony-laptop: event ([00] [ff]) at port 0xc000(+0x1d9) [ 6610.720928] PM: Adding info for platform:sony-laptop [ 6610.720985] sony-laptop: Sony Notebook Control Driver v0.6. [ 6610.720987] sony-laptop: method: name: _INI, args 0 [ 6610.720989] sony-laptop: method: name: PWAK, args 0 [ 6610.720990] sony-laptop: method: name: ECON, args 1 [ 6610.720992] sony-laptop: method: name: GBRT, args 0 [ 6610.720993] sony-laptop: method: name: SBRT, args 1 [ 6610.720994] sony-laptop: method: name: EAWK, args 1 [ 6610.720996] sony-laptop: method: name: SN00, args 1 [ 6610.720997] sony-laptop: method: name: SN01, args 0 [ 6610.720998] sony-laptop: method: name: SN02, args 1 [ 6610.721000] sony-laptop: method: name: SN03, args 1 [ 6610.721001] sony-laptop: method: name: SN04, args 0 [ 6610.721002] sony-laptop: method: name: SN05, args 1 [ 6610.721004] sony-laptop: method: name: SN06, args 1 [ 6610.721005] sony-laptop: method: name: SN07, args 1 [ 6610.721006] sony-laptop: method: name: SNIN, args 0 [ 6610.721008] sony-laptop: method: name: SNCF, args 2 [ 6610.721009] sony-laptop: method: name: SNNE, args 1 [ 6610.721010] sony-laptop: method: name: F100, args 0 [ 6610.721011] sony-laptop: method: name: F113, args 0 [ 6610.721013] sony-laptop: method: name: F101, args 0 [ 6610.721014] sony-laptop: method: name: F105, args 0 [ 6610.721015] sony-laptop: method: name: F114, args 0 [ 6610.721017] sony-laptop: method: name: F115, args 0 [ 6610.721019] sony-laptop: method: name: F11D, args 0 [ 6610.721021] sony-laptop: method: name: GPID, args 0 [ 6610.721022] sony-laptop: method: name: F119, args 0 [ 6610.721024] sony-laptop: method: name: F121, args 0 [ 6610.721026] sony-laptop: method: name: F122, args 0 [ 6610.721027] sony-laptop: method: name: F124, args 0 [ 6610.721029] sony-laptop: method: name: F125, args 0 [ 6610.721031] sony-laptop: method: name: F126, args 0 [ 6610.721032] sony-laptop: method: name: F128, args 0 [ 6610.721034] sony-laptop: method: name: HSC0, args 0 [ 6610.721036] sony-laptop: method: name: HSC1, args 0 [ 6610.721038] sony-laptop: method: name: HSC2, args 0 [ 6610.721040] sony-laptop: method: name: HSC3, args 1 [ 6610.721041] sony-laptop: method: name: HSC4, args 1 [ 6610.721043] sony-laptop: method: name: HOMP, args 0 [ 6610.721046] sony-laptop: Invoking _INI [ 6610.721843] sony-laptop: event ([ff] [ff]) at port 0xc000(+0x1d9) [ 6610.727742] PM: Adding info for No Bus:sony [ 6610.727811] sony-laptop: detected Sony Vaio Z Series [ 6610.747166] sony-laptop: Found PID getter: GPID [ 6679.162181] sony-laptop: sony_pic_call2(0x98 - 0xff): 0x00ff [ 6679.163129] sony-laptop: sony_pic_call1(0x82): 0xff0a [ 6679.163222] sony-laptop: event ([ff] [ff]) at port 0xc000(+0x1d9) [ 6687.417252] sony-laptop: sony_pic_call2(0xb0 - 0x01): 0x00ff [ 6687.417337] sony-laptop: sony_pic_call1(0x82): 0xff0a [ 6687.418321] sony-laptop: event ([ff] [ff]) at port 0xc000(+0x1d9) [ 6699.324272] sony-laptop: sony_pic_call2(0x96 - 0x01): 0x00ff [ 6699.324357] sony-laptop: sony_pic_call1(0x82): 0xff0a [ 6699.325340] sony-laptop: event ([ff] [ff]) at port 0xc000(+0x1d9) ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-11-04 13:21 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-03 9:41 [PATCH 0/7] sony-laptop for acpi-test Mattia Dongili 2008-11-03 9:41 ` [PATCH 1/7] [sony-laptop] merge Type4 into Type3 Mattia Dongili 2008-11-03 9:41 ` [PATCH 2/7] [sony-laptop] VGN-A317M hotkey support Mattia Dongili 2008-11-03 9:41 ` [PATCH 3/7] [sony-laptop] Eliminate BKL in ioctls Mattia Dongili 2008-11-03 9:41 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 Mattia Dongili 2008-11-03 9:41 ` [PATCH 5/7] [sony-laptop] call the extra enable function for SNC on Vaio Z Mattia Dongili 2008-11-03 9:41 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Mattia Dongili 2008-11-03 9:41 ` [PATCH 7/7] [sony-laptop] notify the hardware of a state change in wwanpower Mattia Dongili 2008-11-03 10:32 ` [PATCH 6/7] [sony-laptop] add control over wifi power in Sony laptops Matthew Garrett 2008-11-03 10:55 ` Sergey Yanovich 2008-11-03 10:57 ` Matthew Garrett 2008-11-04 8:22 ` [PATCH 4/7] [sony-laptop] detect the ICH9 chipset as Type3 ISHIKAWA Mutsumi 2008-11-04 13:21 ` Mattia Dongili 2008-11-03 11:17 ` [PATCH 0/7] sony-laptop for acpi-test Norbert Preining 2008-11-03 12:48 ` Mattia Dongili 2008-11-03 13:02 ` Norbert Preining
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox