[ltp] Re: [ANN] tp_smapi - a new Linux SMAPI driver
Volker Gropp
linux-thinkpad@linux-thinkpad.org
Mon, 5 Dec 2005 16:34:18 +0100
* On Mon, Dec 05, 2005 at 16:32:13 +0200, Shem Multinymous wrote:
> New version attached:
>
> 0.04 2005-12-05
> ----------------
> - Made start_charge_thresh work even with stop_start_thresh is
> not available.
>
>
> On 12/5/05, Shem Multinymous <multinymous@gmail.com> wrote:
> > On 12/5/05, Shem Multinymous <multinymous@gmail.com> wrote:
> > > * ThinkPad X40, T42p, G41
> > > work: start_charge_thresh, inhbit_charge
> > > don't work: stop_charge_thresh (not supported by hardware)
> >
> > Oops, it currently checks the stop theshold even when just setting the
> > start threshold, so if you have those models it will fair
> > unnecessarily. Expect a new version soon (or comment out the relevant
> > code in set_threshold).
Hi,
i can confirm it to work like expected on X40 23718NG running
2.6.15-rc5 suspend2-rc13 with this small patch applied to get it
compiled:
--- tp_smapi.c-old 2005-12-05 16:18:53.416917776 +0100
+++ tp_smapi.c 2005-12-05 16:19:13.218907416 +0100
@@ -42,6 +42,10 @@
#include <linux/version.h>
#include <asm/uaccess.h>
+#ifndef platform_bus_type
+#include <linux/platform_device.h>
+#endif
+
#define TP_DESC "ThinkPad SMAPI Support"
#define TP_DIR "smapi"
Status:
- cat and echo /sys/devices/platform/smapi/start_charge_thresh:
works and the setting takes effect as expected, only bug is in dmesg
old setting is always reported as "0" (tp_smapi: changed start
threshold of battery 0 to 70) when it was 90 to 70 actually.
- cat and echo /sys/devices/platform/smapi/inhibit_charge:
works aswell, and stops/starts charging as expected, the "0" to X
applies here aswell.
- cat and echo /sys/devices/platform/smapi/stop_charge_thresh:
throws "Function not implemented" as expected, i cant remember to have
this setting in windows.
Thanks for your fixes, now we can report the X40 to be almost 99% linux
compatible (only sd reader support is missing as far as i know).
One thing i would like to have aswell is cycle count, but that would be
only some "nice to have" and nothing really needed.
Volker Gropp