From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F85EC001DE for ; Wed, 12 Jul 2023 16:41:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232784AbjGLQlN (ORCPT ); Wed, 12 Jul 2023 12:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232759AbjGLQlM (ORCPT ); Wed, 12 Jul 2023 12:41:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF1E139; Wed, 12 Jul 2023 09:41:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B8E086182F; Wed, 12 Jul 2023 16:41:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FE23C433C7; Wed, 12 Jul 2023 16:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689180070; bh=CzEOfSZpr9CSlURf6noLKDDczuEh/Yb9kBrx+k6k/KI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mFzSIXgBQdwprjB+KjUD4IN5TWV9YFyqtSB/toR7wO7nqI62FiHojknXUSYE8pzC7 7UfkyJSy+EZbQRhI1sv3RUh5L0iop3zoX14bHnUmJkf/4t9Zsc16vGmVps0m3EnGCz GzYT3m4p7e8x496G1QmmGqFWFlwg8/p1ONG1BTF8= Date: Wed, 12 Jul 2023 18:41:07 +0200 From: Greg KH To: Souradeep Chowdhury Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Andy Gross , Konrad Dybcio , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sibi Sankar , Rajendra Nayak Subject: Re: [PATCH V1 1/3] usb: misc: Add the interface for notifier call for Embedded USB Debugger(EUD) Message-ID: <2023071259-stumbling-collected-9c59@gregkh> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Jul 12, 2023 at 01:52:38PM +0530, Souradeep Chowdhury wrote: > Add the interface for notifier calls that can be made to check the role > switch status of EUD. An external module can import this file and use the > wrapper functions eud_register_notify to register a notifier to the EUD > notifier chain, eud_unregister_notify to unregister the notifier from the > chain, eud_notifier_call_chain to call the notifier chain to check the > status of role-switch. These interfaces are provided to handle the case > where multiple modules might go for a role-switch on the same port in which > case EUD will be given priority over the rest. > > Signed-off-by: Souradeep Chowdhury > --- > drivers/usb/misc/qcom_eud_notifier.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > create mode 100644 drivers/usb/misc/qcom_eud_notifier.h > > diff --git a/drivers/usb/misc/qcom_eud_notifier.h b/drivers/usb/misc/qcom_eud_notifier.h > new file mode 100644 > index 000000000000..0cae42a5f6bf > --- /dev/null > +++ b/drivers/usb/misc/qcom_eud_notifier.h > @@ -0,0 +1,10 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Released under the GPLv2 only. > + */ > + > +#include > + > +extern int eud_register_notify(struct notifier_block *nb); > +extern void eud_unregister_notify(struct notifier_block *nb); > +extern void eud_notifier_call_chain(unsigned long role_switch_state); > -- > 2.17.1 > Don't add .h files that no one actually use.