Message ID | 1677129510-10283-1-git-send-email-quic_prashk@quicinc.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp139277wrd; Wed, 22 Feb 2023 21:30:11 -0800 (PST) X-Google-Smtp-Source: AK7set/LmM12TUz15n7qfvvsU9DJaBRhfAXZKVzZZTsH1IWwczxtjh5ZyhF1V8BFLsbz118U9rhz X-Received: by 2002:a17:903:2291:b0:19a:8202:2dad with SMTP id b17-20020a170903229100b0019a82022dadmr11572901plh.2.1677130210965; Wed, 22 Feb 2023 21:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677130210; cv=none; d=google.com; s=arc-20160816; b=yJe0g+355V5xICuWAAq4qJaMBOvalhL5p8dJfhhrigZ9Ny53HCvrAhmoSSCzKfGqIz YRaTsDrEn8YCC8warpjtYLMIB1Eynmo7wo7YSr5TYyOVf8sAkh7uQHRuvZzq6vUEA+cH 9ufAeTef93jiGfR8GyqAdITyY3JzDouwcSm2ZyhweShL1xGgGMaATArmpsQa2wcsbWBv TaDc83KwwWzlyqo+6DEsLGEFnJk71591Vp2MFdGvia4dqsVWT5Axl4xKc+TEgZ9MvP+l qnvLldJJgBVi7VBUK+gplOzVNcFx3UIPEVLKNwajJ1O29qnbzfuupNGo23NrMqKYzQDr O2Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=uDljakYelKyMseFDA7jnuI68ogj5XTtW+0h7qI7CYjQ=; b=LYgtZjPXitpJVp6XgVupz+M+La2ivfv2PHH5IuYnHlwcBw5xqziP0oq8xpAhfvV7g8 gyTyxdO2lHJK42OKaTUab/nT2tJ/Ro0Tv/fX05lV5rsiPZfCU0VISdauh66bImGubLTu wYNEOB0CBte4CcN45ZVXWgDklPKJkVmSktHJJAdmuP9+ns6uESOEEHOluj233hfV5eyv VIyUuchaqltHgUCgHi8zB12v4ypWk80oOqr+vQgxvWznhN+7wBnGSuxvJpxr2u8N0bT4 rOnJJZRw5QO3I02LLhAw3t5WDlfsUtiS+8aKhMdIzqw75e6isJvl1S+CE2/4wpLRHfjQ 2aZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NhxilBwC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw4-20020a170902f90400b00195f4f578fasi1621131plb.564.2023.02.22.21.29.56; Wed, 22 Feb 2023 21:30:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NhxilBwC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbjBWFSw (ORCPT <rfc822;cambridge8321@gmail.com> + 99 others); Thu, 23 Feb 2023 00:18:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232817AbjBWFSt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Feb 2023 00:18:49 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BED8E3C78F; Wed, 22 Feb 2023 21:18:45 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31N558kj022111; Thu, 23 Feb 2023 05:18:41 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=uDljakYelKyMseFDA7jnuI68ogj5XTtW+0h7qI7CYjQ=; b=NhxilBwCA3JnK8O9KnQ85mBIGwN/yiYnisSRX4XGmkXSGZpeb3UjXbyqaPdufsjhdeeX sKZD5631CrquCTOLz1nGvOikYWL1dMqFhqbhtrOdfX4B1Zk2rjhfEYyXP2UrB6PLkxVG jEcL5VfCsaC1VBOti48XY/9YttljKir/vw5Oa2QTqtSHHJKXZ/ocEFzskLw93E99hUdg iq0HYBy3cTlpEktK7HGMYcDPGi3KFbzRXXvhd+B+iWRzTddG1bebHXTqwArwAPhUIFHa ZfeIexcVTURgPU75Blf7atO1RUjyP2AG93m7P5/nx1vuXjqZ59guEQ7hicfnkaPy17mD Dg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nwymx89y3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 05:18:40 +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 31N5Id5b028181 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 05:18:39 GMT Received: from hu-prashk-hyd.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.986.41; Wed, 22 Feb 2023 21:18:36 -0800 From: Prashanth K <quic_prashk@quicinc.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thinh Nguyen <Thinh.Nguyen@synopsys.com>, Jakob Koschel <jakobkoschel@gmail.com>, =?utf-8?b?SsOzIMOBZ2lsYSBCaXRzY2g=?= <jgilab@gmail.com>, Alan Stern <stern@rowland.harvard.edu> CC: Pratham Pratap <quic_ppratap@quicinc.com>, Jack Pham <quic_jackp@quicinc.com>, <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Prashanth K <quic_prashk@quicinc.com> Subject: [PATCH v1 0/2] Fix vbus draw of dwc3 gadget Date: Thu, 23 Feb 2023 10:48:28 +0530 Message-ID: <1677129510-10283-1-git-send-email-quic_prashk@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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-ORIG-GUID: S8if6nz20MNktqCUKjUmLrq0LUHhSP2b X-Proofpoint-GUID: S8if6nz20MNktqCUKjUmLrq0LUHhSP2b X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-23_01,2023-02-22_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 spamscore=0 clxscore=1011 mlxlogscore=245 adultscore=0 suspectscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302230045 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758598488140271861?= X-GMAIL-MSGID: =?utf-8?q?1758598488140271861?= |
Series |
Fix vbus draw of dwc3 gadget
|
|
Message
Prashanth K
Feb. 23, 2023, 5:18 a.m. UTC
Currently dwc3 gadget processes the suspend interrupt event only if the device is in configured state. But consider a case where device is not configured and got suspend interrupt, in that case our gadget would still use 100mA as composite_suspend didn't happen. But battery charging specification (BC1.2) expects a downstream device to draw less than 2.5mA when unconnected OR suspended. And while resuming, the gadget can draw upto 100mA if its not configured, but the current implementation of composite_resume doesnt consider the case of unconfigured device. This series addresses the above mentioned issues. Prashanth K (2): usb: dwc3: gadget: Change condition for processing suspend event usb: gadget: composite: Draw 100mA current if not configured drivers/usb/dwc3/gadget.c | 11 ++--------- drivers/usb/gadget/composite.c | 2 ++ 2 files changed, 4 insertions(+), 9 deletions(-)