libsmbios icon indicating copy to clipboard operation
libsmbios copied to clipboard

Kernel interface for battery controls

Open awehrfritz opened this issue 5 years ago • 9 comments

Are there any plans to add support for interacting with the battery controls in the Dell kernel driver (analog to the implementation in libsmbios, just in the kernel)?

As I have outlined already in an issue for the TLP utility (https://github.com/linrunner/TLP/issues/321#issuecomment-575653531 and https://github.com/linrunner/TLP/issues/321#issuecomment-576059832), Google has introduced a set of new sysfs attributes and infrastructure that makes it fairly easy to implement extended controls for power supplies, and in particular batteries (for details see Documentation/ABI/testing/sysfs-class-power and drivers/power/supply/power_supply_sysfs.c).

This appears to be primarily aimed at their new Embedded Controller (Wilco EC) on the chromebook platform (drivers/power/supply/wilco-charger.c and Documentation/ABI/testing/sysfs-class-power-wilco), but in particular the charge modes and battery charging threshold settings in custom mode of the Wilco EC map directly to the ones found in Dell laptops.

Support for Huawei and Asus laptops to use this new sysfs interface has also been implemented, and the Lenovo driver may also be ported over soon.

Last, if there is a better place to report feature request for the Dell laptop driver in the Linux kernel, I would appreciate if someone could direct to the right place/forum for that.

awehrfritz avatar Feb 01 '20 15:02 awehrfritz

I think it makes fine sense to do. It's probably best to raise on the platform drivers x86 mailing list to see if anyone is working on it or intending on working on it yet. Pali Rohar has done a lot of the work on that driver already.

superm1 avatar Feb 01 '20 16:02 superm1

Just to keep track of this also here, there are patches now which implement this: https://lkml.org/lkml/2020/7/29/87

awehrfritz avatar Oct 02 '20 16:10 awehrfritz

@superm1 continue my comment from my expirience to avoid comment on closed issue. I'm trying config threshold for my XPS 9300.

fggarcia avatar Nov 21 '20 04:11 fggarcia

Any news on this? TLP 1.4 will have the infrastructure to support charge thresholds for Non-ThinkPads.

linrunner avatar Apr 21 '21 08:04 linrunner

@linrunner @Goperry was working on a kernel interface for it. @goperry can you provide an update?

superm1 avatar Apr 21 '21 12:04 superm1

@linrunner @GoPerry was working on a kernel interface for it. @GoPerry can you provide an update? @linrunner @superm1 I have another kernel patch that will need to be submitted soon. It will have the feature to support battery thresholds setting.

GoPerry avatar Apr 29 '21 08:04 GoPerry

@superm1 @GoPerry : is the topic still being worked on?

linrunner avatar Dec 07 '21 17:12 linrunner

Neither of us are at Dell anymore. @dell-client-linux would need to comment.

superm1 avatar Dec 07 '21 17:12 superm1

Hi, still interested in this issue. Can Dell provide us updates about this kernel support?

gagath avatar May 08 '22 08:05 gagath