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: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
Subbaraman Narayanamurthy 2020-02-12 14:05:10 -08:00 committed by Anjelique Melendez
parent dd2116df9a
commit e72f2c89ce

View File

@ -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: