Re: hdaps (accelerator) driver for thinkpads

From: Tobias Kirschstein <lev_at_nupfel.de>
Date: Thu, 27 Mar 2008 23:51:24 +0100
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
_at_ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
awk -f _at_/tools/makeobjops.awk _at_/dev/pci/pci_if.m -h
awk -f _at_/tools/makeobjops.awk _at_/kern/bus_if.m -h
awk -f _at_/tools/makeobjops.awk _at_/kern/device_if.m -h
cc -O2 -fno-strict-aliasing -pipe -march=nocona -Werror -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -I. -I_at_ -I_at_/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_at_ -I_at_/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

Received on Thu Mar 27 2008 - 21:51:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:29 UTC