====== Thinkpad smapi and Realtime Linux ====== The [[http://sourceforge.net/projects/tpctl/files/tp_smapi|tp_smapi]] driver provides for Battery charge/discharge control and improved stability for the HDAPS driver. However the latest version (as of writing 0.40) does not work with a [[http://www.kernel.org/pub/linux/kernel/projects/rt/|real-time patched Linux-kernel]]. The problem is that rt-linux uses a new mechanism for mutex-locking, which allows preemption and is incompatible with current Linux-mainline. In order to get the tp_smapi driver compile with rt-linux you need to replace the MUTEX locks. I came up with a simple patch that applies to tp_smapi 0.40 to just do that. * {{:blog:tpsmapi:tp_smapi-rt.diff}} Tested with linux 2.6.31.6-rt19. More information on tp_smapi can be found at http://www.thinkwiki.org/wiki/Tp_smapi Enjoy. {{tag>development linux}}