ray(4) removal
to make mpi's life a tad easier and also lose some weight, i'd like to move rat(4) to the attic. mpi, kettenis, jsg and henning agree. i'll commit the diff if noone objects. henning has also suggested to remove the pre-wifi era cnw(4). if there's interest i can cook a diff for that as well, but it doesn't seem to get in the way at the moment. Index: arch/amd64/conf/GENERIC === RCS file: /cvs/openbsd/src/sys/arch/amd64/conf/GENERIC,v retrieving revision 1.343 diff -u -p -r1.343 GENERIC --- arch/amd64/conf/GENERIC 12 Aug 2013 04:11:52 - 1.343 +++ arch/amd64/conf/GENERIC 13 Aug 2013 13:10:57 - @@ -472,7 +472,6 @@ wi* at pcmcia? # WaveLAN IEEE 802.11DS an*at pci? # Aironet IEEE 802.11DS an*at pcmcia? # Aironet IEEE 802.11DS cnw* at pcmcia? # Xircom Netwave -ray* at pcmcia? # Raylink Aviator2.4/Pro 802.11FH iwi* at pci? # Intel PRO/Wireless 2200BG/2915ABG wpi* at pci? # Intel PRO/Wireless 3945ABG iwn* at pci? # Intel WiFi Link 4965/5000/1000/6000 Index: arch/amd64/conf/RAMDISK === RCS file: /cvs/openbsd/src/sys/arch/amd64/conf/RAMDISK,v retrieving revision 1.55 diff -u -p -r1.55 RAMDISK --- arch/amd64/conf/RAMDISK 15 Mar 2012 20:06:02 - 1.55 +++ arch/amd64/conf/RAMDISK 13 Aug 2013 13:10:57 - @@ -217,7 +217,6 @@ nfe*at pci? # NVIDIA nForce Ethernet #wi* at pcmcia? # WaveLAN IEEE 802.11DS #an* at pcmcia? # Aironet IEEE 802.11DS #cnw* at pcmcia? # Xircom Netwave -#ray* at pcmcia? # Raylink Aviator2.4/Pro 802.11FH # Media Independent Interface (mii) drivers #exphy*at mii? # 3Com internal PHYs Index: arch/amd64/conf/RAMDISK_CD === RCS file: /cvs/openbsd/src/sys/arch/amd64/conf/RAMDISK_CD,v retrieving revision 1.125 diff -u -p -r1.125 RAMDISK_CD --- arch/amd64/conf/RAMDISK_CD 5 Apr 2013 05:45:09 - 1.125 +++ arch/amd64/conf/RAMDISK_CD 13 Aug 2013 13:10:57 - @@ -291,7 +291,6 @@ wi* at pci? # WaveLAN IEEE 802.11DS wi*at pcmcia? # WaveLAN IEEE 802.11DS an*at pcmcia? # Aironet IEEE 802.11DS #cnw* at pcmcia? # Xircom Netwave -#ray* at pcmcia? # Raylink Aviator2.4/Pro 802.11FH ipw* at pci? # Intel PRO/Wireless 2100 iwi* at pci? # Intel PRO/Wireless 2200BG/2915ABG wpi* at pci? # Intel PRO/Wireless 3945ABG Index: arch/i386/conf/GENERIC === RCS file: /cvs/openbsd/src/sys/arch/i386/conf/GENERIC,v retrieving revision 1.748 diff -u -p -r1.748 GENERIC --- arch/i386/conf/GENERIC 12 Aug 2013 04:11:52 - 1.748 +++ arch/i386/conf/GENERIC 13 Aug 2013 13:10:57 - @@ -612,7 +612,6 @@ an* at pci? # Aironet IEEE 802.11DS an*at isapnp? # Aironet IEEE 802.11DS an*at pcmcia? # Aironet IEEE 802.11DS #cnw* at pcmcia? # Xircom Netwave -ray* at pcmcia? # Raylink Aviator2.4/Pro 802.11FH ipw* at pci? # Intel PRO/Wireless 2100 iwi* at pci? # Intel PRO/Wireless 2200BG/2915ABG wpi* at pci? # Intel PRO/Wireless 3945ABG Index: arch/i386/conf/RAMDISK === RCS file: /cvs/openbsd/src/sys/arch/i386/conf/RAMDISK,v retrieving revision 1.180 diff -u -p -r1.180 RAMDISK --- arch/i386/conf/RAMDISK 14 Jun 2013 01:00:24 - 1.180 +++ arch/i386/conf/RAMDISK 13 Aug 2013 13:10:57 - @@ -238,7 +238,6 @@ wi* at pci? # WaveLAN IEEE 802.11DS wi*at pcmcia? # WaveLAN IEEE 802.11DS #an* at pcmcia? # Aironet IEEE 802.11DS #cnw* at pcmcia? # Xircom Netwave -#ray* at pcmcia? # Raylink Aviator2.4/Pro 802.11FH # Media Independent Interface (mii) drivers exphy* at mii? # 3Com internal PHYs Index: arch/i386/conf/RAMDISKB === RCS file: /cvs/openbsd/src/sys/arch/i386/conf/RAMDISKB,v retrieving revision 1.121 diff -u -p -r1.121 RAMDISKB --- arch/i386/conf/RAMDISKB 15 Mar 2012 20:06:03 - 1.121 +++ arch/i386/conf/RAMDISKB 13 Aug 2013 13:10:57 - @@ -247,7 +247,6 @@ nfe*at pci? # NVIDIA nForce Ethernet #wi* at pcmcia? # WaveLAN IEEE 802.11DS
Re: add lid status sensor to acpibtn
Date: Tue, 13 Aug 2013 00:00:19 +0200 From: Landry Breuil lan...@rhaalovely.net On Mon, Aug 12, 2013 at 06:01:25PM +0200, David Coppa wrote: On Mon, Aug 12, 2013 at 5:40 PM, Landry Breuil lan...@rhaalovely.net wrote: Hi, this diff adds a sensor for acpibtn to show lid status. This allows userland to monitor/react on lid close/open events, in case one is not using machdep.lidsuspend. I know sysutils/upower can make use of this, i just need to add the corresponding code there. comments ? I wonder if/how the case when aml_evalinteger() fails should be handled in acpibtn_attach().. Where's the diff? Err.. here it is. ok kettenis@ Wonder if this should change the description to reflect the lid status like acpidock0 does for the dock status. But that can be done as a seperate diff. Index: acpibtn.c === RCS file: /cvs/src/sys/dev/acpi/acpibtn.c,v retrieving revision 1.34 diff -u -r1.34 acpibtn.c --- acpibtn.c 2 Jan 2011 04:56:57 - 1.34 +++ acpibtn.c 12 Aug 2013 15:35:35 - @@ -46,6 +46,9 @@ struct acpi_softc *sc_acpi; struct aml_node *sc_devnode; + struct ksensor sc_sens; + struct ksensordev sc_sensdev; + int sc_btn_type; #define ACPIBTN_UNKNOWN 0 #define ACPIBTN_LID 1 @@ -123,6 +126,7 @@ struct acpibtn_softc*sc = (struct acpibtn_softc *)self; struct acpi_attach_args *aa = aux; struct acpi_lid *lid; + int64_t lid_open; sc-sc_acpi = (struct acpi_softc *)parent; sc-sc_devnode = aa-aaa_node; @@ -143,6 +147,20 @@ printf(: %s\n, sc-sc_devnode-name); + if (sc-sc_btn_type == ACPIBTN_LID) { + strlcpy(sc-sc_sensdev.xname, DEVNAME(sc), + sizeof(sc-sc_sensdev.xname)); + strlcpy(sc-sc_sens.desc, lid open, + sizeof(sc-sc_sens.desc)); + sc-sc_sens.type = SENSOR_INDICATOR; + sensor_attach(sc-sc_sensdev, sc-sc_sens); + sensordev_install(sc-sc_sensdev); + + aml_evalinteger(sc-sc_acpi, sc-sc_devnode, + _LID, 0, NULL, lid_open); + sc-sc_sens.value = lid_open; + } + aml_register_notify(sc-sc_devnode, aa-aaa_dev, acpibtn_notify, sc, ACPIDEV_NOPOLL); } @@ -179,11 +197,12 @@ * _LID method. 0 means the lid is closed and we * should go to sleep. */ - if (lid_suspend == 0) - break; if (aml_evalinteger(sc-sc_acpi, sc-sc_devnode, _LID, 0, NULL, lid)) return (0); + sc-sc_sens.value = lid; + if (lid_suspend == 0) + break; if (lid == 0) goto sleep; #endif /* SMALL_KERNEL */