From patchwork Wed Jul 12 08:22:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 13309787 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AB1EEB64DD for ; Wed, 12 Jul 2023 08:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=arazdSrlgORCh0qfs3QyY6GZS2yD6udWkBinrjShnMY=; b=DOE0ZRY0oXleqI wGVdAkWZLmctoS/rV2Ok/67xp0SCDVFAzGD2OH5Nu52iH8QEssXmwp08dGz7ayayPYdCiq/2Povlq mvufBf3V2Le1DZbCkSp6dK8iVPl6Sr3s/BC/OT1n+2UwepCcxM7bQZ3OO8lBNt5gkVUInoQ52rN0W CTXFHiR4yqDLPcSx/HC7iNJIFor059+AGfkWYzWyazbnxQrCtDsIswmkk5I9u2xFjPVbAFICvSNGi NtOcdJsmfKKhWOMNBhoHTj4QzIgZKAXKbbWS5EmV3nYNXVJQWk0YxVDSKsonXGFT9enWhvRKrfSVq gOQAh4T9fHgNXodEd1cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJV7t-00GtkK-0x; Wed, 12 Jul 2023 08:23:09 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJV7p-00GtjW-1y for linux-arm-kernel@lists.infradead.org; Wed, 12 Jul 2023 08:23:07 +0000 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36C1RvVn014752; Wed, 12 Jul 2023 08:23:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=aTLQpedi2LvXzzjoGzLBOF15YzPK0gUSq9WXyYp39F8=; b=aAldiDb16RIS/Lm/CaT5mfOtGoGY+9MkFeHgICINBVV65z+V8aW7UDWkR2Gkw6MPieh3 S5od0sGfCY7PMCRqWc3I/pUmqdxispxWozM7oPhexiIzygnokvAvvM4zkHriP+jOZlwq CFDb1fW/q98y0EKOrQi9Nqz312/nSCdfV21WzOjH4z+YUzahVFbXj2yv0GFAvXLOlbmH BCC9slgopsYkp8q37qDFfKbqFi1+fE9EvgiSn6CB9yt7ZCTlxoZSvu/lEE7Im7HlVSem 4p4eMAdvIVa6HYVp0UlYQkftRtrHA1O0Gq792yqq1hX8BTeReF/m2d3GiN/Ma7AmniNM xA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rsf4s8yuc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jul 2023 08:23:00 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36C8Mxn5014175 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jul 2023 08:22:59 GMT Received: from hu-schowdhu-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Wed, 12 Jul 2023 01:22:55 -0700 From: Souradeep Chowdhury To: , , Andy Gross , Konrad Dybcio , "Bjorn Andersson" , CC: , , Sibi Sankar , Rajendra Nayak , Souradeep Chowdhury Subject: [PATCH V1 0/3] Add notifier call chain to Embedded USB Debug(EUD) driver Date: Wed, 12 Jul 2023 13:52:37 +0530 Message-ID: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: m0v9ANWWf2pAAeQT65KBvNd6-fGMuUxk X-Proofpoint-ORIG-GUID: m0v9ANWWf2pAAeQT65KBvNd6-fGMuUxk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-12_04,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxscore=0 mlxlogscore=320 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307120073 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230712_012305_660702_1E3AC039 X-CRM114-Status: GOOD ( 19.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds the notifier chain to the Embedded USB Debug(EUD) driver. The notifier chain is used to check the role switch status of EUD. Since EUD can function only in device mode, other modules trying to do role-switch on the same port have to first check the EUD status by calling this notifier chain and based on the status proceed or block their role-switching step. The modules can call the notifier through the call eud_notifier_call_chain and pass their own role switch state as the argument. This chain will also be able to handle the scenario of multiple modules switching roles on the same port since this can create a priority and ordering among them for conflict resolution. Souradeep Chowdhury (3): usb: misc: Add the interface for notifier call for Embedded USB Debugger(EUD) usb: misc: Add notifier call chain to Embedded USB Debug(EUD) driver MAINTAINERS: Add the header file entry for Embedded USB debugger(EUD) MAINTAINERS | 1 + drivers/usb/misc/qcom_eud.c | 52 ++++++++++++++++++++++++++-- drivers/usb/misc/qcom_eud_notifier.h | 10 ++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 drivers/usb/misc/qcom_eud_notifier.h --- 2.17.1