[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABXOdTc11gjrt+_zRs6aJhbgrHXSXnBoG5ZoqwNUKirr_dpX=w@mail.gmail.com>
Date: Thu, 23 Jun 2016 10:23:49 -0700
From: Guenter Roeck <groeck@...gle.com>
To: Chris Zhong <zyw@...k-chips.com>
Cc: Douglas Anderson <dianders@...omium.org>,
Tomasz Figa <tfiga@...omium.org>,
Heiko Stübner <heiko@...ech.de>,
姚智情 <yzq@...k-chips.com>,
Guenter Roeck <groeck@...omium.org>, myungjoo.ham@...sung.com,
cw00.choi@...sung.com,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Kever Yang <kever.yang@...k-chips.com>,
Kishon Vijay Abraham I <kishon@...com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [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
Powered by blists - more mailing lists