Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysfs current_now doesn't report negative values during discharge #468

Open
jacobgkau opened this issue Jun 19, 2024 · 0 comments
Open

sysfs current_now doesn't report negative values during discharge #468

jacobgkau opened this issue Jun 19, 2024 · 0 comments

Comments

@jacobgkau
Copy link
Member

Kernel documentation states regarding the /sys/class/power_supply/<supply_name>/current_now value:

Negative values are used for discharging batteries, positive values for charging batteries and for USB IBUS current.

However, we currently report positive (or unsigned) values for a battery whether we're charging or discharging.

@crawfxrd says it's a u16 in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant