hdaps (accelerator) driver for thinkpads

Tobias Kirschstein lev at nupfel.de
Thu Mar 27 15:51:51 PDT 2008


hi mike,

> here is a new Version from 2006 which depends on the Linux tp_smapi
> 0.30 by Shem Multinymous. It works on my T42 nicely.
> But there is still no hdaps support for FreeBSD. It only a device
> driver for the accelerometer.
> 
> I didn't have a look at it since over a yer now. Use at your own risk.

thank you very much!
unfortunately compiling the driver didn't work for me:

--------------------------------------------
$ make
Warning: Object directory not changed from original /usr/home/lev/src/x60t/thinkpad_ec-030_04092006
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
cc -O2 -fno-strict-aliasing -pipe -march=nocona -Werror -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c thinkpad_ec.c
cc -O2 -fno-strict-aliasing -pipe -march=nocona -Werror -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c smbios.c
cc1: warnings being treated as errors
smbios.c: In function 'smbios_find_eps':
smbios.c:82: warning: cast to pointer from integer of different size
smbios.c:83: warning: cast to pointer from integer of different size
smbios.c: In function 'smbios_cksum':
smbios.c:101: warning: cast to pointer from integer of different size
smbios.c: In function 'smbios_FindStructure':
smbios.c:124: warning: cast to pointer from integer of different size
smbios.c:126: warning: cast to pointer from integer of different size
smbios.c:128: warning: cast to pointer from integer of different size
smbios.c:134: warning: cast to pointer from integer of different size
smbios.c:136: warning: cast to pointer from integer of different size
smbios.c: In function 'smbios_get_string':
smbios.c:161: warning: cast to pointer from integer of different size
smbios.c:164: warning: cast to pointer from integer of different size
smbios.c:167: warning: cast to pointer from integer of different size
smbios.c:178: warning: cast to pointer from integer of different size
smbios.c: In function 'smbios_init':
smbios.c:201: warning: cast to pointer from integer of different size
smbios.c:205: warning: cast to pointer from integer of different size
smbios.c: In function 'smbios_find_oem_substring':
smbios.c:271: warning: cast to pointer from integer of different size
*** Error code 1
--------------------------------------------

i had to add

CFLAGS += -Wno-error

to the Makefile to get it compiled but then loading the first module
"thinkpad_ec.ko" crashes my x60t completely :(
i haven't looked any further into the code yet, but it seems that it
supplies the same functionality (sysctls and some mouse/joystick
devices).
i had problems using mtx_lock in the driver i sent. commenting this out
made at least the sysctls work in my version:

--------------------------------------------
$ sysctl hw.accel
hw.accel.data: 2 509 511 57 510 511 57 7 128
hw.accel.aps_sensibility: 255
--------------------------------------------

but the devices are still not usable without resulting in a core dump...


-- 
ciao,
lev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 250 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080327/411cac9d/attachment.pgp


More information about the freebsd-current mailing list