lkml.org 
[lkml]   [2016]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [v3 PATCH 3/5] phy: Add USB Type-C PHY driver for rk3399
Hi Chris,

[ ... ]

> + ret = extcon_register_notifier(tcphy->pd_extcon, EXTCON_USB,
> + &tcphy->event_nb);
> + if (ret) {
> + dev_err(dev, "regitster EXTCON_USB notifer failed\n");
> + return ret;
> + }
> +
> + ret = extcon_register_notifier(tcphy->pd_extcon, EXTCON_USB_HOST,
> + &tcphy->event_nb);
> + if (ret) {
> + dev_err(dev, "regitster EXTCON_USB_HOST notifer failed\n");
> + return ret;
> + }
> +
> + ret = extcon_register_notifier(tcphy->pd_extcon, EXTCON_DISP_DP,
> + &tcphy->event_nb);
> + if (ret) {
> + dev_err(dev, "regitster EXTCON_DISP_DP notifer failed\n");
> + return ret;
> + }
> +

I don't think you can register multiple notifiers with the same
notifier block. It may work by chance, but at least the 'next' object
in notifier_clock is set in notifier_chain_register(). Best case it
may work, but worst case it might cause a loop in the list of
notifiers.

Guenter

\
 
 \ /
  Last update: 2016-06-23 20:01    [W:0.170 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site