All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] profiles/battery: Reset battery value cache on disconnect
@ 2021-03-30 18:38 Sonny Sasaka
  2021-03-30 18:54 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Sonny Sasaka @ 2021-03-30 18:38 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sonny Sasaka, Alain Michaud

Due to cache in batt object, bluetoothd fails to update publish the
battery value after reconnection when the battery value does not change
compared to before reconnection. We should reset the battery percentage
cache on disconnect.

Reviewed-by: Alain Michaud <alainm@chromium.org>

---
 profiles/battery/battery.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
index 81f849d57..176d127f6 100644
--- a/profiles/battery/battery.c
+++ b/profiles/battery/battery.c
@@ -75,6 +75,7 @@ static void batt_free(struct batt *batt)
 static void batt_reset(struct batt *batt)
 {
 	batt->attr = NULL;
+	batt->percentage = -1;
 	gatt_db_unref(batt->db);
 	batt->db = NULL;
 	bt_gatt_client_unref(batt->client);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] profiles/battery: Reset battery value cache on disconnect
  2021-03-30 18:38 [PATCH BlueZ] profiles/battery: Reset battery value cache on disconnect Sonny Sasaka
@ 2021-03-30 18:54 ` bluez.test.bot
  2021-03-30 19:25   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2021-03-30 18:54 UTC (permalink / raw)
  To: linux-bluetooth, sonnysasaka

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=458277

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild: Setup ELL - PASS

##############################
Test: CheckBuild: Setup - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS

##############################
Test: CheckBuild w/external ell - PASS



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BlueZ] profiles/battery: Reset battery value cache on disconnect
  2021-03-30 18:54 ` [BlueZ] " bluez.test.bot
@ 2021-03-30 19:25   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-03-30 19:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sonny Sasaka

Hi Sonny,

On Tue, Mar 30, 2021 at 11:57 AM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=458277
>
> ---Test result---
>
> ##############################
> Test: CheckPatch - PASS
>
> ##############################
> Test: CheckGitLint - PASS
>
> ##############################
> Test: CheckBuild: Setup ELL - PASS
>
> ##############################
> Test: CheckBuild: Setup - PASS
>
> ##############################
> Test: CheckBuild - PASS
>
> ##############################
> Test: MakeCheck - PASS
>
> ##############################
> Test: CheckBuild w/external ell - PASS
>
>
>
> ---
> Regards,
> Linux Bluetooth

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-30 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 18:38 [PATCH BlueZ] profiles/battery: Reset battery value cache on disconnect Sonny Sasaka
2021-03-30 18:54 ` [BlueZ] " bluez.test.bot
2021-03-30 19:25   ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.