From patchwork Wed Aug 2 06:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Looijmans X-Patchwork-Id: 13337694 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 A9240C001DE for ; Wed, 2 Aug 2023 06:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232208AbjHBGlj (ORCPT ); Wed, 2 Aug 2023 02:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbjHBGlh (ORCPT ); Wed, 2 Aug 2023 02:41:37 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2088.outbound.protection.outlook.com [40.107.13.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACBFD2733; Tue, 1 Aug 2023 23:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q8hVyfjetBJqsLtSWSokzEMsVJPKcAlrdf1r4DCEzwPrZ6NC6u6lK0tWxfE7R0nE/7Wgk3SemHeEJ64k/jnFlLdJV//nay13u6rQamS5z2gou95OHwW0nVX1jz5TVqOm5VSuwv01QmkukZ1gb7zlxsV2Cb9XO27D7E3Qcf7BdITZDkqTicavEa3Pd4VfYsSLqnAxVTpKM3qH5s/nbS8MaDDQ31cRf9S1SdvTtjztTbz1U/ottSlhtPbg8ZM7VNzcNDXoW3QuRVJqW9Lh96X7D1avfaC4Fm3tU7rClp9puOXGrN3dmcqRpeNYQ+BoYhrvI9XKKtZ+Mu2TYFiLsftxfQ== 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=lxZr3nVoXjvyOrnj4iRj6pQreeGJaq5LTOgqRYntHCM=; b=SlDYhVMfgojEDP0FJRRtNFvoLbVJxC9ZRsz9rNk2IKPm1TURd7GVsdZufyw24ucVYMgi8+f/ocjynf6NDf58nUPhYcqneK3Gn5CxQ0CqiEyJ9S8bJ5D+uSG6xETdwaSgqbRwR4xVe6dxDnUBU5OHxVAO4Io3LUvIlkjoBcJTIiky/anHh5Qzotr1r+e7hnaM6uMUX+pE33dhsM4uhXs6vf7qB7o3eQJdBifl8ixLKTf9mcehVyY+PBSEVEIqt36EsojYYUqfbbSzACDzpBVzxdjaDsyhtzqNYY6vDlrFDbwgdbAGCCq7yIIn4fogCZBi839pj4gfgWKVd6dIvdwkQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 20.93.157.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=topicproducts.com; dmarc=none action=none header.from=topic.nl; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=topic.nl; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lxZr3nVoXjvyOrnj4iRj6pQreeGJaq5LTOgqRYntHCM=; b=tBSKM4MHn05hYwL3+R3wGnP60ZI+q/owgma2TE8Jt4CgUJv6Thu2yo77+Z6FnI5SgOWHIiG+/st7hsm/3+iQO/fe/QIkA5HRTCl98oXpAK0eTJZAZB9sU6GNmqMnTXGGQZdzFf8yd/g+ilG/2Irz5Cj4sgZrp/TCmaFf+lVA/ORYpOQfJ1OZTY595DAnm3P9XEnnQhHSvyZ3zYS+6MSEVzhsCuiGCnBI/KahKDU8kxI3U4GAJZzmoLUZxif4hnmJsLtv5B4EsY/Fm9a1wwjldjwO7wpX0FCnIvj61rGCnOqAGZgPWTgJjHqQZeXIyXhwRpXVsQW8AIjoll/2xRxc2w== Received: from AM6PR05CA0021.eurprd05.prod.outlook.com (2603:10a6:20b:2e::34) by DUZPR04MB9796.eurprd04.prod.outlook.com (2603:10a6:10:4e1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 06:41:22 +0000 Received: from AM1PEPF000252E0.eurprd07.prod.outlook.com (2603:10a6:20b:2e:cafe::3b) by AM6PR05CA0021.outlook.office365.com (2603:10a6:20b:2e::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Wed, 2 Aug 2023 06:41:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.93.157.195) smtp.mailfrom=topicproducts.com; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=topic.nl; Received-SPF: Pass (protection.outlook.com: domain of topicproducts.com designates 20.93.157.195 as permitted sender) receiver=protection.outlook.com; client-ip=20.93.157.195; helo=westeu11-emailsignatures-cloud.codetwo.com; pr=C Received: from westeu11-emailsignatures-cloud.codetwo.com (20.93.157.195) by AM1PEPF000252E0.mail.protection.outlook.com (10.167.16.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 06:41:21 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (104.47.51.236) by westeu11-emailsignatures-cloud.codetwo.com with CodeTwo SMTP Server (TLS12) via SMTP; Wed, 02 Aug 2023 06:41:20 +0000 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=topic.nl; Received: from DB8PR04MB6523.eurprd04.prod.outlook.com (2603:10a6:10:10f::26) by GV1PR04MB9216.eurprd04.prod.outlook.com (2603:10a6:150:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 06:41:15 +0000 Received: from DB8PR04MB6523.eurprd04.prod.outlook.com ([fe80::6b6e:1525:72e9:d02f]) by DB8PR04MB6523.eurprd04.prod.outlook.com ([fe80::6b6e:1525:72e9:d02f%4]) with mapi id 15.20.6631.045; Wed, 2 Aug 2023 06:41:15 +0000 From: Mike Looijmans To: linux-clk@vger.kernel.org CC: linux-kernel@vger.kernel.org, sboyd@kernel.org, mturquette@baylibre.com, Mike Looijmans Subject: [PATCH 1/3] clk: lmk04832: Set missing parent_names for output clocks Date: Wed, 2 Aug 2023 08:40:58 +0200 Message-ID: <20230802064100.15793-1-mike.looijmans@topic.nl> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: AM0PR03CA0079.eurprd03.prod.outlook.com (2603:10a6:208:69::20) To DB8PR04MB6523.eurprd04.prod.outlook.com (2603:10a6:10:10f::26) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB8PR04MB6523:EE_|GV1PR04MB9216:EE_|AM1PEPF000252E0:EE_|DUZPR04MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 03a32ab4-3ae3-474a-9b68-08db93237bf6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Qe5ex9kK4hvm6NuuECbHOY36XWqqYYyN6F7q2wwuXiWRJMgxq85Zz9vdMCUG9vtWHRb2kCCrocYASZa6xD8qVcZS4USOaia8nVxE1EjTt7/wBgNTfaTKoO9F6nIGj7YmTbyln1Y59hd7LsN49M+qrJOmMBlDyAnr57N5yNax+OrZ53v1zvzUg7Df82ehyBF9Hux6FsF/DtvvUbYGgzzCXaMJEtLptRiyyUb4XyiMSUFwU6aGul4zYnFYcbnTS6NP3w6MtK/DIFl14qx9KvlNm4xk0HqbI2s+KrlTvLg3I4yJ4//Lghg+VLBfex401Idfxx3w3H31D8HCNPKrIp6wOO/2a1E2+aBLio4lXZFDaQLlo62WpB/P4XXQ8VtHgAR3+SYnPO1s5kntqW1o2P96MDqVssvdBd8sZUXXWe2fwW5hV0k8ZPTvul3M7vUKCUWzC4M9Arw9GU3D23RBjNRNxBtpyCJltDVhMzj/aQdKeGFnxSDjUeogTYF8x1fhHpgkz9/jrlRFO8wgsT2MuTcvQyqBmcj9VqAR25QAvRIwwXPFLMEK5ydUiIUBbMZ9Hq5QZc/Hhjo/M9JWHk1gOGgqwI4i6fKzXoZZSHPNq+5ap7Bar2/Rlx9VYQAg3C3gAtAY X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR04MB6523.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(366004)(346002)(39840400004)(396003)(451199021)(66946007)(2906002)(66476007)(4326008)(66556008)(6916009)(6486002)(52116002)(478600001)(6666004)(6512007)(83380400001)(36756003)(186003)(42882007)(38350700002)(107886003)(26005)(6506007)(1076003)(38100700002)(2616005)(83170400001)(41300700001)(4744005)(8936002)(8676002)(5660300002)(44832011)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9216 X-CodeTwo-MessageID: 87c8c010-796d-4ba0-8734-e77592ff58b1.20230802064120@westeu11-emailsignatures-cloud.codetwo.com X-CodeTwoProcessed: true References: <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.05b2cfbe-0414-4869-b825-034b9be5bf9a@emailsignatures365.codetwo.com> X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM1PEPF000252E0.eurprd07.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 111acc31-e766-4ad3-4098-08db9323783d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R49i2Q59ONdutMYJLMIKQQAdhK8RYXN3PUBPu9CQnKRPUfbCJVKl5bKe2CIg4hNSwI26RrDLzjUJlLNNyX22ViqFvUipZInM8vNucqflCmVj8yCkmvGgO7m/xMtkuTcOpDNgg3xPwmcCCMyFi+WRCDr081v/NwuUxMKXbdyzUK/bBV18alOMMlmY7A03QIOEuIUAaKdkD82C9SpQTXkDf7Ore+vsWlrV8BDH8qCEyV0WfAC4tJZfOfkVnALsQKHdYvuJTASirzZtLlMpBTEftwryz7UHcAY8hh2pJo4EwQcGdslkkt5d+8jGHbTazbkzzptznOuYIgYwdtz+UKxLS4mi00pqotFM5/mxG0dby0FMphi/kGqrub7l5p07cNcUkH8Rz2Kuxc7qzltm8clGEQpUeLvrcprP0AXuwSVWC2a+2CRPEDYMu6Hi0VWo0Dro/Lfqxv3Ixo66RYtU0amJbebQ+/C/hwM+l9vDzYKKNN38UFpheaWK5KpPjXtsAChE+Udj00u9FMZNifHOILZiVlz8E4v+5A2AEp3ha+lY5GS3rXXOkIpcNK8BfvOiFR5rFb/X2+p2+vQaXnR7jTYScD6wxEa8dp2akMqVZ+01SBpqEJ3P357T5gOEyZhfp8x8g3S9vIT8uCsWXeuwGMgxmVLpSB/q22aHXhF86bDpnR6/npIkbE4droeBIMMOzQx5 X-Forefront-Antispam-Report: CIP:20.93.157.195;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:westeu11-emailsignatures-cloud.codetwo.com;PTR:westeu11-emailsignatures-cloud.codetwo.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(39840400004)(346002)(396003)(82310400008)(451199021)(36840700001)(46966006)(42882007)(2616005)(336012)(107886003)(6506007)(1076003)(26005)(186003)(83380400001)(47076005)(36860700001)(316002)(70206006)(70586007)(2906002)(4326008)(6916009)(5660300002)(44832011)(41300700001)(8676002)(8936002)(6666004)(6486002)(6512007)(478600001)(40480700001)(356005)(7596003)(7636003)(83170400001)(15974865002)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: topic.nl X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 06:41:21.5642 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03a32ab4-3ae3-474a-9b68-08db93237bf6 X-MS-Exchange-CrossTenant-Id: 449607a5-3517-482d-8d16-41dd868cbda3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=449607a5-3517-482d-8d16-41dd868cbda3;Ip=[20.93.157.195];Helo=[westeu11-emailsignatures-cloud.codetwo.com] X-MS-Exchange-CrossTenant-AuthSource: AM1PEPF000252E0.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9796 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org lmk04832_register_clkout forgot to fill in the parent_names, resulting in the error message "Must specify parents if num_parents > 0". Signed-off-by: Mike Looijmans Reviewed-by: Liam Beguin --- drivers/clk/clk-lmk04832.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c index e22ac93e0c2f..188085e7a30b 100644 --- a/drivers/clk/clk-lmk04832.c +++ b/drivers/clk/clk-lmk04832.c @@ -1297,6 +1297,7 @@ static int lmk04832_register_clkout(struct lmk04832 *lmk, const int num) sprintf(dclk_name, "lmk-dclk%02d_%02d", num, num + 1); init.name = dclk_name; parent_names[0] = clk_hw_get_name(&lmk->vco); + init.parent_names = parent_names; init.ops = &lmk04832_dclk_ops; init.flags = CLK_SET_RATE_PARENT; init.num_parents = 1; From patchwork Wed Aug 2 06:40:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Looijmans X-Patchwork-Id: 13337695 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 5DDC9C04A94 for ; Wed, 2 Aug 2023 06:41:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232223AbjHBGll (ORCPT ); Wed, 2 Aug 2023 02:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjHBGlh (ORCPT ); Wed, 2 Aug 2023 02:41:37 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2048.outbound.protection.outlook.com [40.107.13.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2FA272E; Tue, 1 Aug 2023 23:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e5XWZeeUg1oe8GQ0hDJmj24ZEpykFmHOVaqDYCSpBHDTwbTfpXiS6OAi08Ga5GhYS7W+tbpZ5fws0v5sy/1f71DDbnLWWfyifX+Qi5Ka3Jak4TGCFyhJEoABedNHZn0gi6yFXi3NYVGSpVo2PvaZ4jKSd2MiNrctLA8ZDOFUbseEEaD6qjqpGCqTxXuaURH6Bmi2RTjR0ppraeBFFbyIoEN9oHzPgyxvmZELlBZRZfcwvTj2f3uEzZQscqbqHITulTalq8Uq0Tgciach0oenmJ18kYHSFtgAEOHEJbimkSkYbMqJwkBQHiduLiwscK1qg2R6hLlELau7P5RMt5S2Mg== 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=Co7+Dz3AuUEofB16svfU2XU+AoW/iZrolpp4aKKuxdI=; b=h4KL9tlPYcJyob1USuglXezB24TWRJ7rDMjMMkv2Qu7bXORYqdVctMvZKX2hWDpantz3IdFOwUFLQTyM4TTLPyPr+nQgMLdClXhjH6XWnChQa7ESZnZmoCBGz9urJP2RwO0FVp+3ipdJumCis7UHbDhdgVT/Z4vHPPF9rvosVhPFNG9zVFJlwAhC/ccZUo2sLof3Sz312xRhH9elOayS8u3uwobcLQnlro6XiUhGbUto4Rr4OEzCj1dtqfVvusKK04TThtYknsc6+E88z7cvGuKZNWR3suPOvc9BI/LPgiqwlAKHyPYtBQqaB42QWbIFaoALKB/u8m3CrXhpwF8NhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 20.93.157.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=topicproducts.com; dmarc=none action=none header.from=topic.nl; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=topic.nl; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Co7+Dz3AuUEofB16svfU2XU+AoW/iZrolpp4aKKuxdI=; b=rVsX4zS/rrIcXTDM5D3ErQvfVgJorsQ40xiUQG41oQ8EW3LO9LC/A0L8N3V1qD7Hp+elnc/4Y63mWA4g8EWw9yqPffTIcKW2FGfSPjtoBWxmRQBi/lHKDyRY3TR8HZphsA47mFpAZ2iyYZHlHCt8JNf4o/JYsLIFYPJx1bgSk5ljiI9m546hqHZ/qscmwCjH87e5aF3DMjftyZh4JsbJgmiVRLfMn5l+tgzp3uOi/msSjVpl2CwNj4KNpRtkAl5QYS7RhZs/Kp2ZNYFImxWoprE7d+RSkrQF3SgWwCT8OJcBkiBQc8BRz5Wo4JDlyJlIGGQzCnO6kMsTYMcvXZ9Lnw== Received: from AM0PR10CA0070.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::23) by AS8PR04MB8964.eurprd04.prod.outlook.com (2603:10a6:20b:42f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 06:41:22 +0000 Received: from AM4PEPF00025F96.EURPRD83.prod.outlook.com (2603:10a6:208:15:cafe::a8) by AM0PR10CA0070.outlook.office365.com (2603:10a6:208:15::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45 via Frontend Transport; Wed, 2 Aug 2023 06:41:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.93.157.195) smtp.mailfrom=topicproducts.com; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=topic.nl; Received-SPF: Pass (protection.outlook.com: domain of topicproducts.com designates 20.93.157.195 as permitted sender) receiver=protection.outlook.com; client-ip=20.93.157.195; helo=westeu11-emailsignatures-cloud.codetwo.com; pr=C Received: from westeu11-emailsignatures-cloud.codetwo.com (20.93.157.195) by AM4PEPF00025F96.mail.protection.outlook.com (10.167.16.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.0 via Frontend Transport; Wed, 2 Aug 2023 06:41:21 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (104.47.51.241) by westeu11-emailsignatures-cloud.codetwo.com with CodeTwo SMTP Server (TLS12) via SMTP; Wed, 02 Aug 2023 06:41:21 +0000 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=topic.nl; Received: from DB8PR04MB6523.eurprd04.prod.outlook.com (2603:10a6:10:10f::26) by GV1PR04MB9216.eurprd04.prod.outlook.com (2603:10a6:150:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 06:41:16 +0000 Received: from DB8PR04MB6523.eurprd04.prod.outlook.com ([fe80::6b6e:1525:72e9:d02f]) by DB8PR04MB6523.eurprd04.prod.outlook.com ([fe80::6b6e:1525:72e9:d02f%4]) with mapi id 15.20.6631.045; Wed, 2 Aug 2023 06:41:16 +0000 From: Mike Looijmans To: linux-clk@vger.kernel.org CC: linux-kernel@vger.kernel.org, sboyd@kernel.org, mturquette@baylibre.com, Mike Looijmans Subject: [PATCH 2/3] clk: lmk04832: Don't disable vco clock on probe fail Date: Wed, 2 Aug 2023 08:40:59 +0200 Message-ID: <20230802064100.15793-2-mike.looijmans@topic.nl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230802064100.15793-1-mike.looijmans@topic.nl> References: <20230802064100.15793-1-mike.looijmans@topic.nl> <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.37b21939-e4ca-460d-8656-25f90de74f6b@emailsignatures365.codetwo.com> X-ClientProxiedBy: AM0PR03CA0079.eurprd03.prod.outlook.com (2603:10a6:208:69::20) To DB8PR04MB6523.eurprd04.prod.outlook.com (2603:10a6:10:10f::26) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB8PR04MB6523:EE_|GV1PR04MB9216:EE_|AM4PEPF00025F96:EE_|AS8PR04MB8964:EE_ X-MS-Office365-Filtering-Correlation-Id: 7271b36f-8f5c-46c9-b58b-08db93237c0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 8l0WLtYGylHEftnhJNLnIJwCv22hpP6t7ogJwrI4Z+iQ2QY2cDa7Sklc33UY6CZFw6KIvJxBQAIAatgTffZqiRtKwNyM6fCNbghJ2CTS90wbImxZUfpv8y7bZI5IrDU9JokBx+YyPQvDoz472XIFdyOypiLaV1uMKj3OWeYg8jkucxh/9+eUHXlza0AC5Sg6eqTaw5VRozQYapTrpXjrOwFM+sjVeTOnuMWhix+KzKPzePdfKyfJ8UNASI9NqVQgA1pmMj/65peAumsj+bsVBy2eSZL/4II89jsz5J+HyoC9l+1TiMvRFGE6oD0eE0/JiWr+AlkEC4XIfwYvE6NKs1ZHcMymEIzPYZypasTgmc4jFdQsWjULqzuwDwwFHfacmrUTcmKDhctzDPHxnDscFWmCN4iCphXv8kYJP2i177dSaxGQjsOKTrjfOSqQzo5yVfHxNnJCH4Fo/TgTDXpR6tM2rwSeMGqDklMyCh07kKoiuxZimHPfi2DK1YHxAosIu2HgGOnTMuV3pkI4aCDPYpL6vAEK5o4VDW2vQX+M2zVZAoWXuq7ElOOzCCWMbKZjHszt8HaWcSvvQdLkut7T1PPMsmwOylb2KAt5eLHY3c1qfzNJC2+ILZiqFAHJhMnD X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR04MB6523.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(366004)(346002)(39840400004)(396003)(451199021)(66946007)(2906002)(66476007)(4326008)(66556008)(6916009)(6486002)(52116002)(478600001)(6666004)(6512007)(83380400001)(36756003)(186003)(42882007)(38350700002)(107886003)(26005)(6506007)(1076003)(38100700002)(2616005)(83170400001)(41300700001)(8936002)(8676002)(5660300002)(44832011)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9216 X-CodeTwo-MessageID: b368a614-0601-4c25-939a-24650e48cf6d.20230802064121@westeu11-emailsignatures-cloud.codetwo.com X-CodeTwoProcessed: true X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F96.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3276887b-4a15-41a1-3cb3-08db9323787b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xgEuR+UHXQTasqVHbTHaiyc+02mSm7dTYKigQTikWLl8TKA9V6ujYPxfk6YphWXTQSj0Z71sri8FOjSoVZDvmwrq02srLDNO8FX7ghA713+IJUbbqSc632aEITDLVx0tl0JsDLotXXOYVFUTBcFb01gUegritN08GEoP17tu4Miark9jldhYE9Rtw2nFiFQXPuHulBQvmLKnsHvdf0JKe4hzb60bLN6csGEEiFPVZWbme0vcDuWsYyNjZO1dBMyzCygybMggIAA4mTdZ8MKKgeRmnszwI+7EulgaG0fr81VClslIHbizozCtUEGbRze5J+pLTOe905BuC3xCoWnI6pcjVM/Oyo2fdPNY6SgueMVGhBVMfH2WpbQ5Zv1JGIPhcBt5B1xr8LRvyAd7er+mkZPR8mH0RzLeikRYihEPuqqxTdbY63DQYEA/2nMY0WIqmAA18RB3LroYvvUXRlnVJPJHFkshPAtv3UHcMNGCNtW3plfLLM4bvcUtV0LBiXM3rHE9mnHUrH/xIlSv2l4ux89wwGd5me/pqr2Rmtp/de5z9q4Ab2/hpe+HxhfLj1I9m7y0/4JAa7/uOoMvjE36nHBZfIAUx0Dn1YzZJt4XUiYhKgO/QaP29FYDNUvXnnkbPmzAg6uUIFizcEcaqkhraY0rkc+PfVh7dlxJGUQ6rpET3bkjoHeI5+FMZsVYlOmKlDT4x7ugRpxl0uB7Ztk8aA== X-Forefront-Antispam-Report: CIP:20.93.157.195;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:westeu11-emailsignatures-cloud.codetwo.com;PTR:westeu11-emailsignatures-cloud.codetwo.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(39840400004)(346002)(396003)(376002)(451199021)(82310400008)(36840700001)(46966006)(2616005)(5660300002)(8936002)(6506007)(186003)(336012)(42882007)(36860700001)(8676002)(47076005)(83380400001)(478600001)(44832011)(26005)(70586007)(70206006)(4326008)(6916009)(316002)(107886003)(6666004)(41300700001)(6486002)(6512007)(1076003)(40480700001)(15974865002)(36756003)(83170400001)(2906002)(356005)(7636003)(7596003);DIR:OUT;SFP:1101; X-OriginatorOrg: topic.nl X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 06:41:21.7246 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7271b36f-8f5c-46c9-b58b-08db93237c0c X-MS-Exchange-CrossTenant-Id: 449607a5-3517-482d-8d16-41dd868cbda3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=449607a5-3517-482d-8d16-41dd868cbda3;Ip=[20.93.157.195];Helo=[westeu11-emailsignatures-cloud.codetwo.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F96.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8964 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The probe() method never calls clk_prepare_enable(), so it should not call clk_disable_unprepare() for the vco.clk in the error path. Fixes a "lmk-vco already disabled" BUG when probe fails. Signed-off-by: Mike Looijmans Reviewed-by: Liam Beguin --- drivers/clk/clk-lmk04832.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c index 188085e7a30b..dd1f0c59ee71 100644 --- a/drivers/clk/clk-lmk04832.c +++ b/drivers/clk/clk-lmk04832.c @@ -1505,21 +1505,21 @@ static int lmk04832_probe(struct spi_device *spi) ret = clk_set_rate(lmk->vco.clk, lmk->vco_rate); if (ret) { dev_err(lmk->dev, "failed to set VCO rate\n"); - goto err_disable_vco; + goto err_disable_oscin; } } ret = lmk04832_register_sclk(lmk); if (ret) { dev_err(lmk->dev, "failed to init SYNC/SYSREF clock path\n"); - goto err_disable_vco; + goto err_disable_oscin; } for (i = 0; i < info->num_channels; i++) { ret = lmk04832_register_clkout(lmk, i); if (ret) { dev_err(lmk->dev, "failed to register clk %d\n", i); - goto err_disable_vco; + goto err_disable_oscin; } } @@ -1528,16 +1528,13 @@ static int lmk04832_probe(struct spi_device *spi) lmk->clk_data); if (ret) { dev_err(lmk->dev, "failed to add provider (%d)\n", ret); - goto err_disable_vco; + goto err_disable_oscin; } spi_set_drvdata(spi, lmk); return 0; -err_disable_vco: - clk_disable_unprepare(lmk->vco.clk); - err_disable_oscin: clk_disable_unprepare(lmk->oscin); From patchwork Wed Aug 2 06:41:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Looijmans X-Patchwork-Id: 13337696 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 6B7C9C41513 for ; Wed, 2 Aug 2023 06:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232350AbjHBGlm (ORCPT ); Wed, 2 Aug 2023 02:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232082AbjHBGli (ORCPT ); Wed, 2 Aug 2023 02:41:38 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2040.outbound.protection.outlook.com [40.107.22.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D132D40; Tue, 1 Aug 2023 23:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ki6Ex3IZYxK5U7xHAUv6MiiWVNDlKw4Q6ZnBGWofyVA+Bl9Ogh3ey6+rmnRP3ib4H4Y4IypL1Fn8/COWaCoVT7sM+AVhUZE1pkTsbNSLdk9RWbm0FQFqOCa1bI8JBDuRwyPCbCMsz8sn5AKO+UC1FDs8+U359zeXKXYgrgL3nG3NEBsATrkWxhR3nXshwwOA8zdRllxNVHLgyKDyXi/R1LafOkkSVeTQBO5k5HUPotFeBF8VOr5j6RZsGtsGiGO2pM8+fRZinhfyaTftj8QbEbsSzLyG/E10wWT+MMpFraIkPNBC0Ffljpl6qDYzZPweVhc/1PF5bEYUh03b+cUvNQ== 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=mOHL7oHYwKU8owEfqCpUIKV/RuI3UysW2nFFyV0QiCc=; b=O3ZuiHSK2Sa2kCKc6wGGFFOFokOSAiAw8Kswyu62Taxv2ptA+Ky4ySGzA5gLSBTOyLKuK6HL/p8e6fI3ZOZZFhpZXcuCu+mEqMdrANO7nMjBpJ5HvkYH5Rzh+F/NnxlrTucBInRKJypJJRvwWZd8UyZ6Y/M9jxes6tKCH8jFH2qJ39geOKkmZAcCElMZsrhHTBlE6FIpdLowRiCf0zQb1aoP/zMiwo1Pk3CccsJmJBWeLDN6Hf2d7KOK2ZMf2UoMYUmUgUzAwE7kQcrMhfWuY+GlVRr4ZXc+xIUqVqgdc2+HgX/h10KxdfSGESbd/3d9ntIs9f5XDWYnvTOopvmAJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 20.93.157.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=topicproducts.com; dmarc=none action=none header.from=topic.nl; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=topic.nl; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mOHL7oHYwKU8owEfqCpUIKV/RuI3UysW2nFFyV0QiCc=; b=gesgNSBoDhc3qHG2NkNQrXabVtO5wGmJX2ZCZ29exu2gbse084dLx61jI5WVGrlvfi1JCe6Cka9kmUcQHztu7LlRtrc1It2eLUVzQqf2zTm/xSpYWFa26H/LBjJik7lkcRhyb1KN3jqxmxrYzdUC8+B8DTmHfUd1qhXE9x46bn7nyKkGCxnzB8FzWf/SlvQeuKQ9y3EazVkJqar6OeY/q72oYMN+0LMs58j/rZ++GvrSJxGDvYb+ofQ/D5m+wLXd9iiOay1+A7Moj1d6Yh+Ckl2GstZdigjZg3HazkWCA7x0Iwj4iIBD75BM36MXBijCtof05zMjOBdrQ5dv0BImRg== Received: from AM0PR10CA0086.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::39) by AS8PR04MB8420.eurprd04.prod.outlook.com (2603:10a6:20b:3fd::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 06:41:22 +0000 Received: from AM4PEPF00025F96.EURPRD83.prod.outlook.com (2603:10a6:208:15:cafe::a3) by AM0PR10CA0086.outlook.office365.com (2603:10a6:208:15::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 06:41:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.93.157.195) smtp.mailfrom=topicproducts.com; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=topic.nl; Received-SPF: Pass (protection.outlook.com: domain of topicproducts.com designates 20.93.157.195 as permitted sender) receiver=protection.outlook.com; client-ip=20.93.157.195; helo=westeu11-emailsignatures-cloud.codetwo.com; pr=C Received: from westeu11-emailsignatures-cloud.codetwo.com (20.93.157.195) by AM4PEPF00025F96.mail.protection.outlook.com (10.167.16.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.0 via Frontend Transport; Wed, 2 Aug 2023 06:41:21 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (104.47.51.236) by westeu11-emailsignatures-cloud.codetwo.com with CodeTwo SMTP Server (TLS12) via SMTP; Wed, 02 Aug 2023 06:41:21 +0000 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=topic.nl; Received: from DB8PR04MB6523.eurprd04.prod.outlook.com (2603:10a6:10:10f::26) by GV1PR04MB9216.eurprd04.prod.outlook.com (2603:10a6:150:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 06:41:17 +0000 Received: from DB8PR04MB6523.eurprd04.prod.outlook.com ([fe80::6b6e:1525:72e9:d02f]) by DB8PR04MB6523.eurprd04.prod.outlook.com ([fe80::6b6e:1525:72e9:d02f%4]) with mapi id 15.20.6631.045; Wed, 2 Aug 2023 06:41:17 +0000 From: Mike Looijmans To: linux-clk@vger.kernel.org CC: linux-kernel@vger.kernel.org, sboyd@kernel.org, mturquette@baylibre.com, Mike Looijmans Subject: [PATCH 3/3] clk: lmk04832: Support using PLL1_LD as SPI readback pin Date: Wed, 2 Aug 2023 08:41:00 +0200 Message-ID: <20230802064100.15793-3-mike.looijmans@topic.nl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230802064100.15793-1-mike.looijmans@topic.nl> References: <20230802064100.15793-1-mike.looijmans@topic.nl> <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.5ec2b609-3eb5-4de3-93d2-a352a16683c8@emailsignatures365.codetwo.com> X-ClientProxiedBy: AM0PR03CA0079.eurprd03.prod.outlook.com (2603:10a6:208:69::20) To DB8PR04MB6523.eurprd04.prod.outlook.com (2603:10a6:10:10f::26) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB8PR04MB6523:EE_|GV1PR04MB9216:EE_|AM4PEPF00025F96:EE_|AS8PR04MB8420:EE_ X-MS-Office365-Filtering-Correlation-Id: 971c9e8b-6220-48fc-2a87-08db93237c22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: DiLCsMbU5N/QFmfIjdiokIC20kSFXjQ9NgF0vSofaS3PGmEaeosMsqp0tipYrjeahXLPQdLiePqjPfE9DuTMKIMWeNME18EF2bqMUlOJgUhWWqA8KBTMQptLMgt/KSIDEbB112JnGktrhVO6d/9JL8aF7qAdFmRcfILIHMcyYAeaEOblcHc22o4RAOSAwr1+PFzzl0Dt8+5KwEkw/xRN0FWecX0LGXjZzsq6k3wlt9ics+kO/oZtH4FMDYAKXPu1m4Bq+0W3gzGXyIn9mBb1L6LrSFMcaV2Pr6afzeIeiN8Iq0DcOXpynBCPgeg3N5pJ0/ogFPLWyDT0l8NV/amFiZxsXo9diHEin2DPZBIuCUxmmICh9wIfkycGy0++pYhjR92HgLL4vy9EmlvPKkh2rRr+38CcuZEEyQLn4q3a34sUklMkSQpkp5eyfrFdhl1WU2z/dwNfn5Dlq+LKEBGwEUTlwn0rxPYIe2L64llOZeAUO6aljbvUwv6xz3qTIKakJJBgUxDmS9O06R15YJkR5gI5QtOM9UrVf+PX19L4T+sA84JCBKdlM/jg97DnRturLyYEM8PDMWDT2EfEe70ATEjoaAeXpJaD8G2/FQtSx9yhKl1Q7OwGQoRBe8/9G+HB X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR04MB6523.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(366004)(346002)(39840400004)(396003)(451199021)(66946007)(2906002)(66476007)(4326008)(66556008)(6916009)(6486002)(52116002)(478600001)(6666004)(6512007)(83380400001)(36756003)(186003)(42882007)(38350700002)(107886003)(26005)(6506007)(1076003)(38100700002)(2616005)(83170400001)(41300700001)(8936002)(8676002)(5660300002)(44832011)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9216 X-CodeTwo-MessageID: e7d3d75c-3b9f-4d09-a72e-dc9513a73e60.20230802064121@westeu11-emailsignatures-cloud.codetwo.com X-CodeTwoProcessed: true X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F96.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 31faedf2-1c22-49eb-eadf-08db932378aa X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7SRGZQFtVrRtlN5DEmevpPmW0eXxhFfrZy3R5qHSUuaTJ9snx9h/6TG0vM2QJbEnIZNLCBKPXjBsEb3lHO91Lp4iXh91b5WK4+gcKl503WkqaP2eVaVFC1HR8Ju0vZIiqd99EEsQsXW3vpCZsjNd8BsEFnXa5qx9r4AKcFYUx+G2Uf5SZXW0g9rslkpovVBRksM6tDaFGsW5mIe/E7WhykA4YVuEjj+kAwCFV1U3St0dSVVQRLSGvSJ7MSqFrkbIhJONyNbykcap6rF6C0kP3SvU5Wo6stB/+3/Gc79zvBo29MYm112Z4nP8aS1E7gAGwSkY5OZnOc1xODvCoXcp6iCq3bWHBd0HxMnSJL+BleQzNnX0MWzUl+0QItP7FXZmbB8HV0dbtWAsez5BHwVEZl5id38/2aQAkOtcqKIbIYrGYnyqbiCZ+L5NEe4dijLMgjCS2WBLAJv9+OiH3JhYphKknbVeqQIvRvdsCTaxZL3Ps7lkifwih9MNdFnROsBM5epBcqFbuWlPTrMITKKBoQ2m1ovItRVc+koQev/Ta1sHV/M2kEh+K6LCphMDijQ8WMR+CkYwHrdOlkgmUB4uGZv+C6suuhrs/p66ET08NBIN8jejQbdipcdUtdcP/7g8gY/RVcpoT2yz4d4KiJKxJMnQJH8MNFltNGh1ilXSkNAYvJo/DqQpmQUDPUt58AhAUXCGK5jgAz94Yi+JNCmyLQ== X-Forefront-Antispam-Report: CIP:20.93.157.195;CTRY:NL;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:westeu11-emailsignatures-cloud.codetwo.com;PTR:westeu11-emailsignatures-cloud.codetwo.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(346002)(376002)(39840400004)(82310400008)(451199021)(46966006)(36840700001)(44832011)(6916009)(4326008)(70586007)(70206006)(2906002)(2616005)(356005)(7596003)(7636003)(42882007)(336012)(186003)(6506007)(1076003)(26005)(83170400001)(83380400001)(47076005)(36860700001)(40480700001)(107886003)(15974865002)(36756003)(478600001)(6512007)(6666004)(6486002)(41300700001)(8936002)(8676002)(5660300002)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: topic.nl X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 06:41:21.8340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 971c9e8b-6220-48fc-2a87-08db93237c22 X-MS-Exchange-CrossTenant-Id: 449607a5-3517-482d-8d16-41dd868cbda3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=449607a5-3517-482d-8d16-41dd868cbda3;Ip=[20.93.157.195];Helo=[westeu11-emailsignatures-cloud.codetwo.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F96.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8420 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The PLL1_PD pin (a.k.a. STATUS_LD1) can be used as SPI readback pin. Make this possible. Signed-off-by: Mike Looijmans Reviewed-by: Liam Beguin --- drivers/clk/clk-lmk04832.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c index dd1f0c59ee71..99b271c1278a 100644 --- a/drivers/clk/clk-lmk04832.c +++ b/drivers/clk/clk-lmk04832.c @@ -134,6 +134,11 @@ /* 0x14b - 0x152 Holdover */ /* 0x153 - 0x15f PLL1 Configuration */ +#define LMK04832_REG_PLL1_LD 0x15f +#define LMK04832_BIT_PLL1_LD_MUX GENMASK(7, 3) +#define LMK04832_VAL_PLL1_LD_MUX_SPI_RDBK 0x07 +#define LMK04832_BIT_PLL1_LD_TYPE GENMASK(2, 0) +#define LMK04832_VAL_PLL1_LD_TYPE_OUT_PP 0x03 /* 0x160 - 0x16e PLL2 Configuration */ #define LMK04832_REG_PLL2_R_MSB 0x160 @@ -206,6 +211,7 @@ enum lmk04832_rdbk_type { RDBK_CLKIN_SEL0, RDBK_CLKIN_SEL1, RDBK_RESET, + RDBK_PLL1_LD, }; struct lmk_dclk { @@ -1346,6 +1352,10 @@ static int lmk04832_set_spi_rdbk(const struct lmk04832 *lmk, const int rdbk_pin) { int reg; int ret; + int val = FIELD_PREP(LMK04832_BIT_CLKIN_SEL_MUX, + LMK04832_VAL_CLKIN_SEL_MUX_SPI_RDBK) | + FIELD_PREP(LMK04832_BIT_CLKIN_SEL_TYPE, + LMK04832_VAL_CLKIN_SEL_TYPE_OUT); dev_info(lmk->dev, "setting up 4-wire mode\n"); ret = regmap_write(lmk->regmap, LMK04832_REG_RST3W, @@ -1363,15 +1373,18 @@ static int lmk04832_set_spi_rdbk(const struct lmk04832 *lmk, const int rdbk_pin) case RDBK_RESET: reg = LMK04832_REG_CLKIN_RST; break; + case RDBK_PLL1_LD: + reg = LMK04832_REG_PLL1_LD; + val = FIELD_PREP(LMK04832_BIT_PLL1_LD_MUX, + LMK04832_VAL_PLL1_LD_MUX_SPI_RDBK) | + FIELD_PREP(LMK04832_BIT_PLL1_LD_TYPE, + LMK04832_VAL_PLL1_LD_TYPE_OUT_PP); + break; default: return -EINVAL; } - return regmap_write(lmk->regmap, reg, - FIELD_PREP(LMK04832_BIT_CLKIN_SEL_MUX, - LMK04832_VAL_CLKIN_SEL_MUX_SPI_RDBK) | - FIELD_PREP(LMK04832_BIT_CLKIN_SEL_TYPE, - LMK04832_VAL_CLKIN_SEL_TYPE_OUT)); + return regmap_write(lmk->regmap, reg, val); } static int lmk04832_probe(struct spi_device *spi)