-
Notifications
You must be signed in to change notification settings - Fork 1.4k
power/battery: battery gauge driver support #17487
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
Conversation
upper and lower drivers use int data type Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
battery drivers used unification unit Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
b5c5828 to
aa15383
Compare
acassis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yezhonghui2024 please add Documentation/ about this new feature
linguini1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide proper test description and results.
jerpelea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add documentation
aa15383 to
af5c67e
Compare
|
@acassis Add Document in Documentation/components/drivers/special/power/battery/fakegauge.rst |
af5c67e to
da39cea
Compare
7629818 to
ea02423
Compare
|
usage: 2.user call ioctl can get value |
This is great, but what ioctl call results in these values/logs? Can you put these logs and that information in your test section please? If you have some sample code that generated this output that would be good. |
ea02423 to
a049668
Compare
05b6ded to
4338f8b
Compare
I used framework charged, the code cannot be simply converted into a sample |
Okay, I understand. However, more information than what's provided is needed for the testing section. |
we can test like this: } |
Documentation/components/drivers/special/power/battery/fakegauge.rst
Outdated
Show resolved
Hide resolved
realize a fake gauge to support powermanger Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
new add a macro for charge full Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
set time interval to control report frequency Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
add ioctl cmd Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
4338f8b to
7943bc9
Compare
@linguini1 See if it's OK? |
Thank you for the code sample! Can you please put this and the other testing information from your comments under the "testing" section in your PR description? It looks good to me. |
@linguini1 here is tool let you interactive with battery driver: |
|
@linguini1 Now I add test Result in "test" Section under qemu |
Looks good! I just modified your description to put the code inside code blocks (with markdown it's three backtick ` characters around the code) |
@linguini1 could you merge the pr? |
Note: Please adhere to Contributing Guidelines.
Summary
Unify the data types of attributes in the driver framework layer and
add a new driver for dummy power levels to support power management.
Impact
Simplify driver usage and reduce data type conversions, fakeguage can
used when device is debug
Testing
1.open defconfig
CONFIG_BATTERY_FAKEGAUGE=y