Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29ec019e authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: supply: qti_battery_charger: Handle generic notification



Charger firmware sends some battery related events with a generic
notification opcode. Handle such notifications as well to send
events up to the userspace.

Change-Id: Ia35fb7dbe56183d3c7c7a66b5f387b94072e6ed0
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent f8b9116e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#define BC_USB_STATUS_SET		0x33
#define BC_WLS_STATUS_GET		0x34
#define BC_WLS_STATUS_SET		0x35
#define BC_GENERIC_NOTIFY		0x80

/* Generic definitions */
#define MAX_STR_LEN			128
@@ -410,6 +411,7 @@ static void handle_notification(struct battery_chg_dev *bcdev, void *data,

	switch (notify_msg->notification) {
	case BC_BATTERY_STATUS_GET:
	case BC_GENERIC_NOTIFY:
		pst = &bcdev->psy_list[PSY_TYPE_BATTERY];
		break;
	case BC_USB_STATUS_GET: