[ltp] Thinkpad X30, 2.6.21-rc5, and the hdaps module.

Steve Thompson linux-thinkpad@linux-thinkpad.org
Sun, 8 Apr 2007 21:03:40 -0400 (EDT)


--0-1531013838-1176080620=:1785
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id: 
Content-Disposition: inline

I've been using 2.6.20 for a couple of weeks now and decided to upgrade to
the most recent pre-release for a couple of reasons:  when idle for a few
minutes, the kernel eats the first keystroke.  Presumably some of the
machine is going into standby.  Anyone else seen this phenomenon?

At any rate, the update to the kernel sources are are substantive and I
have no idea where to look to find out why the console will no longer
switch to VESA mode 0x317 on boot.  Well, it does switch modes but the
screen remains blank.  Any ideas of where to look before I go bug the
developers on the linux-kernel mailing list?

Another issue which I am interested in getting feedback on is the
speedstep functions in the kernel.  If the IBM bios is configured for
maximum power savings, the CPU frequency on battery will be as low as
200MHz (maxing out at  700 or so I think) whereas the linux kernel never
detects the processor as having more than two rates: 1197000 798000, as
shown in scaling_available_frequencies.  Obviously, this affects programs
like xine.  The workaround is to set the BIOS so it does not scale the
frequency back quite so far.  This, however, will tend to reduce battery
life.

Is there some known reason why the BIOS can set a wider range of CPU
frequencies than linux, or am I experiencing an artifact of the limited
experience IBM ACPID developers have with the X30 model?

Finally, I seem to have found that the X30 may actually have an
accelerometer similar to the one used in more recent models for hdaps.  I
*thought* I had read somewhere that it did, but I realise that was
incorrect.  Nevertheless, I saw that hdaps is only probed after the system
is checked against a whitelist.  Removing the whitelist check does not
magically get it working, but subsequent probing indicates that there
might  actually be a chip there.  

A quick modification to the hdaps.c module to dump the 30 bytes at 0x1600
where the hdaps ioports are supposed to live gives the following:

Apr  8 20:30:20 x30 vmunix: [ 2597.930000] hdaps: 0x1600: 
00 ff ff ff  50 ff ff ff  ff ff ff ff  ff ff ff ff
Apr  8 20:30:20 x30 vmunix: [ 2597.930000] hdaps: 0x1610: 
40 04 86 75  dd ae 5e eb  27 74 8b 14  4f e3 92 04
Apr  8 20:30:20 x30 vmunix: [ 2597.930000] hdaps: 0x1620: 
ff ff 00 00  ff fd 00 00  96 96 bd bd  00 00 00 00
Apr  8 20:30:20 x30 vmunix: [ 2597.930000] hdaps: hdaps_device_init()
failed : -6
Apr  8 20:30:20 x30 kernel: [ 2597.940000] input: hdaps as
/class/input/input13
Apr  8 20:30:20 x30 kernel: [ 2597.940000] hdaps: driver successfully
loaded.

Now I am no expert, but that sure looks like there's a bunch of registers
sitting there at the appropriate locations.  The initialization proceedure
in hdaps_device_init() does fail, of course, but I'm wondering if that's
because there's a different yet similar chip in this box, or because the
embedded controller does different things in more recent models.

At any rate, I'm wondering if the folks here who also have X30s would mind
checking what their machine shows when those bytes are dumped.  If you
don't mind doing this test, patch your hdaps.c file and then send me the
results.  If I am encouraged in thinking that I'm not seeing a phantom,
I'll poke about some more.


Regards,

Steve

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--0-1531013838-1176080620=:1785
Content-Type: application/octet-stream; name="hdaps-dump_registers.patch"
Content-Transfer-Encoding: base64
Content-Description: 2344026306-hdaps-dump_registers.patch
Content-Disposition: attachment; filename="hdaps-dump_registers.patch"

MjA4YTIwOSwyMzAKPiBzdGF0aWMgdm9pZCBoZGFwc19kdW1wKHZvaWQpCj4g
ewo+ICAgICBwcmludGsoS0VSTl9ERUJVRyAiaGRhcHM6IDB4MTYwMDogJTAy
eCAlMDJ4ICUwMnggJTAyeCAgJTAyeCAlMDJ4ICUwMnggJTAyeCAgJTAyeCAl
MDJ4ICUwMnggJTAyeCAgJTAyeCAlMDJ4ICUwMnggJTAyeFxuIiwgCj4gCSAg
IF9fZ2V0X2xhdGNoKDB4MTYwMCksIF9fZ2V0X2xhdGNoKDB4MTYwMSksIF9f
Z2V0X2xhdGNoKDB4MTYwMiksIF9fZ2V0X2xhdGNoKDB4MTYwMyksCj4gCSAg
IF9fZ2V0X2xhdGNoKDB4MTYwNCksIF9fZ2V0X2xhdGNoKDB4MTYwNSksI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