Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmaports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmaports
Merge requests
!5857
linux-postmarketos-omap: n900: bq27xxx: generate events in changes to status flags
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
linux-postmarketos-omap: n900: bq27xxx: generate events in changes to status flags
sicelo/pmaports:bq27cache
into
master
Overview
4
Commits
1
Pipelines
2
Changes
2
All threads resolved!
Hide all comments
Merged
sicelo
requested to merge
sicelo/pmaports:bq27cache
into
master
4 months ago
Overview
4
Commits
1
Pipelines
2
Changes
2
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
master
version 1
c8c488eb
4 months ago
master (base)
and
latest version
latest version
f7f49b34
1 commit,
4 months ago
version 1
c8c488eb
1 commit,
4 months ago
2 files
+
36
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
device/community/linux-postmarketos-omap/0010-power-supply-bq27xxx_battery-do-not-update-cached-fl.patch
0 → 100644
+
33
−
0
Options
From f9c5d5284a554ed3e2f3a60e05d3538e0653a3a7 Mon Sep 17 00:00:00 2001
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Date: Sun, 27 Oct 2024 21:47:48 +0200
Subject: [PATCH] power: supply: bq27xxx_battery: do not update cached flags
prematurely
Commit 243f8ffc883a1 ("power: supply: bq27xxx_battery: Notify also about
status changes") intended to notify userspace when the status changes,
based on the flags register. However, the cached state is updated too
early, before the flags are tested for any changes. Remove the premature
update.
Fixes: 243f8ffc883a1 ("power: supply: bq27xxx_battery: Notify also about status changes")
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
drivers/power/supply/bq27xxx_battery.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 40c5ac7a1118..b2c65fe43d5c 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1913,7 +1913,6 @@
static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
cache.flags = -1; /* read error */
if (cache.flags >= 0) {
cache.capacity = bq27xxx_battery_read_soc(di);
- di->cache.flags = cache.flags;
/*
* On gauges with signed current reporting the current must be
--
2.45.2
Loading