[ltp] smapi not/wrongly accepting charge_thresh values

Peter G. (nephros) linux-thinkpad@linux-thinkpad.org
Thu, 31 May 2012 10:39:02 +0200 (CEST)


Hi all,

I'm on a x100e and having trouble with tp_smapi.

When I try to set a charge threshold, the corresponding other one follows suit, one 
percentage point apart.

To clarify, this is what happens:

cd /sys/devices/platform/smapi/BAT0
cat *thresh* ; echo -n 20 > start_charge_thresh ; cat *thresh* ; echo -n 80 > stop_charge_thresh ; cat *thresh*
20
19
20
19
81
80

dmesg during this looks like so:
smapi smapi: set_real_thresh: set start to 19 for bat=0
smapi smapi: smapi_request: req_in: BX=2116 CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=2116 CX=313 DX=b0 DI=0 SI=0 r=0
smapi smapi: smapi_request: req_in: BX=211a CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=211a CX=313 DX=b0 DI=0 SI=0 r=0
smapi smapi: smapi_request: req_in: BX=2116 CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=2116 CX=313 DX=b0 DI=0 SI=0 r=0
smapi smapi: smapi_request: req_in: BX=211a CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=211a CX=313 DX=b0 DI=0 SI=0 r=0
smapi smapi: smapi_request: req_in: BX=211a CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=211a CX=313 DX=b0 DI=0 SI=0 r=0
smapi smapi: smapi_request: req_in: BX=211b CX=150 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=211b CX=150 DX=b0 DI=0 SI=0 r=0
smapi smapi: set_real_thresh: set stop to 80 for bat=0
smapi smapi: smapi_request: req_in: BX=2116 CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=2116 CX=350 DX=b0 DI=0 SI=0 r=0
smapi smapi: smapi_request: req_in: BX=211a CX=100 DI=0 SI=0
smapi smapi: smapi_request: req_out: AX=80 BX=211a CX=350 DX=b0 DI=0 SI=0 r=0

Can someone enlighten me what is wrong?

Kernel version: 3.0.29-tuxonice 
smapi version:0.41 from Gentoo
TP firmware:
 	BIOS Revision: 1.50
 	Firmware Revision: 1.36
 	Product Name: 2876W1U
 	Version: ThinkPad X100e
Battery:
 	# cat manufacturer model manufacture_date
 	SANYO
 	42T4785
 	2010-02-23

I know for a fact that this used to be working fine a couple of months 
ago with basically the same setup, except some older kernel.

Thanks,
   Peter G.

-- 
"I do not think the way you think I think."
     -- Kai, last of the Brunnen G