From patchwork Thu Dec 7 11:51:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13483190 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="TIFlxI8U" Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2064.outbound.protection.outlook.com [40.107.20.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB95D54; Thu, 7 Dec 2023 03:51:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d2Jlig73syQmuHl1fFPe5+lLtPm0y46e6zVfpEY6nLWOrQz6qrJCtsF2ghVPoKnwmHyh0irIBb3qLYbl1+HKOlrhxv6c05n9QZvywiKQwH+eMsGur8ASzCqH1KIGfsYERtF4SJN7wlq/ffVZVKG/xFDneGW0Ai373OSc3mako0O06CT6wB1OeS3GGHyLgdZQWALgVi8ReTgENRi1y+dpENufPAAZ+q69CzXdNFHNtULVMBPZ2jU/Hiu/BpE/LGOool9iIvNpLEwRG6QMxCS/CBfgE2N4cLq7rtxBeGCcKiaUt1kSUoQbbo+RGvrWEwxosztSgeetn6dubZcRxVjhKA== 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=W1EvpbwTcE0dmc5Eff9wwN5OYVx9cnoLMYn49rscy3w=; b=mgXnA4bnlu5vzNHfPkWZdHlTcrrFLY7T6vrpTG3oTEv/DfoH7HXYMSHq7KzY3/HKcUsHugFF3AE0zGgeRW+Va0/Plamm9TVxS4csJZ/GkeYvBDo5Lc5Yg31dU4V+UrIF3HRMZcoLNPDx5m6Cha/fQFTLWxF7YGO8W64TjxN6HISfpl7GrCbafJvA/77GFPrfpAn/kSMK7qY6Z8wpxYOH3cDGvDo27laPlPjqXGho6yLjgE1VMhKdpGrfMkIf3BQ0idHfJAFcnuyKOpwuweAHI9VcQ0VD6h1K2lfx+NcW/legX2GM2IF/nqImtaAY+IcjTSU+xpffh8r5/cH3LI0FgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W1EvpbwTcE0dmc5Eff9wwN5OYVx9cnoLMYn49rscy3w=; b=TIFlxI8U3Acy2Mb0+CFPvx11fTTtwDldqMGCZdtJgFnX/xww/L9I1c47J14Wpam6gAribLY+EG8nLEnFeXH+4RdwUM0NLybZGIfxL9XlhWzy/exDbdmVKi4qvjjppEW/FtvTlw7WaoF+FdcGzVwfdcJqa3uHCcrtnqAphO23RH4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DB4PR08MB8054.eurprd08.prod.outlook.com (2603:10a6:10:389::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Thu, 7 Dec 2023 11:51:13 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6b40:1e6f:7c94:71dc]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6b40:1e6f:7c94:71dc%4]) with mapi id 15.20.7068.027; Thu, 7 Dec 2023 11:51:12 +0000 From: Javier Carrasco Subject: [PATCH 0/4] usb: typec: tipd: add patch update support for tps6598x Date: Thu, 07 Dec 2023 12:51:05 +0100 Message-Id: <20231207-tps6598x_update-v1-0-dc21b5301d91@wolfvision.net> X-B4-Tracking: v=1; b=H4sIAKmxcWUC/x2N0QqDMAwAf0XyvIJG7HS/MsZIbaYB6UqjQxD/f cHHOzjuAOUirPCoDij8E5VvMmhuFYwzpYmdRGPAGtsG67tbs/pu6Pf3liOt7HyLTMEPETmCVYG UXSiUxtm6tC2LyVz4I/u1eb7O8w+Hs1u5dgAAAA== To: Heikki Krogerus , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701949872; l=1454; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=xF7pyOOXLNRg0gFMI7b0P8Qq+n3rgDPuNEC0fPw66FE=; b=ieBeCd5rrU/ZbQFnJ0vuTs9BB3clUDy51ZvOBah1fkpVZR1c+vo0V7vcYvx9SRq1wiUYadIyD F8Yr+QFKI49ABNkVPjG+jA0AufTg4QHwVmKnKmAHL3h1Hui5Uo1zeVg X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR08CA0248.eurprd08.prod.outlook.com (2603:10a6:803:dc::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB4PR08MB8054:EE_ X-MS-Office365-Filtering-Correlation-Id: 86432559-23df-43a8-8020-08dbf71acf9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nsoRDmKbiNslHMJcbPcXy9bFd4V/b6KqZ0+ScYSMflWfsuBB1m2rBEG5oszF+/GLArkCOWdaqzBuZAvC8X6W/6nFzKvlNwPyCegojFRVY56rh1c+RIQ5aTHBnHDz1dzYuyy7JEHaTiJHFexFW/CqHU61P8w9Kb8KcRgOZau5DY0qG8xzjPntX0WhAjKXSKLtxqNWX5e6pbwk4YYj6f08/Bxa++TjrA9UHpcFz0cyu7moezc8Nf4M6R0iUNrHKuRu4tSYWGMR22zLr7rVjuj77k4jWp0RYOEyaHpM0aw+EkyfyoTo+vpcMnVz6cPBcwGDghkMkow0ZsNM3QAu4EkybC1M0LW7PkIYX1tPK63TeuLJXWiZZ9uuVKLvAo5h7ACmqTrKZugXLTdiSXHRobaD3h/oWyU46cB9bwSo44NJh20plI7JdScsDC26/hQ4sMfuuDr7NSP1haHBYhrbWvWNp/Uokwcm25JhfPSJgztNrxeMbT3ykIt6qXq1xlnT3A/XRuULf9RQtabAxRWAOnw+dCfBYlVQ2CsMfmJGZJMBzfTCIyVfW11anPYLCHoIP5tfKvry6B5YDjcyQ014JZuLJw/EHrwet+tPz3nDb6Q/BhLi2JkExVdc3MuO5ZPQm1ix X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39840400004)(136003)(396003)(376002)(366004)(346002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(52116002)(38100700002)(5660300002)(15650500001)(38350700005)(2906002)(2616005)(6512007)(83380400001)(6666004)(6506007)(107886003)(26005)(110136005)(36756003)(6486002)(478600001)(41300700001)(44832011)(66946007)(66556008)(66476007)(86362001)(8936002)(4326008)(316002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?UkUdvEvFTVQ2CdLKAstXAxYg+lhe?= =?utf-8?q?1gMxC0PtpToa8Pl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q?LLwfJIwKGv/1bErz4hodWWrgAON0+iXfl/L2C0bnYpNklkbaxGbo66yMoAj6hlUZS?= =?utf-8?q?r6l2LuEx0/IoE4Qcrftwl3r/Dcqg9NUdPBMtXloVSw3BwAcTcrUbFlr7dXkkqLmpZ?= =?utf-8?q?x2A2/YwJnq8FLK9fVF/YGPYWGiHrQCnAaDxzC0EluAhBjyLHekbd3VYBhn2Uu2T0r?= =?utf-8?q?p3pOCAaI/K/Y2UGkaEOFbW2lig7E/CHZe5e/dK9J8aEpV+mAiufoobj5uchsgxUNU?= =?utf-8?q?bwCry3D1QDFaU6t1o4l9VC8VV03vm6BX/Ujkr8a6Id5/SUoUSfQ+gWh3zr3HykwHD?= =?utf-8?q?+belF4UzgXR5Sq83wQrmi6IMCSgWs0A7ngi4HvopDGG3I2bT/hTRZWMX92bioQbsI?= =?utf-8?q?NKVPWqkG7BiavdGYnAhgoisukKiCOrviQ++5jI/PMFJuaIkM8iafZRN5/FFUuokX9?= =?utf-8?q?GwH7PELvoMe5JUZSO+AZxAN5tpMycTf+J3+hiRG/ysDXJ4nzs8F4Nil/JQRl/crFw?= =?utf-8?q?8ZIOIsRqiM6RGCAPkb9Y0+Af+udnHI4XBjeidxKRYD6utcHbem4R9VyhdJM5rdEBb?= =?utf-8?q?hLveJD84CagnN6u32OrHyr4cd1/VaO4qAaKJE5C8ENVzhQagwEG9FwarDn9TQFKAw?= =?utf-8?q?RO1KlaJSdi0Stt/ljhhT9CzVPQTjQkPv6LjlSgBaQfWU24DbOQtYxhE=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 86432559-23df-43a8-8020-08dbf71acf9c X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2023 11:51:12.8557 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w33Bmk7MlwVQ9qwfrazJUH109bOuMMB1WRe3s1hyL1BbC0zmcXjXo15YIeEDuiY6h9IuxOdgaSQ5HjqQPeKc5wdY8riwEHFSVeaBaZrjtbw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8054 This series extends the patch update mechanism to support the tps6598x. Currently there is only support for the tps25750 part and some conditional clauses are used to make a special case out of it. Now that different parts support patch updates, a more general approach is proposed. The update mechanism differs from the one required by tps25750 and it is explained in the commit message as a summary of the application note in that respect. Note that the series makes use of the TPS_SETUP_MS introduced in commit 6a4d4a27f986 ("usb: typec: tps6598x: add reset gpio support"), which is currently available in usb-next / usb-testing. A TPS65987D has been used to test this functionality with positive results. Signed-off-by: Javier Carrasco --- Javier Carrasco (4): usb: typec: tipd: add init and reset functions to tipd_data usb: typec: tipd: add function to request firmware usb: typec: tipd: declare in_data in as const in exec_cmd functions usb: typec: tipd: add patch update support for tps6598x drivers/usb/typec/tipd/core.c | 151 ++++++++++++++++++++++++++++++++------ drivers/usb/typec/tipd/tps6598x.h | 18 +++++ 2 files changed, 148 insertions(+), 21 deletions(-) --- base-commit: 522c35e08b53f157ad3e51848caa861b258001e4 change-id: 20231207-tps6598x_update-632eab69d2ed Best regards,