IBM ThinkPad Accelerometer, aka "Active Protection System"

Announced in November 2003;  Probably shipped in 2004 March

Analog Devices Inc (ADI) make the sensor and boast about it in their Press Releases

Probably an ADXL311 originally and now switched to ADXL320 since the first is getting deprecated.

These eat 3 volts at about 400 micro-amps and give 2 analogue outputs back, X and Y.

At rest in the horizontal plane these will both be measuring 1g .

Falling is more than than this, rising is less than this.

Tilt is collected as gavity decreases in a sin() as the chip is tilted through 90^ degrees.

Still puzzled about *where* the values are being read in from

Initial assumption was a chip on the I2C/SMBUS.  But since it's a 2-channel a-to-d, could be anyway
---eg, existing fan monitoring chip.

Windows drivers read in 28-bytes via an IOCTL(0x733fc) on "\ShockMgr" .  (See shockprf.sys)

Apple is shipping a 2-axis sensor in new PowerBooks.  Acccessed via the smbus.
dead easy since we have (some) info.

Referred to as "Sudden Motion Sensor".  and "Mobile Motion Module".  and "Apple Motion Sensor"
uni-n@f8000000/i2c@f8001000/i2c-bus@1/accelerometer@b0
pci@f2000000/mac-io@17/gpio@50/accelerometer-1@13
pci@f2000000/mac-io@17/gpio@50/accelerometer-2@14

Compaq has a sensor in some of their Tablet PCs to tell which way the display is rotated/pointing (Also ADI)

Windows Driver:
===============

From:
  ftp://ftp.software.ibm.com/pc/pccbbs/mobiles_pdf/aps2mst.pdf

    The active protection system employs a heuristic learning algorithm to track
  system orientation. The Shock Manager, a system thread created by the
  Shockprf.sys of a kernel mode device driver, analyzes the variations in acceleration
  and collects system orientation data into the Shock History Database. The collected
  data is then used to tune sensitivity and predict excessive shocks. This tuning is
  important in minimizing the disk performance penalty caused by prediction
  failures. Once the Shock Manager detects a certain variation which may be
  equivalent to one usually seen just before receiving an excessive shock, the Shock
  Manager acts immediately to stop the hard disk drive.

The writes to 0xed are just to the ("non-existant") delay port.

The other two ports are super-I/O controller/IDE ports and I think the
write is to stop the drive and then stop the IDE Bus.