From patchwork Tue Jan 23 22:51:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13528245 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2088.outbound.protection.outlook.com [40.107.22.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E10451024; Tue, 23 Jan 2024 22:51:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.88 ARC-Seal: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050306; cv=fail; b=rEROIVx14b/YnrbEKShqvoQr54ZT1zf6QGTI3M41Zbed2L5d5x/vj73COgWvbNa+6xkptnXhHPjP14Od7Nw1j2TXe4fyQjz3LgeFlsn6FJagF6e4RhRR3kYEn/T8qr3mcZpNL+efVqMlbkhLb3IVCF9YHK4apzQyL2q1iRsDtx8= ARC-Message-Signature: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050306; c=relaxed/simple; bh=DqVXYmeBd7gCC2CH7ZWEPUrId/SfdbuovZ3a+6V/I5E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=E0HxYY7nn1f6s3NRnCFCuj71MiDw754UfFQylX0YuV97wOFQrTx+sxEJUXMS6G/QHOw4nIdwaK2wMfgIin4HgJ50AOVzf+n9qoOEaZpOmk8XLHl8ONaTn7I1TAeVHXe/S8GoLkH/ntlyJkorHugbE6jBLLEicKcETd1vJmaEe7I= ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com; spf=pass smtp.mailfrom=seco.com; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=yCcDZvWK; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=yCcDZvWK; arc=fail smtp.client-ip=40.107.22.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=seco.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="yCcDZvWK"; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="yCcDZvWK" ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=fMabo6/X9oxY0eS0KTRfijvnvxKFhT77pXQv1Eo4nIf8LgIrnWBuvnKiz5D4GFqVgxdOxyLhcSCWo1CmxrWeS3YRtuylXFjvs9nSqrGHxUamWGNi34AHwXYZMtUxdcuuSaNyMz1VJ8Bz6GTQ+haj6IWaBaYsSKDIBtotPUXLxjrFxQMp98j+vC8cHNpo2OMpWLfuioHTIFDza3zZ0U6OV+nYNflPBAo+koOEZJc1Ktza2BIzS0wF/5JtmIpq6GfUumtl+XuvXoS6gvMT5TEDgcpF2YjBKSIWGk/fl6fftLIM2lGX9TwYUbdN7ads+SjAp7PNhgDmXNmoRARIGQVBOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wozSV54YBQhRxIrVNzvoD9GtY6mFvR5snPwZW/Fj4pk=; b=MPbflTu4jicYjqTCzm2mc+MMaf7VZi9Uv5cniBP5HKs0aYy5o9/7vrVB7ZfA7LIa6iesaHNgfF97XUFZJFkd2dafp8ya3GMW/hEKdiJvYt1oUx28eCwHZPxk3+D9T/eCOgumMa45VCVp0yCw9l7RoqP+bc7+w5nXRYeF9+DP07j82gyv0tdkVaP4o2mGZuLZFbuytLSuL4yOgrCmtDW3DyYrWATkFqd152i7iRkD/PWffiCopbz1spsi9Wv6mfVVfKonCzyM0qi2eW+Z8qBYdwApUC9/V2Gd5rmLFajPElTDx1u/CJbnElXF9bwGHST6yGfcBoi0YF8D6kg9NZHBCw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.160.56.82) smtp.rcpttodomain=free.fr smtp.mailfrom=seco.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=seco.com; dkim=pass (signature was verified) header.d=seco.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=seco.com] dkim=[1,1,header.d=seco.com] dmarc=[1,1,header.from=seco.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wozSV54YBQhRxIrVNzvoD9GtY6mFvR5snPwZW/Fj4pk=; b=yCcDZvWKgKHVFdrWxN+RNcZwaN1RiZqWfzk/w8dTMkQZhqyGsXS+gQIhDJuI7Tfi3+h7+hwTC0d1gmLGgIROPUf89HWK113ab7j596xn17eEcgvcLxIcf3j42uVJ2TcLFhI3ZoYlDxejy/Nq98Gix6xCGLx9ihR5rKJsRrHPJqW+VaoBZhkziuvBtsMFBFHMWlRirzgItnEsgujY6JT6EgPTsfSFw6t4PQ8dnKhO90VstFhojfFUnYZ0vB40azDYukfWteQJ9di4dBuyUJdGqsCoPF6RRj8l8ljR/v2GCIe0IkYu3iGz9pml4NPLjzP7/awStDtvYrtgy7fcqNJqRw== Received: from FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::19) by DU2PR03MB7989.eurprd03.prod.outlook.com (2603:10a6:10:2dc::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Tue, 23 Jan 2024 22:51:39 +0000 Received: from VI1EUR05FT060.eop-eur05.prod.protection.outlook.com (2603:10a6:d10:a3:cafe::23) by FR3P281CA0119.outlook.office365.com (2603:10a6:d10:a3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20 via Frontend Transport; Tue, 23 Jan 2024 22:51:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.160.56.82) smtp.mailfrom=seco.com; dkim=pass (signature was verified) header.d=seco.com;dmarc=pass action=none header.from=seco.com; Received-SPF: Pass (protection.outlook.com: domain of seco.com designates 20.160.56.82 as permitted sender) receiver=protection.outlook.com; client-ip=20.160.56.82; helo=repost-eu.tmcas.trendmicro.com; pr=C Received: from repost-eu.tmcas.trendmicro.com (20.160.56.82) by VI1EUR05FT060.mail.protection.outlook.com (10.233.242.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.21 via Frontend Transport; Tue, 23 Jan 2024 22:51:38 +0000 Received: from outmta (unknown [192.168.82.132]) by repost-eu.tmcas.trendmicro.com (Trend Micro CAS) with ESMTP id 55ED320083980; Tue, 23 Jan 2024 22:51:38 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown [104.47.17.168]) by repre.tmcas.trendmicro.com (Trend Micro CAS) with ESMTPS id 190AF20080073; Tue, 23 Jan 2024 22:51:37 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EvBo3sxHw8vv1jr1N+iS0i8K3TO721gZciEVYaggNdTjSBJDGtb0uJtn8gtNACgbxcv/JOiic7wGPKg92umR7ecIAKaU7W9uudWWL2fjaRlmDq3G3JsQ2OWgLbp62m+a3YljrZ7RazrzhYE+FrSjLOJeFqbOrtTeHCuqp6HSLTpBbwNHP1lBMDo9cuuZBPRN8BDcHRxNTvjQkmSZh4BjRnQAGc2AFSe9iYJDnjU270yFGQhm6Y+iufJVeG7+sY+9iBbqINN5rmnF2PU5fI/xYLjJi+w70+t5/h6tpM8SrpXLG/KuUzxHM/M1Jp788oPNMsckEo7eyGHsqh/9mTaPDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wozSV54YBQhRxIrVNzvoD9GtY6mFvR5snPwZW/Fj4pk=; b=Lxf4LYyyonFSzkRReqGd55H5LUo3dEnDyLFl2LUGwlwlUAL9/lssPzWM5dO0bv5km7Krbq83IEGd6JTZhYAI4uij6th+RIvC5fGjM4C56ttbC8erh0je7o4HfvIyGbnkyCOJjgCtesxQcGFHpOG24s01HivKRWNfOVYvbkHmYqxVwFO1C8n+7RfF+5J7P4QkOCtf+PMDalgQcHnKCim8S2Vxhxs7lr+cb/0QNff3qK8ppFPt/UnYBP53xqC38L2NVp7aCD8u27lLrQlkKHV0/bTGHSqYWvwyxl/aav4Tz8vsWflkVimJSBl3kWz3mMWBx4cBSSqDueBNIWea5Nm7fg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wozSV54YBQhRxIrVNzvoD9GtY6mFvR5snPwZW/Fj4pk=; b=yCcDZvWKgKHVFdrWxN+RNcZwaN1RiZqWfzk/w8dTMkQZhqyGsXS+gQIhDJuI7Tfi3+h7+hwTC0d1gmLGgIROPUf89HWK113ab7j596xn17eEcgvcLxIcf3j42uVJ2TcLFhI3ZoYlDxejy/Nq98Gix6xCGLx9ihR5rKJsRrHPJqW+VaoBZhkziuvBtsMFBFHMWlRirzgItnEsgujY6JT6EgPTsfSFw6t4PQ8dnKhO90VstFhojfFUnYZ0vB40azDYukfWteQJ9di4dBuyUJdGqsCoPF6RRj8l8ljR/v2GCIe0IkYu3iGz9pml4NPLjzP7/awStDtvYrtgy7fcqNJqRw== Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by AS2PR03MB9792.eurprd03.prod.outlook.com (2603:10a6:20b:608::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:35 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84%7]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 22:51:35 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: Robert Jarzmik , Felipe Balbi , Linus Walleij , Jonathan Hunter , Mike Looijmans , Jules Maselbas , linux-kernel@vger.kernel.org, Sean Anderson , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v3 1/4] dt-bindings: usb: usb-nop-xceiv: Repurpose vbus-regulator Date: Tue, 23 Jan 2024 17:51:08 -0500 Message-Id: <20240123225111.1629405-2-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20240123225111.1629405-1-sean.anderson@seco.com> References: <20240123225111.1629405-1-sean.anderson@seco.com> X-ClientProxiedBy: BL0PR0102CA0069.prod.exchangelabs.com (2603:10b6:208:25::46) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|AS2PR03MB9792:EE_|VI1EUR05FT060:EE_|DU2PR03MB7989:EE_ X-MS-Office365-Filtering-Correlation-Id: 278ee214-9e9e-47fd-1977-08dc1c65dc0c X-TrendMicro-CAS-OUT-LOOP-IDENTIFIER: 656f966764b7fb185830381c646b41a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: l2uG15JaYd5ijQj/uwu5f1XuSEPtiJE0ieJD5zZyAzkrNtC5080pzeZQWvQFNaGjdgYAwTbap/ynGpgEk3Vp39atS3+w+w1xvijC5hOcBzScfu4efs/EONkcdHpUu9IJhv6iVMKpTdwzuyebcIhs6WSmTZNfekCxoqUMLoikzDP/36+p89S/BQMhx6+TVcmapvid0M6B9OnWQIbXL0vZkj8uclMGqQfSD2ubvsG0+0wzZwnj9JiPcHbCbhs9Qh4km52epgvpNnJDo89YmXPQLgKcICdCgVWDvFuftdsU/c1RrC1i70idgWAOeunzak5Jn9lrYcPFx0Cjo154F8cl030To34VGq+Z86nlGO5Q+MNX+qTdU4lT807FBueIKAgoJOw/zZjloaWDrj4UNRXAvYoRlSXV25yWmBDPtxuaPok5q8N/maZl6wiCH+1JrR8PaccnTkz4LBJGMNeh25fPZW9ce4sE2t9ai/Yte82CJylySoGBuPvuJGLikNXBbc/6WlbC8fJ2U6hZWbhNFNymSkhuLwjed+76IcifRk8jcf++MI958dGdeY0hUR4zFaWikp/tr8S2dY2k9WoAX/zQ/XO+UtsxukthbXCV6R7Kd243NwExNJ4cqCQ80ZOtBaP6//vutfcHEtveeEkzhovqcg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR03MB8847.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39850400004)(366004)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(38350700005)(66556008)(86362001)(66476007)(54906003)(316002)(36756003)(2616005)(41300700001)(66946007)(6512007)(52116002)(4326008)(8936002)(38100700002)(1076003)(83380400001)(26005)(7416002)(8676002)(2906002)(5660300002)(6506007)(44832011)(478600001)(6486002)(41080700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9792 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR05FT060.eop-eur05.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 546a3cc3-8fe0-4991-f73c-08dc1c65d9e6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gVvgHRkYxtexBkRBJzol8mMKsffdD15ATQoXKZL6Y16yAY4DnRR+D/ssw/SH6AquJI3XgpMSsO1ZoBI4HefgtIq2cUtIY1CqSAxd0rZF7PzpuwXQbH2mxpB+F8MDoBlTuf0fqPzYeT/BKNskNEe/A2QY9f0/mRpvnV2ryjS7NzjomgkhzAYN40BIy4delr+bP3R7k8FX0SA2FZ18V6SyKd+kr0bIjMYA+ZS8o0cgBInpO/eaMED4edA1G7Y2b5xdRYLWWDNedFIH/enPc/78XWScikP0vn7+8J69IPglVuwCVl5cif5D07qHQfTZh7aqz/T/JmvO0DvNk+G3r/kV76A/dPUacOaCWkeJ409LMD4SPZe3koecfjxVW9pQAsSU8E7DmN1T6SM6dCCmT77F0TNS4/6fRxtx0ON3BwjHt6B+6k1g/4Ato0Ehib/52W0oI+PLrKem6yFw3V+UiCVNfu3Z8nI+TIQnCRoiqKm8DOBmLS9yg+QQ9c9meKA3JH4E8kJ2p99K97Q8H4bBz1ALbqNNh4NPgCJWKi3AzBARbwkALS1IxmKJeeB80dwlbvS/Mx75s125UYlhdmf4svSdxzPOCWc9lxvI+qjOvyKFDBmVtpdeA0jBqqERHGaoBaOiflxiA+yGgtFhbkPEyMb3RHP1tFSRukGO06GsuxpeO69dASUhJtYEXAKWgkr+bnYsjIUdxz+abzW71VacVr8u3tbj33S5lI5MEDefeqpnXxz/02XJfiv/CaUsKIa9ONDSjCU3CRu+/geF2GmrpVocwA== X-Forefront-Antispam-Report: CIP:20.160.56.82;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:repost-eu.tmcas.trendmicro.com;PTR:repost-eu.tmcas.trendmicro.com;CAT:NONE;SFS:(13230031)(376002)(346002)(136003)(39850400004)(396003)(230922051799003)(186009)(451199024)(64100799003)(1800799012)(82310400011)(46966006)(36840700001)(41300700001)(34070700002)(7596003)(7636003)(356005)(82740400003)(47076005)(36860700001)(36756003)(86362001)(316002)(54906003)(70206006)(70586007)(5660300002)(7416002)(8676002)(2906002)(4326008)(8936002)(44832011)(336012)(1076003)(26005)(2616005)(83380400001)(478600001)(6506007)(6512007)(6666004)(6486002)(40480700001)(41080700001);DIR:OUT;SFP:1101; X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 22:51:38.7885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 278ee214-9e9e-47fd-1977-08dc1c65dc0c X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bebe97c3-6438-442e-ade3-ff17aa50e733;Ip=[20.160.56.82];Helo=[repost-eu.tmcas.trendmicro.com] X-MS-Exchange-CrossTenant-AuthSource: VI1EUR05FT060.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR03MB7989 The vbus-regulator property was never actually read from the device tree. Introduce a new property vbus-supply to represent the regulator powering the VBUS when acting as an A-Device. This supply will be enabled and disabled as necessary. Note that this is different from vbus-regulator, which represented the available current available to draw from VBUS in B-Device mode. Because no one was using vbus-regulator, remove it. Signed-off-by: Sean Anderson Reviewed-by: Linus Walleij --- Changes in v3: - Update description as suggested by Linus Changes in v2: - Fix dt_binding_check errors .../devicetree/bindings/usb/usb-nop-xceiv.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml index 6734f4d3aa78..9b3ea23654af 100644 --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml @@ -37,10 +37,11 @@ properties: description: Should specify the GPIO detecting a VBus insertion maxItems: 1 - vbus-regulator: - description: Should specify the regulator supplying current drawn from - the VBus line. - $ref: /schemas/types.yaml#/definitions/phandle + vbus-supply: + description: regulator supplying VBUS. It will be enabled and disabled + dynamically in OTG mode. If the regulator is controlled by a + GPIO line, this should be modeled as a regulator-fixed and + referenced by this supply. wakeup-source: description: @@ -65,7 +66,7 @@ examples: vcc-supply = <&hsusb1_vcc_regulator>; reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; vbus-detect-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>; - vbus-regulator = <&vbus_regulator>; + vbus-supply = <&vbus_regulator>; #phy-cells = <0>; }; From patchwork Tue Jan 23 22:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13528246 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2053.outbound.protection.outlook.com [40.107.8.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91BDF537E4; Tue, 23 Jan 2024 22:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.53 ARC-Seal: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050306; cv=fail; b=naHNZ8MRnP4lWpE2wkS9+GsBt/5YJgQJrTfNN8dDhZgw85jyegOkB3aEmiRMMiulmR6xBCFe7CHUrM1Nm3VkMIZ0JICDL1rb2hyUkzXbryGDAktAGSMJKmRINyuruPV79CsOZK8f246AjYLeyZrqwMlvjYTEaCw9pfUjP5ut5lA= ARC-Message-Signature: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050306; c=relaxed/simple; bh=BL+wCyu069pdREzTeNtCL3sbaTqIbGofOlCKB74fXJU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=WqfOUUCoL20j052cpwK4OYPPjObwHqGShELuGl0lBFB2bSOAoaEp9jl/xv3kTp6b/7xWhwBeZIwMVSmOmjsjm/qYO2QLjg7Y33ffznTNVSdKRMAFxXGrnT/hjY1ruSe3eoD5sNJ7wlvZUQxG326t9tycNBL2byf5rBkXRaJct98= ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com; spf=pass smtp.mailfrom=seco.com; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=ousD+g98; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=ousD+g98; arc=fail smtp.client-ip=40.107.8.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=seco.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="ousD+g98"; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="ousD+g98" ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Q0zLBxnPwkDeg9Qk4jlfBFNCuoVmGJr7nqtu/0vu2qijMIyue6vCvWUz8OGV7lFE0y1CD8yqEmpUefDhX0q82bduFNXePOwtD/xJMJIclfjqAWF6L7M3TdHzshkMsjvBAsu/H7h0k7b5ez4q0b9fRcMn9wAPr9UFmeIcZZa80/JfzWuif9c0ZwNg5QkqkFisQH+hwy/yARjYWQv+mGXlC7wjSl5Zsa1X6/T0zewMWs30fxnkC2RJsrjNfMLFWt4tVeXS7k4c2l+Q+R0WmM6SV9yZA3YXFF5C+CmaeYkJFbhW019s9uZn6Z6Ydk1jfs968N7BDftAwOjPABwHZXoLDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xn3bdx/1ViQbIcXUPw4qs/B3XhdCQuZ0mCdbfnFzMa8=; b=bIhX8gJLz+fFCNhzDOiUH3rJKKg5LmhE3nt4DWZQQRpEjCg7eGEvP+sycRg6FWwpVQ70LrM/qXDfW2Fdbqmz/P4u5WN9oseDqzSn+N8RjRnsBtX3yP9GyTNgWCXjOJv9IbOWogAgxmAdI7sw2vGBhO0bk2Gra487eymu1GOd0DKlvm6aSsAf1pASu7keG3N8Biy/oeb5qSdnGwEh1rezQ0Eeq+7VdQedv/neyVB4RCIVeRWFWQS2gDu8iIpuPpekkUjDu4sPA03XnpQb4awKcdG5i0B1WEGs46i9/rVU1wOATQDj0FWKjxd3SgkMazoA6LxYlIiyLn+633DFWK8yMQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.160.56.84) smtp.rcpttodomain=free.fr smtp.mailfrom=seco.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=seco.com; dkim=pass (signature was verified) header.d=seco.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=seco.com] dkim=[1,1,header.d=seco.com] dmarc=[1,1,header.from=seco.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xn3bdx/1ViQbIcXUPw4qs/B3XhdCQuZ0mCdbfnFzMa8=; b=ousD+g98gJ4zU67AXppLHY68jtALzY6b8fogFBJaRaB79YL8y9If4SI7DK/uGLSEiypYqJ1D7y1j1x5H0HchSDwyCheizBPcm2/IqWgLgl7MD1QbN14Sb+GLluKk8xm5bGAxJfLnGblIC8IjUNIsdhMheNzXqDau3ZfVUjXEeTrPBhgSrpbvzK3oS8UYP50AGjDdyJEglrHLFuLwrfaz1gi9JOSz9dfcAmGWXpgROuGuBPRSf6kN+MEkrL9h89yh2lKv5N0sbjuiW6joL5FO4s6Ly7b9ZD4q8ABhZ0Hi+NpiyEXE37OE+FGZnLca2hlst5aS4qGrOgkvhWxcXwWznQ== Received: from FR3P281CA0174.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a0::17) by AM9PR03MB6900.eurprd03.prod.outlook.com (2603:10a6:20b:2de::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:40 +0000 Received: from VI1EUR05FT062.eop-eur05.prod.protection.outlook.com (2603:10a6:d10:a0:cafe::93) by FR3P281CA0174.outlook.office365.com (2603:10a6:d10:a0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22 via Frontend Transport; Tue, 23 Jan 2024 22:51:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.160.56.84) smtp.mailfrom=seco.com; dkim=pass (signature was verified) header.d=seco.com;dmarc=pass action=none header.from=seco.com; Received-SPF: Pass (protection.outlook.com: domain of seco.com designates 20.160.56.84 as permitted sender) receiver=protection.outlook.com; client-ip=20.160.56.84; helo=repost-eu.tmcas.trendmicro.com; pr=C Received: from repost-eu.tmcas.trendmicro.com (20.160.56.84) by VI1EUR05FT062.mail.protection.outlook.com (10.233.243.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.21 via Frontend Transport; Tue, 23 Jan 2024 22:51:40 +0000 Received: from outmta (unknown [192.168.82.135]) by repost-eu.tmcas.trendmicro.com (Trend Micro CAS) with ESMTP id E731A20083980; Tue, 23 Jan 2024 22:51:39 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown [104.47.17.168]) by repre.tmcas.trendmicro.com (Trend Micro CAS) with ESMTPS id 246332008006E; Tue, 23 Jan 2024 22:51:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nrkiRKitTE/4uPkUeaqQ5Z/Xs63SCgETD4MxAHI+POqlPtw4qyu0mEKUFX6uvJDD2HeJ8dnGLTowg6Db9RmK1q7MgG6TIvcuayzA78pJllCsjFRqWp9FowMWuphZH2Ae48vwcs3R2xS263Gj7dk6aI/An9qDGHK6JiI2bbrcA1ODwpdw6/w45bDwSaV68tGu2oliIudsUNrA107O6HGtoOZh78I3cu7DRXtUUF69jSkeouyFCLeCjTDVc+kQtgq/vvHxowoCeddtC7VexbBtw2CVc4AGFz5qRM5TS8Fl9AiwRQ3UC5pmPfytvMUyc0qewW3p+emtHb7gtjZ069DuEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xn3bdx/1ViQbIcXUPw4qs/B3XhdCQuZ0mCdbfnFzMa8=; b=WJ+3zL99k5ueLaYtWeCd8714xbCnGhdn3YEEaIy8Q/gJTmgSUDkoW84iqRBZhOzUgHJf4lVi7FwNzQxxDtts3Upm7oqE2bpcRFTTZHgOv9iiRpC1CWZRCg05IOMaidyUgrnoVXu+dAMPWk0Jbu9RrFMo6of/Qjuupzm5A95UaELEiDktmXg2nJmKbDewQFFp9ecYxLZf/XOeoGV2jtOIkbW6WFjUI0Psphs+CyA/FBVE9tvxAGiI7XjOuCHYRFQx6D7dLk+O4Fk8FZxSlAWK7oLhZJOhoZVZhvT6Hir4Df4WL4VigK3WR5dlL3HcjiOYnDpwEIZ82EsOjwiNiHO+wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xn3bdx/1ViQbIcXUPw4qs/B3XhdCQuZ0mCdbfnFzMa8=; b=ousD+g98gJ4zU67AXppLHY68jtALzY6b8fogFBJaRaB79YL8y9If4SI7DK/uGLSEiypYqJ1D7y1j1x5H0HchSDwyCheizBPcm2/IqWgLgl7MD1QbN14Sb+GLluKk8xm5bGAxJfLnGblIC8IjUNIsdhMheNzXqDau3ZfVUjXEeTrPBhgSrpbvzK3oS8UYP50AGjDdyJEglrHLFuLwrfaz1gi9JOSz9dfcAmGWXpgROuGuBPRSf6kN+MEkrL9h89yh2lKv5N0sbjuiW6joL5FO4s6Ly7b9ZD4q8ABhZ0Hi+NpiyEXE37OE+FGZnLca2hlst5aS4qGrOgkvhWxcXwWznQ== Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by AS2PR03MB9792.eurprd03.prod.outlook.com (2603:10a6:20b:608::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:36 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84%7]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 22:51:36 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: Robert Jarzmik , Felipe Balbi , Linus Walleij , Jonathan Hunter , Mike Looijmans , Jules Maselbas , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH v3 2/4] usb: phy: generic: Get the vbus supply Date: Tue, 23 Jan 2024 17:51:09 -0500 Message-Id: <20240123225111.1629405-3-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20240123225111.1629405-1-sean.anderson@seco.com> References: <20240123225111.1629405-1-sean.anderson@seco.com> X-ClientProxiedBy: BL0PR0102CA0069.prod.exchangelabs.com (2603:10b6:208:25::46) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|AS2PR03MB9792:EE_|VI1EUR05FT062:EE_|AM9PR03MB6900:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a4e561d-98ae-40b6-75bc-08dc1c65dcfc X-TrendMicro-CAS-OUT-LOOP-IDENTIFIER: 656f966764b7fb185830381c646b41a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: oIMly5ZVM5Fr7yoeGgh0prds10X6eInq7SUCALcIyAwhPm586Y5NTIkgbv2S/W+/NzPe0mkJKwEODpx+tjHG86WMcrB0+bWe2J0ZAveQ95xeMtF6AvRrKODcRnj4ovJujf+UjSkI8fcmseGLD/D0+9fKk6RSIusvjJ5VDZb1ZXAAB7Jf8OY01czHYn1IOV3JI7yjd97XDB2d4A1ehvHPKNGG+2UY2W5nO79X6L4jzX9uI6vKMI8GD9dVuOY792QNt1gQ2qjxib6BQ3o4hLwB3G8fQQYWkwxDg+X85G7GdAljziaLFZ/U/JSbTQYRl5fyA4J+Ra2Q0Qf4SGin6ogBO/EkZ2FeK8XuTDZynp9zkELxSyVKV4bPHZWDo0pUW96H6mb2BqEgU8JoqKPwtTkZnWn0vOoHBlWieDi/UnNWSM5ewWQfWLUGC4dpHarzz60T9hhU6RMs33tlkSeSb5zTiaStIY9RmWR/mv8opFtaRjZisV9o6Ho6NwFeS36HBM77PAc4n7htLoGILhGUPjeAUbct/Y+6Pz2yvAQTsYMjKLvtLCC8WRhLeyZ5BVZf2H73bqb45Kw94eaWKtoiF8k4lagX4296R/e45GVyHD2N0cNPHQB/OL8hNaeFnqxuZ9D/poQyMzVqzv/uMgMBYdpTqmRd4Xn2FFDVic2Lk2OT28vMdY0HMbrgKrmxJrryBZnxJFtaqtxi889Ci06b5yYucQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR03MB8847.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39850400004)(366004)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(38350700005)(66556008)(86362001)(66476007)(54906003)(107886003)(316002)(36756003)(2616005)(41300700001)(66946007)(6512007)(52116002)(4326008)(8936002)(38100700002)(1076003)(26005)(8676002)(2906002)(5660300002)(6506007)(44832011)(478600001)(6486002)(41533002)(15583001)(41080700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9792 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR05FT062.eop-eur05.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2b6e90c8-9138-452a-2de3-08dc1c65daae X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yoLJc14pZ69zF/jtejjospyPPo+gdPCLrGuRM1HgPReZ3H4PlZNHCEsS8+yqUb+etufxElAsG2wFc9x6R7LErXGGB2D1d/92xt5mJ8yOpPGSeaEIXzpvDiLBJrKmmbezls49ve9K0Ozq1azQoq74mUFtlwPJAFWtWv1HXOP8hr1c4n8pIj90rOnefvo6vi1jM4BKIIav8R2YVgFYBX2haQnTQKeQcnBrAylOnyJcfgO/agZ/b2lFLFKiQ6D+zJPH1zG7EePFsrnCW9cOm0vUiin4hSWWO952RYe9eF6xBHO7OFgzOOxY1seVauWUtyMqaB5s3oJoUuQA3KoDLkOFnnwHoboGxx+cvLW80fguFZLFgbpY5fintsxGHCoDokY2c+m+NF+f3/xOng/X65gKxpDfdyLcFaV0qk+83qXOpUASJiyU0R3A4oKT52770IxNXOVeMiDoJxNZpSBWWv9VLPP4xAMctlullNJiPo2IVYtqcqFLW5IoN6mcz9fVWlm5AE/w1ocibMLDRvNay65aHR7laVXOfLP8LdISL7c4Je2MxjwYxqyfFW2va7u9831DeiiMjX9zOZRCdA0EcUd4w/mHk5W9H1bGjRUr0qcLSvSQXdIUPdsronRiV6iVToX40ff50dJ6cdYswOKRKhbeAqqanfsi2lkIqxXSnL/mbcmPoPY5VCICbAlR0fzwbGBJpGPpmACAd+ggEeKR+HeYkYEGMgZFwCTPpKIp2PkZ2Rqali7koO2HRcivCHjTU9NWY5rZujFOExhS2D6LVSHcaL/Cj+kTOB4jBfgMtIb4i4eN7WwEvheB4vj/ycmtGhJFDJPddeoTBwYE4ZHgPQZ5ciN0PkQXGArz7jjUBz17XH8= X-Forefront-Antispam-Report: CIP:20.160.56.84;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:repost-eu.tmcas.trendmicro.com;PTR:repost-eu.tmcas.trendmicro.com;CAT:NONE;SFS:(13230031)(376002)(136003)(346002)(39850400004)(396003)(230922051799003)(82310400011)(451199024)(186009)(1800799012)(64100799003)(36840700001)(40470700004)(46966006)(40460700003)(47076005)(40480700001)(1076003)(26005)(82740400003)(8936002)(4326008)(44832011)(8676002)(5660300002)(54906003)(70586007)(356005)(316002)(70206006)(86362001)(478600001)(6486002)(7596003)(2906002)(7636003)(107886003)(336012)(6512007)(34070700002)(36860700001)(2616005)(6506007)(36756003)(6666004)(41300700001)(41533002)(15583001)(41080700001);DIR:OUT;SFP:1101; X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 22:51:40.3793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a4e561d-98ae-40b6-75bc-08dc1c65dcfc X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bebe97c3-6438-442e-ade3-ff17aa50e733;Ip=[20.160.56.84];Helo=[repost-eu.tmcas.trendmicro.com] X-MS-Exchange-CrossTenant-AuthSource: VI1EUR05FT062.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB6900 While support for working with a vbus was added, the regulator was never actually gotten (despite what was documented). Fix this by actually getting the supply from the device tree. Fixes: 7acc9973e3c4 ("usb: phy: generic: add vbus support") Signed-off-by: Sean Anderson --- (no changes since v1) drivers/usb/phy/phy-generic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 9ab50f26db60..16494030209e 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -274,6 +274,13 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop) return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), "could not get vbus regulator\n"); + nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); + if (PTR_ERR(nop->vbus_draw) == -ENODEV) + nop->vbus_draw = NULL; + if (IS_ERR(nop->vbus_draw)) + return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), + "could not get vbus regulator\n"); + nop->dev = dev; nop->phy.dev = nop->dev; nop->phy.label = "nop-xceiv"; From patchwork Tue Jan 23 22:51:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13528248 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2069.outbound.protection.outlook.com [40.107.22.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3A05537E4; Tue, 23 Jan 2024 22:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.69 ARC-Seal: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050314; cv=fail; b=b0F3nY7zNCWK0om+U0h7ctszp23iZNZWIpD6UJpwvDRGUC4GgeKC6AHZAhiVHEP1SS/r9giC6aYeX+FP6bnjqw2kcsHfY4J44PoOBsAaCvpGDrsZzzVTx7cEWABS0lfineGNRTpZ5hZpxPFPvKqfds/lp4U2Jc9Wx7M0xl8UXoY= ARC-Message-Signature: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050314; c=relaxed/simple; bh=KOjlN/VRD+j9F7LEY27DLPI5jA0bLrRW/apJlN6qXZ0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=aEGC0ht2SbStJLMXVOwg1l8CEMz7RMoCQBJKuMfwzwK+ev9i4fDghbhYfnN3xxCbBeoD7hxzb32GQJ2i+jwbNOpiDDg2mGywscWKM9SgCs91t9ozzOnM3UH1kiJuu/neOhi99U7ifI0IwuxbM9nZz6wgsLljcaE+LQTqIGtTI8g= ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com; spf=pass smtp.mailfrom=seco.com; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=owGlNnnV; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=owGlNnnV; arc=fail smtp.client-ip=40.107.22.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=seco.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="owGlNnnV"; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="owGlNnnV" ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=D+nFyWRB+yj7xaV9EtcsMCRguhkrL1+gYInbbYKqCyA6hHCDmF7ln08RwMbKdhu2KisOwupG+ivdOmrTu+ad1wsJcrPPInjCtOBapFgz0621myoUWeD8C7ep5VUsXoXDqGm+WtFVskxuBat8IQO/pKnMsrgla13M75ln1a0jgenveRQCUMwjZqpaqjeTJeiyqjVq38NmllUiuICy/Bc/2+zFjySauaxddJnS59KzUKD5A3ZFEu80SUU0hjFo1hYiWsMLJXy9TvTLD+dfzPsdeWk/iSzpUfn/FcxO3GkRlH/0jrgkKIRpvFfDmyuhdv5FaTN/zmAm4NQ7tep/XXRtNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yQwdF3zdAmdqqJrogk/goljRhoD8cVgWt282GWXQhGc=; b=jasmJMVEuPk4fr5pk+Ndjb+N0+2yOFnFj9bTwIEHOFNemAN6oxnaXVr6vhuOP3haIN2/3CnQTsl4Rv8/lehzkFdzt+cama1A6IbqFKwf66o/pUJleXkO2cTkF9s7bQns9TLNvxuqt56YfyS+xtYSf5VS3og0RfB8a6mXUaNdvOx4/CNZv4p3QGGr+9VAWWuBOZhshfWvEQw9KLwZuFEhgdaHC5uwj3g6f0Suv9mG1V3lDjbPsZAQ08/ulkPPh7kS98xPigRwdG5Mai+J7qjKujI/Zks1/pwxdZ44w+bXX9Tz+d3tcoiptyS2IJYJAeE0qItsZYDx+hDMhfQaygAaYw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.160.56.82) smtp.rcpttodomain=free.fr smtp.mailfrom=seco.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=seco.com; dkim=pass (signature was verified) header.d=seco.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=seco.com] dkim=[1,1,header.d=seco.com] dmarc=[1,1,header.from=seco.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yQwdF3zdAmdqqJrogk/goljRhoD8cVgWt282GWXQhGc=; b=owGlNnnVPSzpgrvsTiSbBToolvozKrFjY22IDKbsu8vCkP5nOv9ZRCCcIhL+ZSmyWSxWP1EIlsC0kzyxSfuTeX/X4PLTnKHC4He0ZY6SrsChZFw2pKuqKREjePUKysP2tgT0f++OFgCs0PbTOai1nDNf9UxNNt08htFqlMiHLcrT+OON2zIVj6ZgW26dyBCozceODf3+nvFMG7Sk8BByS1s5D+mv8ZgPWG3AtBcZjqhcEXsqILFQJahzK+RmC2FRlv/H+UMNwwr6qygNkpQ+cBV0uKLu8fczB8+VmgDCpwZqBtD1p2TvxmtoxePheIl1+owVZoDwXnL8mGIoxuySfg== Received: from AM6P194CA0051.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::28) by AS2PR03MB9443.eurprd03.prod.outlook.com (2603:10a6:20b:59c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:48 +0000 Received: from AM6EUR05FT044.eop-eur05.prod.protection.outlook.com (2603:10a6:209:84:cafe::f5) by AM6P194CA0051.outlook.office365.com (2603:10a6:209:84::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22 via Frontend Transport; Tue, 23 Jan 2024 22:51:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.160.56.82) smtp.mailfrom=seco.com; dkim=pass (signature was verified) header.d=seco.com;dmarc=pass action=none header.from=seco.com; Received-SPF: Pass (protection.outlook.com: domain of seco.com designates 20.160.56.82 as permitted sender) receiver=protection.outlook.com; client-ip=20.160.56.82; helo=repost-eu.tmcas.trendmicro.com; pr=C Received: from repost-eu.tmcas.trendmicro.com (20.160.56.82) by AM6EUR05FT044.mail.protection.outlook.com (10.233.241.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22 via Frontend Transport; Tue, 23 Jan 2024 22:51:48 +0000 Received: from outmta (unknown [192.168.82.140]) by repost-eu.tmcas.trendmicro.com (Trend Micro CAS) with ESMTP id 04F482009538D; Tue, 23 Jan 2024 22:51:48 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown [104.47.17.168]) by repre.tmcas.trendmicro.com (Trend Micro CAS) with ESMTPS id CF5CA2008006F; Tue, 23 Jan 2024 22:51:39 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KGLxx2Cz6gU2fIpTGcnAyNEO9890J3Cypb+j8ylC6qLWTcRBPlS6D9mpkJ0QsyAwiRqL6gcPj01huBNJGiPiu7CeDzlVpKKj0uTGW0YmjlZ+P0VviTA+RCKz7CAIqiy6pFPcFptq23Gk+YprjJ/STK9yviO/hhcBAw9U4mfuAruhwOySlMyaeK/XCsOZ1G1UVTKXXlleOnR+91ZDUrEDnayVbry/941/npP0oqXnGIbhgGt8xPqXT5f59zWbHZ7ptM4wgt835koZytvK5gS+uqw/9Ho5GMUJ3feVQgDyGS/dWWflezhThXQrcLcex7SrQrEJZMPcMqx3qttGdVmidg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yQwdF3zdAmdqqJrogk/goljRhoD8cVgWt282GWXQhGc=; b=OAJCcMxXI6oSlf32/XBM96Xj/Pm1XidX+eCTHkol6vzrsrRS7apErOPc9mLLQrLD8ni23d2NJGa89gYeVn4jR6E1/KSBVsijeLFY7TahPCskB6sh4mgcJiklqgfeHGxRWaINzxBH/PAG9nFxsP5L2G5J4YOYxALlP6NvFhrsU63fmI8PnJDqx8adfIbF9my5ke0Lh2SX2mPTSFMOqYFD/hoMg2QemvVL8YKuMB/hHTiVkVxM5XMwDgOZh1ZCtuiMYrxdaLwsG+myd115Xx3yxx3dmSqlDmuY1LQJKqm9OkGGFrTQg0ykKNmUmR72D5wndEa2Ckc2nVUgeqowHsajTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yQwdF3zdAmdqqJrogk/goljRhoD8cVgWt282GWXQhGc=; b=owGlNnnVPSzpgrvsTiSbBToolvozKrFjY22IDKbsu8vCkP5nOv9ZRCCcIhL+ZSmyWSxWP1EIlsC0kzyxSfuTeX/X4PLTnKHC4He0ZY6SrsChZFw2pKuqKREjePUKysP2tgT0f++OFgCs0PbTOai1nDNf9UxNNt08htFqlMiHLcrT+OON2zIVj6ZgW26dyBCozceODf3+nvFMG7Sk8BByS1s5D+mv8ZgPWG3AtBcZjqhcEXsqILFQJahzK+RmC2FRlv/H+UMNwwr6qygNkpQ+cBV0uKLu8fczB8+VmgDCpwZqBtD1p2TvxmtoxePheIl1+owVZoDwXnL8mGIoxuySfg== Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by AS2PR03MB9792.eurprd03.prod.outlook.com (2603:10a6:20b:608::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:38 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84%7]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 22:51:38 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: Robert Jarzmik , Felipe Balbi , Linus Walleij , Jonathan Hunter , Mike Looijmans , Jules Maselbas , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH v3 3/4] usb: phy: generic: Implement otg->set_vbus Date: Tue, 23 Jan 2024 17:51:10 -0500 Message-Id: <20240123225111.1629405-4-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20240123225111.1629405-1-sean.anderson@seco.com> References: <20240123225111.1629405-1-sean.anderson@seco.com> X-ClientProxiedBy: BL0PR0102CA0069.prod.exchangelabs.com (2603:10b6:208:25::46) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|AS2PR03MB9792:EE_|AM6EUR05FT044:EE_|AS2PR03MB9443:EE_ X-MS-Office365-Filtering-Correlation-Id: 35b9a4e5-d2dc-42fb-416d-08dc1c65e1db X-TrendMicro-CAS-OUT-LOOP-IDENTIFIER: 656f966764b7fb185830381c646b41a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: dbKl2GSIEU30j42pVyuHNhqMEB33Y6B3qjRH/G1c2CkKPzlClcPQw1/ZIPlVbXG0YVlr183M+bfGxH7fR0W8YABobr7NdIv7SRH6XA/xFWh/SjpntOykhVU8sOme15PhvPQk9nDGCWW43i8WTlHDSJ8Ijhqt8JBAyrw0sj6iReYnzDDGaqrw0Dc+Zs21cc0pMFe/nH3NzgnGiaRjm+e/P7KpA/ZycieEETKg+xFQz+ig4Lf4NNmPKTW9evHlaxTaDqBmqeGnVUEGubiy6iwGlL7zdEnk+rLxXeXr+BO8/bSYafVQoVtaUcpiZiNQizy4q/BJhaKl/HW3j4TPc+pg5oTgdS+1ue/7wDEx1Z6uWyRC08BXCKoZaANFuMDAbScyXGAYhr/6kD/8YZcBFYDYmHSFSigj0Wd+N/eO7MTPQp17ndzC5SmU4PZF1hdCnEsUwXl2nbU9IK8DwW7euueRxXz+BgTSB4jzPfBro3J9GRNAJp8zNNA9JUfv+sDM71HBFeQeqNGXAbTx2rna9RMx0phKZUZFl1wLvxdP4vNWsQaJo242sgylqkvYv16RfYSmmfTo2Rs1PEeV8SzZWg+WFYWWysRrzcjNHQD6kC2w2ihwKP4VOU6PUgdtFBSt/asteUqf+MFf5tqjC1h3vMMbDc64E7kk1O4u0wIXkDjbZqY= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR03MB8847.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39850400004)(366004)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(38350700005)(66556008)(86362001)(66476007)(54906003)(107886003)(316002)(36756003)(2616005)(41300700001)(66946007)(6512007)(52116002)(4326008)(8936002)(38100700002)(1076003)(83380400001)(26005)(8676002)(2906002)(5660300002)(6506007)(44832011)(478600001)(6486002)(41533002)(41080700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9792 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM6EUR05FT044.eop-eur05.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 37430a67-1934-4ee7-4a13-08dc1c65db8f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9cOx/PpJv9OvHS36WoUZvPrpkIMW7sRZE+hLkVUu2vJIwEPQoMzVyO/sEDvkvD/9HCGWgH7LhoWHk0uoZ7GrTVpB/uFEBnmRTaItrJfAWNfHK46PMRQJSkKyDIHC8Wn/1BMGNWT4bL8BfwT6hy9qAd4ugpF6SS26IMbXJXzS8QS69DM35Re3pBcvNgQCMGry1FC7C7ev2KU66wEOD69dn3e3U/DI60HyZsToce0aS2U32oKwg+/SVUy1ZXgIwQF53nhsdoALASNtOXbBua9nWubtCeJHk/sCAhUJsEnXTNZag2JjWcbPgEF2M5snS2LbxNfjQjA0Ykz8ISJp3sCsu1Eij+YTTx+xQ+HVlbZ+TA8MZWY7PTOnhFF9hN2HA1r3nmZQ0fajMP8pEqOBWdCyKiWvT5wQMja8Ju/oezT0uJtrHsLoA0D7JI3RT3xS2zome9Sdk61NxalnsS/UaVEqeDKkM0pZXCIP/vzBUy40lMTK2g135EP/FlGCj9f9s7syEdgCrmtrTJET97OcJqaxlBASbSEipKF9JRd1WNBBe4DLILr5y/rTBM2RISTqme1i5KansY8WSpJt5W+hkDAg7mNiZuI0I2hfp7SitcAmxu9jAQ5e4Emvd7LZheSfv2aXvm8bX4bB2YnFa5ZjNI/88BwKSTDrY76s14YeVoe30S/2wXdqFWWXTVZjJVbtV/P/n1Q67Iq5c07MUdtMwWKRRZ3uvNpE+miOfrP4ibQdOG8K2DUlJJLLsgSrmzfETVtI4Ki0IDdQcYfmg9Bat04UTSycgrdzkQUJEniWz5saLw9iDvBk7GCk4IWXkWQHitc+NYu4aNs+fytJ6T1KrL1fdA== X-Forefront-Antispam-Report: CIP:20.160.56.82;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:repost-eu.tmcas.trendmicro.com;PTR:repost-eu.tmcas.trendmicro.com;CAT:NONE;SFS:(13230031)(39850400004)(136003)(396003)(376002)(346002)(230922051799003)(64100799003)(82310400011)(186009)(1800799012)(451199024)(46966006)(40470700004)(36840700001)(6512007)(54906003)(70206006)(70586007)(2616005)(1076003)(107886003)(316002)(40480700001)(40460700003)(5660300002)(336012)(6506007)(478600001)(26005)(6486002)(6666004)(83380400001)(44832011)(2906002)(36756003)(41300700001)(34070700002)(86362001)(7596003)(7636003)(356005)(47076005)(36860700001)(8676002)(8936002)(4326008)(82740400003)(41533002)(41080700001);DIR:OUT;SFP:1101; X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 22:51:48.5816 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35b9a4e5-d2dc-42fb-416d-08dc1c65e1db X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bebe97c3-6438-442e-ade3-ff17aa50e733;Ip=[20.160.56.82];Helo=[repost-eu.tmcas.trendmicro.com] X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT044.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9443 Some USB controller drivers call otg_set_vbus when entering host or device mode. Implement this callback so that VBUS can be turned on and off automatically. This is especially useful when there is no property for a VBUS supply in the controller's binding. This results in a change in semantics of the vbus_draw regulator. Whereas before it represented the VBUS supplied by an A-Device when we acted as a B-Device, now it represents an internal VBUS source. Accordingly, we no longer set the current limit or enable/disable the bus from nop_gpio_vbus_thread. Because this supply was never initialized before the previous commit, there should be no change in behavior. Signed-off-by: Sean Anderson --- (no changes since v1) drivers/usb/phy/phy-generic.c | 45 +++++++++++++---------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 16494030209e..f7db24b5ed5c 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -74,33 +74,26 @@ static void nop_reset(struct usb_phy_generic *nop) } /* interface to regulator framework */ -static void nop_set_vbus_draw(struct usb_phy_generic *nop, unsigned mA) +static int nop_set_vbus(struct usb_otg *otg, bool enable) { - struct regulator *vbus_draw = nop->vbus_draw; - int enabled; - int ret; + int ret = 0; + struct usb_phy_generic *nop = dev_get_drvdata(otg->usb_phy->dev); - if (!vbus_draw) - return; + if (!nop->vbus_draw) + return 0; - enabled = nop->vbus_draw_enabled; - if (mA) { - regulator_set_current_limit(vbus_draw, 0, 1000 * mA); - if (!enabled) { - ret = regulator_enable(vbus_draw); - if (ret < 0) - return; - nop->vbus_draw_enabled = 1; - } - } else { - if (enabled) { - ret = regulator_disable(vbus_draw); - if (ret < 0) - return; - nop->vbus_draw_enabled = 0; - } + if (enable && !nop->vbus_draw_enabled) { + ret = regulator_enable(nop->vbus_draw); + if (ret) + nop->vbus_draw_enabled = false; + else + nop->vbus_draw_enabled = true; + + } else if (!enable && nop->vbus_draw_enabled) { + ret = regulator_disable(nop->vbus_draw); + nop->vbus_draw_enabled = false; } - nop->mA = mA; + return ret; } @@ -120,14 +113,9 @@ static irqreturn_t nop_gpio_vbus_thread(int irq, void *data) otg->state = OTG_STATE_B_PERIPHERAL; nop->phy.last_event = status; - /* drawing a "unit load" is *always* OK, except for OTG */ - nop_set_vbus_draw(nop, 100); - atomic_notifier_call_chain(&nop->phy.notifier, status, otg->gadget); } else { - nop_set_vbus_draw(nop, 0); - status = USB_EVENT_NONE; otg->state = OTG_STATE_B_IDLE; nop->phy.last_event = status; @@ -291,6 +279,7 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop) nop->phy.otg->usb_phy = &nop->phy; nop->phy.otg->set_host = nop_set_host; nop->phy.otg->set_peripheral = nop_set_peripheral; + nop->phy.otg->set_vbus = nop_set_vbus; return 0; } From patchwork Tue Jan 23 22:51:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13528247 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2083.outbound.protection.outlook.com [40.107.6.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE7645579C; Tue, 23 Jan 2024 22:51:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.83 ARC-Seal: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050311; cv=fail; b=K7/2Rci1fJGCZND2VMn9GVFjYBHHP7j6KCG0zTEqP7O9A+DqsRLVLHtj3DBSzkJttY9pd9lOoCAYPz9+AdEgjDuMw4CflI/jvlcH9BDI7TgNiImX5DxcRzDgi1ihkb5xlMP7U7InLlkyN89INyeg0c7ZepQLd9ZA0YX5ZdMUtGE= ARC-Message-Signature: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706050311; c=relaxed/simple; bh=bBFNxyKCqMbbqEC3lQqJ7YpRcDP93E+zGlTTHc6lDWc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=sWQlTq/urp5h1aUntj7G6u+1hmUEWtx5RiIMyTmzD3+oBtaozR6G53ATkVaE6N+l1yNoIHHdE5Jy8nlgiQNBbM37zvb+RzGX29RDlPccROQ+ts9fcrcFTAbVq24/gMzLhAUYSll5Q9mp54rzHTbAsyi9jU7nIy7EJ+62AiomfYc= ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com; spf=pass smtp.mailfrom=seco.com; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=S/66t+jD; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b=S/66t+jD; arc=fail smtp.client-ip=40.107.6.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=seco.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="S/66t+jD"; dkim=pass (2048-bit key) header.d=seco.com header.i=@seco.com header.b="S/66t+jD" ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Fzf56AtHV3LcVSlrjVXPysQMMKOdBr+QJiOtPPjBGwV0Z9oSwVQOJ5K5i5+vvlZa1MXhD2bvuRcAykhHwnznzcnXE6fXEVZU3A+KNxhI71AyPBEE55obpYPA6FbsL7o0yQtsuWpFHmK0bBy1lXJCVrVaJk1BbF092R604mKQLvvZQydQF2Ok+Wpdva1VZMPdK/D9fzmxgpXr27iHCTBjbh82itEJETnoXAs3rBlB3kHMNVrBVnbGQaBsZ4swFIqdzQ4oq/ZB3G9l4R3n4jKxM/gRA/7Kru6d2k1CVLv990qIOSuXTSW5x/YFWnzyWkje5qMJrEzswMunGxqAD/+eZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q8sybV/71v3h0YGhOB/V1pRtcF6A37dYKfB0RiFZMNY=; b=FCA91st7k2ilBGipZeYpSvbVzYJAAn3Z/baEZDhLnIkzUt9Qo9NUXZ6Wvaq56zpCqiOmOF9msYza8BHonnqqI3d1bE1AkD9TC9s4XKM8uwFuGlJ4mldYdcjL1OZEQubTpIfnOVE3lqAnkR6mEeo/L+7Lj4t9RpwYRyZ7gRItG0HvrmQSzVfhAsRR0SfCJZYU9tRgy+dfwlRkkNg9iT6RuQI4YhTyKdqLnysTbfHWRuu1zIEDxFAqW6Qm/zZKKFIPHaDXGzcOcxXOPOJQ1zDbQqN+oR6drmVo1QEWVjzvhVYpu9ZMiILZhFlSsAqIBLgF88fmTkjz45hkbsg9cO3A9w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.160.56.85) smtp.rcpttodomain=free.fr smtp.mailfrom=seco.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=seco.com; dkim=pass (signature was verified) header.d=seco.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=seco.com] dkim=[1,1,header.d=seco.com] dmarc=[1,1,header.from=seco.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q8sybV/71v3h0YGhOB/V1pRtcF6A37dYKfB0RiFZMNY=; b=S/66t+jDjch9O7FuSTeA4PPGC6S70crhSZkCic52TqpOTuqE26CQstqfwZgf15xwj9GiIECHMYml7u4hDrDOEiypuKp2UKVh5LKovMxbVqS+ZJqTdE1QJq8vV0aSlokqlBCNU7T9d6rAO7/ui6FZenUWYdT6JABRYxfxf3KIaaRfnLRPGE1QUAxYL6c+IXoBSiJEeo3s9NSdM1eyxK0OJHdExbaROqP0B1BEMLTNazHUJMKeX047uOMoTBjMeabh0ql6rArtB8YE9xUgE9x2uZOnOGj9dgczA8hQCzI5z+K200apYLtklAtJxds03n9oCZYmkjCM4LuiJHfpBxU2pw== Received: from AM0PR02CA0200.eurprd02.prod.outlook.com (2603:10a6:20b:28f::7) by VI1PR03MB10158.eurprd03.prod.outlook.com (2603:10a6:800:1c9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:45 +0000 Received: from VI1EUR05FT021.eop-eur05.prod.protection.outlook.com (2603:10a6:20b:28f:cafe::bc) by AM0PR02CA0200.outlook.office365.com (2603:10a6:20b:28f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37 via Frontend Transport; Tue, 23 Jan 2024 22:51:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.160.56.85) smtp.mailfrom=seco.com; dkim=pass (signature was verified) header.d=seco.com;dmarc=pass action=none header.from=seco.com; Received-SPF: Pass (protection.outlook.com: domain of seco.com designates 20.160.56.85 as permitted sender) receiver=protection.outlook.com; client-ip=20.160.56.85; helo=repost-eu.tmcas.trendmicro.com; pr=C Received: from repost-eu.tmcas.trendmicro.com (20.160.56.85) by VI1EUR05FT021.mail.protection.outlook.com (10.233.243.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20 via Frontend Transport; Tue, 23 Jan 2024 22:51:44 +0000 Received: from outmta (unknown [192.168.82.132]) by repost-eu.tmcas.trendmicro.com (Trend Micro CAS) with ESMTP id 4359320083980; Tue, 23 Jan 2024 22:51:44 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown [104.47.17.168]) by repre.tmcas.trendmicro.com (Trend Micro CAS) with ESMTPS id 0BB1A2008006E; Tue, 23 Jan 2024 22:51:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SiibGJKqFUQeWSx4ApiE5zFsSNuLdiZ2W3zGF1dTb8AzMShfyTVINE5ZhGVGflEV2b9GMra4O8Mg9MbtOTEQR/MzmBpb6B5a1SvPYbuWWMUg1c4XaYkReQo1Y0s9EsIR4au351edhPmTtdnaEXMXlnBrCco89jcqquThHFr32Ti7547H0Kf+MtrZwFN1a8ZI0U2PAERARlQzZRwS/yPXlluS503B/yNWOz/p8sSayAsUVHUaMz+D8+chSh2qDQWweyOXqle5SYoqJZyO0TKLA6pYh6M6Umlzv8P3H4Nt/sdYXsCo0BbWcJTaONCvf8VKoJHze72iwaDpAW5+vskHTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q8sybV/71v3h0YGhOB/V1pRtcF6A37dYKfB0RiFZMNY=; b=EmkPBTi61wv8XKZ4HpxOAKYRabu2vfEWsNvh+RnAF834G/9QAHyvq5RWPxpKWyQZQ5MAUntwPOfvk+5ZLp21fe42Tzieu8OqCzpg5oPkj4WSpyyeHpLaNtWLwUKtZh5rfayTrU+21aghwYHWg05sO/nBX3Kyi5znDAdn1yEetG56COiWw//RNG7DLYtD8WO8/A8ECuGLpIaZArBsjoyy5t8PzWNsX85Lco66GVza8vNXqNC4GZK7NDV4agOwTYLrdv7K5/u6q8tOpZfm4ku8uvMuff9mqYCZIRLSVmBZx5SIgTYYfnpFPQBh8z2McS/DeA0Y7umPqj2TmOvMY/bBWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q8sybV/71v3h0YGhOB/V1pRtcF6A37dYKfB0RiFZMNY=; b=S/66t+jDjch9O7FuSTeA4PPGC6S70crhSZkCic52TqpOTuqE26CQstqfwZgf15xwj9GiIECHMYml7u4hDrDOEiypuKp2UKVh5LKovMxbVqS+ZJqTdE1QJq8vV0aSlokqlBCNU7T9d6rAO7/ui6FZenUWYdT6JABRYxfxf3KIaaRfnLRPGE1QUAxYL6c+IXoBSiJEeo3s9NSdM1eyxK0OJHdExbaROqP0B1BEMLTNazHUJMKeX047uOMoTBjMeabh0ql6rArtB8YE9xUgE9x2uZOnOGj9dgczA8hQCzI5z+K200apYLtklAtJxds03n9oCZYmkjCM4LuiJHfpBxU2pw== Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by AS2PR03MB9792.eurprd03.prod.outlook.com (2603:10a6:20b:608::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 22:51:39 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::ec0a:c3a4:c8f9:9f84%7]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 22:51:39 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: Robert Jarzmik , Felipe Balbi , Linus Walleij , Jonathan Hunter , Mike Looijmans , Jules Maselbas , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH v3 4/4] usb: phy: generic: Disable vbus on removal Date: Tue, 23 Jan 2024 17:51:11 -0500 Message-Id: <20240123225111.1629405-5-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20240123225111.1629405-1-sean.anderson@seco.com> References: <20240123225111.1629405-1-sean.anderson@seco.com> X-ClientProxiedBy: BL0PR0102CA0069.prod.exchangelabs.com (2603:10b6:208:25::46) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|AS2PR03MB9792:EE_|VI1EUR05FT021:EE_|VI1PR03MB10158:EE_ X-MS-Office365-Filtering-Correlation-Id: e1505d66-841c-434e-bfd6-08dc1c65df7c X-TrendMicro-CAS-OUT-LOOP-IDENTIFIER: 656f966764b7fb185830381c646b41a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: jeiQAm9Cw22zxl4morB+b3v6v2pYKm4QDWgqKfM0JCj6JRdfdDirgzb1iBkWq4gaeYH44wMaiR4hpY49Bx95xGTD8EgjKrulqXlnBMqCRV5l7+5GQpDVlDbXJRaGOMR8U+RU5ofEyqqCHNwBptNtn4w6TZkhd4baELQRcWQM4JepQl0v7gvSlbzr4CqwYMorGW6ixdtJZwLvQHRWJEGmdTXVuRkq6haSaWDw/r0cByDijF6QyVTxDMydZsDA/VdWbfI4DKvbPJJbSLtqzPGA1cnRQaQWua524TyphvMc7hlGNO9flycYxZXK/7ds2HyO9m9y6i3Gzthfi37MzQ6K0Uu8R5Rktpd8okAj79hgkoIglfVhBDnQXLelsS9f6Tu8fKMaAbfUgMzxu4s/3w1yG53uumCl4hdFVfjOE+f2tmCooYFLRF3C/S/CLdDT/Lk9VcGfMkqBDi723meMbkDdUQhzXDspNfthwyGwEnIhNFNnoK8gm/xzbTaHgQR/bB+I/2AZmUyWZ2ksTNgkamocUnBcTWHiKSGB4Ak8fof+V4ZlmiO8ZSv1fkGnwZF0TAy77scJs+z5GvGWjlSPyowb5T65R4iy7kBNNkRHwJrowBcYtn1PBnfUjO/M/Pn/LQbb8ud1hR1MwzIavA17hhCVrMnVpJL/ay7wGg/UIRNAL48= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR03MB8847.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39850400004)(366004)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(38350700005)(66556008)(86362001)(66476007)(54906003)(107886003)(316002)(36756003)(2616005)(41300700001)(66946007)(6512007)(52116002)(4326008)(8936002)(38100700002)(1076003)(26005)(8676002)(2906002)(4744005)(5660300002)(6506007)(44832011)(478600001)(6486002)(41533002)(41080700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9792 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR05FT021.eop-eur05.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7cb7f4ee-d894-43d0-87ce-08dc1c65dc5f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NnWS9/ePXecFS9sRobzscrObhZnwx2gU36/+KanCQOVyGedAShvDjGeo+QWPjL+s/GlUXnxshHn5Os1y9zjpjyfxQqpm2DVdnRuAFuTb63A7w6V/TbLlAeWL5X0RlazFl06coNQ1Y5duO6mo3n8rYAbrwFOVi+9sA2T2Beui5jUFvTWaxiCLRWXGh7DBfjbE/oo6B+0lTK8NXvbcHRvw6sm9X5j0mwn/YzXLQrYcpRS+6cDw2Inj6pinBhJoeAiuponTDLYLiF5CRYSW30GdNvN8PK2kucGkZCmmYdxKYkfKOmUckiINNgbuiNOSFX5lMWsfKE6KYk8jfpvEPzjhJRACyfu3h3L/Cpq0motVHkS60Nu3Qvd3Q7zRCDRvLFxykf3NsfyTTJFPmm+4+4IZFj3VChEy0C+j9ujOBkpjiD03F3QIB4FY/5GuKc4yk15ZkLlib/YKzjTItOplpx2a49AUmNsHqwGTAAFxURSfFO/3oa9IyAij5dVpfs9PDTHKG6HK9RCW+7/EvYw4D2AYzqunHJxfuR7FqxEYNHI/TJeXmQwinkaMBDAtu4yIfqCTjV732j8evd58h1JbQaB2yD637e+xT1got7R77p0vd5ne83NyUFKGOu1uQSCvVoGCTYu3gk7+burjv7GMpKgemtpbV4hLpbGo5eW0STgZSisCgJtG8gWFqR+B3HfH08sJNoQlnJOGWcMkoR+CzsuMCWIdjAzztf3UlSucdm0D0jfQabTWIXxRN0H3RfJlmRxbajdnBLd6i4gkKV6h0lVKlw4iCZlWipAOXybbd/QMa5g= X-Forefront-Antispam-Report: CIP:20.160.56.85;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:repost-eu.tmcas.trendmicro.com;PTR:repost-eu.tmcas.trendmicro.com;CAT:NONE;SFS:(13230031)(39850400004)(396003)(136003)(346002)(376002)(230922051799003)(1800799012)(82310400011)(186009)(451199024)(64100799003)(36840700001)(46966006)(40480700001)(2616005)(5660300002)(1076003)(8676002)(6486002)(4326008)(336012)(6512007)(44832011)(8936002)(47076005)(316002)(6666004)(6506007)(54906003)(70206006)(70586007)(478600001)(26005)(107886003)(34070700002)(36860700001)(356005)(7636003)(82740400003)(7596003)(4744005)(2906002)(36756003)(41300700001)(86362001)(41533002)(41080700001);DIR:OUT;SFP:1101; X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 22:51:44.5755 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1505d66-841c-434e-bfd6-08dc1c65df7c X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bebe97c3-6438-442e-ade3-ff17aa50e733;Ip=[20.160.56.85];Helo=[repost-eu.tmcas.trendmicro.com] X-MS-Exchange-CrossTenant-AuthSource: VI1EUR05FT021.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB10158 If we enabled vbus, we need to balance that with a disable. Signed-off-by: Sean Anderson --- (no changes since v1) drivers/usb/phy/phy-generic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index f7db24b5ed5c..8f735a86cd19 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -337,6 +337,9 @@ static void usb_phy_generic_remove(struct platform_device *pdev) struct usb_phy_generic *nop = platform_get_drvdata(pdev); usb_remove_phy(&nop->phy); + + if (nop->vbus_draw && nop->vbus_draw_enabled) + regulator_disable(nop->vbus_draw); } static const struct of_device_id nop_xceiv_dt_ids[] = {