platform/chrome: cros_usbpd_notify: Fix cros-usbpd-notify notifier
authorGwendal Grignou <gwendal@chromium.org>
Wed, 4 Mar 2020 23:21:08 +0000 (15:21 -0800)
committerBenson Leung <bleung@chromium.org>
Tue, 17 Mar 2020 21:19:44 +0000 (14:19 -0700)
cros-usbpd-notify notifier was returning NOTIFY_BAD when no host event
was available in the MKBP message.
But MKBP messages are used to transmit other information, so return
NOTIFY_DONE instead, to allow other notifier to be called.

Fixes: ec2daf6e33f9f ("platform: chrome: Add cros-usbpd-notify driver")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/cros_usbpd_notify.c

index 3851bbd6e9a3984473723e4a433ea1dec4e9a0bc..ca2c0181a1dbfe266b272db81d1068271ec9737b 100644 (file)
@@ -84,7 +84,7 @@ static int cros_usbpd_notify_plat(struct notifier_block *nb,
        u32 host_event = cros_ec_get_host_event(ec_dev);
 
        if (!host_event)
-               return NOTIFY_BAD;
+               return NOTIFY_DONE;
 
        if (host_event & EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU)) {
                blocking_notifier_call_chain(&cros_usbpd_notifier_list,