History log of /netbsd-current/sys/dev/acpi/thinkpad_acpi.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.57 27-Apr-2024 christos

Expose a sysctl interface hw.acpi.thinkpad<M>.bat[<N>].<behavior> to control
some aspects of battery charging behavior on supported systems:

charge_start
threshold below which to start charging (in %, 0-99)

charge_stop
threshold above which to stop charging (in %, 1-100)

force_discharge
discharge while on AC power, e.g., for calibration

charge_inhibit
inhibit charging while on AC power

From Malte Dehling


# 1.56 27-Apr-2024 christos

thinkpad cosmetic patches (Malte Dehling)


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.55 12-Aug-2022 riastradh

thinkpad(4): Don't detach on shutdown.

There's no important state that needs to be recorded, or resources
that need to be relinquished, so detach-on-shutdown isn't necessary.

At the moment, detach-on-shutdown is actually harmful here: if
shutdown is triggered by a sysmon power switch event, then
config_detach will be called from the sysmon taskqueue, but
thinkpad_detach has to wait for ACPI notifiers to finish running
which means waiting for the sysmon taskqueue -> deadlock or crash.

We should maybe arrange to do config_detach from a thread other than
the sysmon taskqueue thread to avoid this class of problems -- but
for now, thinkpad(4) has no reason to detach on shutdown anyway, so
let's take the easy path.

Note: There are many drivers that set DVF_DETACH_SHUTDOWN which
probably shouldn't; the flag means the kernel _will_ detach on
shutdown, not that it _may_. Even those that do need to record state
or relinquish resources might be better served by pmf shutdown hooks
which can skip freeing software resources for faster shutdown.


# 1.54 31-Dec-2021 riastradh

thinkpad(4): Omit workaround for acpiec_bus_read.

acpiec_bus_read now initializes the whole ACPI_INTEGER like its
signature suggests, so we don't need to pick out the low bits of the
result or carefully avoid undefined behaviour from uninitialized
stack garbage.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.53 30-May-2021 riastradh

thinkpad(4): Fix evaluation of MHKA on version 2 devices.

Need to pass an argument.


# 1.52 29-May-2021 riastradh

Add some more Thinkpad hotkeys.


# 1.51 29-May-2021 riastradh

thinkpad(4): Add dtrace probe for hotkey events.


# 1.50 29-May-2021 riastradh

thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
# 1.49 29-Jan-2021 thorpej

branches: 1.49.4; 1.49.6;
Use acpi_compatible_match().


# 1.48 17-May-2020 mlelstv

branches: 1.48.2;
With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

branches: 1.46.18; 1.46.24;
Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


# 1.55 12-Aug-2022 riastradh

thinkpad(4): Don't detach on shutdown.

There's no important state that needs to be recorded, or resources
that need to be relinquished, so detach-on-shutdown isn't necessary.

At the moment, detach-on-shutdown is actually harmful here: if
shutdown is triggered by a sysmon power switch event, then
config_detach will be called from the sysmon taskqueue, but
thinkpad_detach has to wait for ACPI notifiers to finish running
which means waiting for the sysmon taskqueue -> deadlock or crash.

We should maybe arrange to do config_detach from a thread other than
the sysmon taskqueue thread to avoid this class of problems -- but
for now, thinkpad(4) has no reason to detach on shutdown anyway, so
let's take the easy path.

Note: There are many drivers that set DVF_DETACH_SHUTDOWN which
probably shouldn't; the flag means the kernel _will_ detach on
shutdown, not that it _may_. Even those that do need to record state
or relinquish resources might be better served by pmf shutdown hooks
which can skip freeing software resources for faster shutdown.


# 1.54 31-Dec-2021 riastradh

thinkpad(4): Omit workaround for acpiec_bus_read.

acpiec_bus_read now initializes the whole ACPI_INTEGER like its
signature suggests, so we don't need to pick out the low bits of the
result or carefully avoid undefined behaviour from uninitialized
stack garbage.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.53 30-May-2021 riastradh

thinkpad(4): Fix evaluation of MHKA on version 2 devices.

Need to pass an argument.


# 1.52 29-May-2021 riastradh

Add some more Thinkpad hotkeys.


# 1.51 29-May-2021 riastradh

thinkpad(4): Add dtrace probe for hotkey events.


# 1.50 29-May-2021 riastradh

thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
# 1.49 29-Jan-2021 thorpej

branches: 1.49.4; 1.49.6;
Use acpi_compatible_match().


# 1.48 17-May-2020 mlelstv

branches: 1.48.2;
With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

branches: 1.46.18; 1.46.24;
Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


# 1.54 31-Dec-2021 riastradh

thinkpad(4): Omit workaround for acpiec_bus_read.

acpiec_bus_read now initializes the whole ACPI_INTEGER like its
signature suggests, so we don't need to pick out the low bits of the
result or carefully avoid undefined behaviour from uninitialized
stack garbage.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.53 30-May-2021 riastradh

thinkpad(4): Fix evaluation of MHKA on version 2 devices.

Need to pass an argument.


# 1.52 29-May-2021 riastradh

Add some more Thinkpad hotkeys.


# 1.51 29-May-2021 riastradh

thinkpad(4): Add dtrace probe for hotkey events.


# 1.50 29-May-2021 riastradh

thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
# 1.49 29-Jan-2021 thorpej

branches: 1.49.4; 1.49.6;
Use acpi_compatible_match().


# 1.48 17-May-2020 mlelstv

branches: 1.48.2;
With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

branches: 1.46.18; 1.46.24;
Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


# 1.53 30-May-2021 riastradh

thinkpad(4): Fix evaluation of MHKA on version 2 devices.

Need to pass an argument.


# 1.52 29-May-2021 riastradh

Add some more Thinkpad hotkeys.


# 1.51 29-May-2021 riastradh

thinkpad(4): Add dtrace probe for hotkey events.


# 1.50 29-May-2021 riastradh

thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too.


Revision tags: cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.49 29-Jan-2021 thorpej

Use acpi_compatible_match().


# 1.48 17-May-2020 mlelstv

branches: 1.48.2;
With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

branches: 1.46.18; 1.46.24;
Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


# 1.49 29-Jan-2021 thorpej

Use acpi_compatible_match().


Revision tags: thorpej-futex-base
# 1.48 17-May-2020 mlelstv

With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

branches: 1.46.18; 1.46.24;
Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


# 1.48 17-May-2020 mlelstv

With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

branches: 1.46.18; 1.46.24;
Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


# 1.47 05-Aug-2019 msaitoh

Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.


Revision tags: netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422
# 1.46 03-Apr-2016 mlelstv

Split toggles for bluetooth and wwan and use specific ACPI objects
where present.
Also make driver detach on shutdown.


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
# 1.45 23-Apr-2015 pgoyette

Update module dependencies for all the existing modules that depend on sysmon components.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.44 30-Mar-2013 christos

branches: 1.44.12;
reverse the polarity of the extra key option, always enabling them.


# 1.43 30-Mar-2013 christos

Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
(defflag) or just always enable it?


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
# 1.42 24-Nov-2012 riastradh

Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.

Tested on a W530. Lots of stuff is missing, though.


Revision tags: yamt-pagecache-base6
# 1.41 14-Aug-2012 jruoho

branches: 1.41.2;
Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).


# 1.40 15-Jul-2012 spz

add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.39 20-Jun-2011 pgoyette

branches: 1.39.2; 1.39.8;
Initialize sensor state before trying to register.


Revision tags: rmind-uvmplock-nbase rmind-uvmplock-base
# 1.38 06-Jun-2011 pgoyette

Don't update the value_{min,max} - these fields are not {low,high}-water
marks, and setting them without also updating the ENVSYS_FVALID_{MIN,MAX}
flags is quite pointless.


Revision tags: cherry-xenmp-base
# 1.37 14-Apr-2011 jruoho

branches: 1.37.2;
Simplify a little. No functional change.


# 1.36 14-Apr-2011 jruoho

Use the common power resource code. Also add a comment explaining
what can happen if we do not power on the resource upon resume from S3.


# 1.35 27-Mar-2011 mlelstv

Use wireless function key to toggle not only bluetooth but also
telephony (GPRS/UMTS/..) like other operating systems.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 1.34 16-Feb-2011 jruoho

Use ioconf for the module declarations.


# 1.33 18-Jan-2011 jmcneill

branches: 1.33.2;
Use AcpiOsReadPort/AcpiOsWritePort instead of inb/outb so I can get rid of
of the i386 and x86_64 ifdefs.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.32 31-Dec-2010 jruoho

branches: 1.32.2;
Use "temperature #" and "fan speed #" rather than "TMP#" and "FAN#" for the
sensor names. Remove white space. No functional change.


Revision tags: uebayasi-xip-base4
# 1.31 25-Oct-2010 jruoho

Bump WARNS to 4.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.30 15-Apr-2010 jruoho

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.


# 1.29 14-Apr-2010 jruoho

No need to spread the ACPICA type system any more than is necessary:

UINT8 -> uint8_t and UINT32 -> uint32_t.


Revision tags: yamt-nfs-mp-base9
# 1.28 05-Mar-2010 jruoho

branches: 1.28.2;
Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.


# 1.27 28-Feb-2010 jruoho

Introduce support for ACPI kernel modules.

Tested on couple of laptops.


# 1.26 24-Feb-2010 dyoung

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.


Revision tags: uebayasi-xip-base
# 1.25 31-Jan-2010 jruoho

branches: 1.25.2;
Add a detachment routine. While here, clarify the initialization of sensors.


# 1.24 30-Jan-2010 jruoho

Add the _COMPONENT definition for ACPI_DEBUG.


# 1.23 18-Jan-2010 jruoho

Add definitions for volume keys.

ok jmcneill@


# 1.22 08-Jan-2010 dyoung

Expand PMF_FN_* macros.


Revision tags: matt-premerge-20091211
# 1.21 29-Nov-2009 cegger

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?


Revision tags: jym-xensuspend-nbase
# 1.20 25-Sep-2009 dyoung

Use deviter_first()/deviter_next() instead of accessing alldevs
directly. Compile-tested, only.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.19 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.18 17-Feb-2009 jmcneill

Use aprint_debug


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.17 01-Nov-2008 hans

branches: 1.17.4;
Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.


Revision tags: netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.16 18-Oct-2008 jmcneill

branches: 1.16.2; 1.16.4;
Add fan sensor support, from Thomas E. Spanjaard


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.15 05-May-2008 jmcneill

branches: 1.15.6;
Use 2-clause license.


# 1.14 01-May-2008 simonb

Be consistent with #define<space-or-tab>.


Revision tags: yamt-nfs-mp-base
# 1.13 26-Apr-2008 jmcneill

branches: 1.13.2;
Use isareg constants in thinkpad_brightness_read where possible


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.12 29-Feb-2008 dyoung

branches: 1.12.2;
Use PMF_FN_ARGS, PMF_FN_PROTO.


Revision tags: hpcarm-cleanup-base nick-net80211-sync-base mjf-devfs-base
# 1.11 28-Jan-2008 jmcneill

branches: 1.11.2; 1.11.6;
The Thinkpad T61/x61 family powers off the USB power resource on resume
from S3 sleep. Until we get proper ACPI power resource support, simply
call \\_SB.PCI0.LPC.EC.PUBS._ON() on resume if the method exists.

Fixes kern/37279 by Steven M Bellovin.


Revision tags: bouyer-xeni386-base bouyer-xeni386-nbase
# 1.10 09-Jan-2008 xtraeme

branches: 1.10.2;
Remove useless returns at the end of void functions.


Revision tags: matt-armv6-base vmlocking2-base3
# 1.9 22-Dec-2007 jmcneill

branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8;
Move display switching out of the kernel; deliver this (and other) events
to sysmon so a powerd script can handle them.


# 1.8 22-Dec-2007 jmcneill

Add experimental display switching support.


# 1.7 22-Dec-2007 jmcneill

Only toggle bluetooth when the wireless button is pressed, simplifies
things and it seems I forgot that my laptop has a separate wifi switch.


# 1.6 21-Dec-2007 jmcneill

Add support for the WLAN / Bluetooth switch.


# 1.5 21-Dec-2007 jmcneill

Hook Thinkpad temperature sensors into envsys:

$ envstat -d thinkpad0
TMP0: 46.000 degC
TMP1: 39.000 degC
TMP2: 32.000 degC
TMP3: N/A
TMP4: 50.000 degC
TMP5: N/A
TMP6: 29.000 degC
TMP7: N/A


# 1.4 21-Dec-2007 jmcneill

Handle notifications in a separate thread, and ensure that the BIOS doesn't
try to play trick with us when we are trying to manage the brightness
keys.


# 1.3 21-Dec-2007 jmcneill

Typo in previous.


# 1.2 21-Dec-2007 jmcneill

Handle key repeat, and only match if MHKV returns an HKEY version we have
a chance of supporting.


# 1.1 21-Dec-2007 jmcneill

Add Thinkpad ACPI driver, for controlling hotkeys and display brightness.