acpi_sony.c (193530) | acpi_sony.c (203622) |
---|---|
1/*- 2 * Copyright (c) 2004 Takanori Watanabe 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Takanori Watanabe 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_sony.c 193530 2009-06-05 18:44:36Z jkim $"); | 28__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_sony.c 203622 2010-02-07 18:36:30Z gavin $"); |
29 30#include "opt_acpi.h" 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34 35#include <contrib/dev/acpica/include/acpi.h> 36 37#include "acpi_if.h" 38#include <sys/module.h> 39#include <dev/acpica/acpivar.h> 40#include <sys/sysctl.h> 41 42#define _COMPONENT ACPI_OEM 43ACPI_MODULE_NAME("Sony") 44 | 29 30#include "opt_acpi.h" 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34 35#include <contrib/dev/acpica/include/acpi.h> 36 37#include "acpi_if.h" 38#include <sys/module.h> 39#include <dev/acpica/acpivar.h> 40#include <sys/sysctl.h> 41 42#define _COMPONENT ACPI_OEM 43ACPI_MODULE_NAME("Sony") 44 |
45#define ACPI_SONY_GET_BRIGHTNESS "GBRT" 46#define ACPI_SONY_SET_BRIGHTNESS "SBRT" | |
47#define ACPI_SONY_GET_PID "GPID" 48 49/* 50 * SNY5001 | 45#define ACPI_SONY_GET_PID "GPID" 46 47/* 48 * SNY5001 |
49 * This is the ACPI handle for the "Sony Notebook Control" driver under 50 * Windows. 51 * It provides several methods within the ACPI namespace, including: |
|
51 * [GS]BRT [GS]PBR [GS]CTR [GS]PCR [GS]CMI [CDPW GCDP]? GWDP PWAK PWRN 52 * | 52 * [GS]BRT [GS]PBR [GS]CTR [GS]PCR [GS]CMI [CDPW GCDP]? GWDP PWAK PWRN 53 * |
54 * SNY6001 55 * This is the ACPI handle for the "Sony Programmable I/O" driver under 56 * Windows. 57 * It is not yet supported by this driver, but provides control over the 58 * power to the bluetooth, built-in camera and HSDPA modem devices in some 59 * laptops, and also allows some control of the fan speed. |
|
53 */ 54 55struct acpi_sony_softc { 56 int pid; 57}; 58static struct acpi_sony_name_list 59{ 60 char *nodename; 61 char *getmethod; 62 char *setmethod; 63 char *comment; 64} acpi_sony_oids[] = { 65 { "brightness", "GBRT", "SBRT", "Display Brightness"}, | 60 */ 61 62struct acpi_sony_softc { 63 int pid; 64}; 65static struct acpi_sony_name_list 66{ 67 char *nodename; 68 char *getmethod; 69 char *setmethod; 70 char *comment; 71} acpi_sony_oids[] = { 72 { "brightness", "GBRT", "SBRT", "Display Brightness"}, |
66 { "ctr", "GCTR", "SCTR", "??"}, | 73 { "brightness_default", "GPBR", "SPBR", "Default Display Brightness"}, 74 { "contrast", "GCTR", "SCTR", "Display Contrast"}, 75 { "bass_gain", "GMGB", "SMGB", "Multimedia Bass Gain"}, |
67 { "pcr", "GPCR", "SPCR", "???"}, 68#if 0 | 76 { "pcr", "GPCR", "SPCR", "???"}, 77#if 0 |
69 { "cmi", "GCMI", "SCMI", "????"}, | 78 { "cmi", "GCMI", "SCMI", "???"}, |
70#endif | 79#endif |
71 { "wdp", "GWDP", NULL, "?????"}, | 80 { "wdp", "GWDP", NULL, "???"}, |
72 { "cdp", "GCDP", "CDPW", "CD Power"}, /*shares [\GL03]&0x8 flag*/ 73 { "azp", "GAZP", "AZPW", "Audio Power"}, | 81 { "cdp", "GCDP", "CDPW", "CD Power"}, /*shares [\GL03]&0x8 flag*/ 82 { "azp", "GAZP", "AZPW", "Audio Power"}, |
83 { "lnp", "GLNP", "LNPW", "LAN Power"}, |
|
74 { NULL, NULL, NULL } 75}; 76 77static int acpi_sony_probe(device_t dev); 78static int acpi_sony_attach(device_t dev); 79static int acpi_sony_detach(device_t dev); 80static int sysctl_acpi_sony_gen_handler(SYSCTL_HANDLER_ARGS); 81 --- 91 unchanged lines hidden --- | 84 { NULL, NULL, NULL } 85}; 86 87static int acpi_sony_probe(device_t dev); 88static int acpi_sony_attach(device_t dev); 89static int acpi_sony_detach(device_t dev); 90static int sysctl_acpi_sony_gen_handler(SYSCTL_HANDLER_ARGS); 91 --- 91 unchanged lines hidden --- |