Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp146067lqt; Mon, 18 Mar 2024 04:20:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUq+zavVXTKAxDSWFcEcuH9X9mB555aTikwXLOogNeExb6h7alESpOX8XvYlB+xUhRYqc3d2EWjP4U+eA6AtA1C/xBIKEta8nQkau5uIg== X-Google-Smtp-Source: AGHT+IHJWwB8J4++qd0FvHj6h2F4mz2dXLU9hDjsvABj8cyuezmSARu9G+XeHUqxEzas4Tb7MB5t X-Received: by 2002:ac8:5f87:0:b0:430:b1f5:9a99 with SMTP id j7-20020ac85f87000000b00430b1f59a99mr10619341qta.56.1710760849177; Mon, 18 Mar 2024 04:20:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710760849; cv=pass; d=google.com; s=arc-20160816; b=htAIGGs9JqcTL5jCrJ5E/CcpoRWtUVVoTUOKk6lZ9x/shMj+/BouQFg3ELSNQeu2Tt zwVeTzO8/DNKbUkkTaZpMvHKXvrgxrO9y8Fy+0OETMFfzHcqfyW7olYp42K7kdMFpk05 Gv59iuVn22/ctcfgDclD9qIOwsBSowjh3YIGxQtIQd7ZbL3zdZYvCV6JzS+OfkGBJTTT j8w1HxKAOKQCFcNAtCAShqf15fWWddxuiQN+ovDoydUZYkVHMUO8EPva5iWH+jhC087o lsj2gkwBv6aY3FbSnQRWBfWrfcLSEASGrem9Jseg6SVZh8bOGjRYJReKkc84QedQotBT UXow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=oOOkoScv5oPGpoZyfbHf5LnUoWuaxfdY11LbzZmpRD4=; fh=/cMp62tBmKmPMpcWgwIfaBytcVV1w3DSwP6NQvkPxBg=; b=0AjOOaEPNwlLRGX4JCqlTOuXG+Sct1IzinqRMZIYI6fmlrkIOWcls9BOFQ5ybqiQpb mNs7uWq2sEmYoh8jTQfLRtg0jluGwsRlNcxnRJwejbrullOUA66MllQ/I0UDY6ogKdZl UiU9x97dIRma1rnB+ULi/JELrA4apjrhsuzUx7vSa7bBjSWnAkYhZ39JsmpE4f9XIsLv RKhgSZ1lOPMyUnPMlmvSIk1NOq/rxJj2KmgmRCnTHmH+xkqXfZc253NCFG1eSlpZIpJ1 RLcS5AY+jmIUYxVGT0I+OKhSsIkdrmAJP7OblOzFlwQiuijD+QzOBrP6fgbBtgmBudUL IapQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TD3LulJu; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106056-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fb22-20020a05622a481600b0042ee1c30025si1637077qtb.267.2024.03.18.04.20.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 04:20:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TD3LulJu; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106056-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D28A01C2142F for ; Mon, 18 Mar 2024 11:20:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7A5238389; Mon, 18 Mar 2024 11:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TD3LulJu" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D8D137162; Mon, 18 Mar 2024 11:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710760807; cv=none; b=TvHamWlrqXcAGPXzKKy6kPUgGdOPEJfvhlQM2zri7RJRgCVXpqZ3y93X7akzowQyVzURritHfCZnA0PaWE07Q390Ndn/en2I5YY00ow49mgArOgTNkciJ8vuvNdm7jXLkfO0lXXopGy+8e8dkO+eSdKRB0AR9hoUM48m8qSO+Yk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710760807; c=relaxed/simple; bh=V5o57Z5lkXjFzPIoDm+QJbV84snZtFSjhMmyvJm0U+I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Rbl9eEN/n+oc7hkNcYMR5t62GX+dxXYSMqG5AxKgzUVpHCeiZju4OppgE6qOX2nTP6D6BvYM2LqZizrs0XQD8/NJMVglp7YsGnnMczv2DP+A62cbRSs4Ob8IHGTbqwh6fAxigWku7OKyfM2L/lwNJ/gL/e/MIxejUpfJ3eFqqFs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TD3LulJu; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33ed6078884so1379841f8f.1; Mon, 18 Mar 2024 04:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710760804; x=1711365604; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oOOkoScv5oPGpoZyfbHf5LnUoWuaxfdY11LbzZmpRD4=; b=TD3LulJun0Z1MnmmE6t4lF3WOZsZN795gAqMckoLFkbMLTvF2x5zV9SCE+WjK/yf0l pE/vggrIvwcjtdnIsa8g3mbxUU7PHE/mEgzqn+ci1tbf6voDNEl8Kz1UYvUOEPS+eNFg mTvoxm1urD9X0zmUfo2GQiM6fn+3lVVwlWEeFg/8ylgs6irCG3NUqp5ElErlrDUXulkV ZlM7T9podYFm6hBlX8pTYw5Eadtg3H78ZapbuQZOab6wD8aqYiHU3JfMxxskv2Br2WaR ovyovFW8Z8TqdDzsZN+bv33v0l5mNQBHZcpaHi/8D9IKoBmXLVntqXaaTjnYMX1kx4tO ifTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710760804; x=1711365604; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oOOkoScv5oPGpoZyfbHf5LnUoWuaxfdY11LbzZmpRD4=; b=ARA/Id+kj4nRpTFwThW4Gz4WNuEl9q0REvp49pTikkPbTiJBENGsFirqcpA/ml6Aph nboFCPIhbuSQfRutPH/xobPapYu+Dv5S3eHQUnFupuwANlAua7RHug//JQyT/XK0MwwK ys+TgB6EDeET8gD+DCN2yzEP2DTs+GEI+Rd8u3l71l48Qd9tdHpDDGqTHUdgsJSGny0v krvwBWd8vOQ9pc56KYQxLdHa9gL0cjqbsLckskLtzu9ShJpPFxFy0emyt124vZ3TEMiG Ye3P6P1yqBKHZZ1vpujuyagR2ZFa2LGspJT+uG3+SC6iKGl5BUetQJ3y/0oo66oa+WuL 9Z1g== X-Forwarded-Encrypted: i=1; AJvYcCVfTE6FQGb3VUTh1wqjyW65xYz9RRxWpHQ/L044MdIxqyKJtKdotbafdoTgolaTs/QI1K81Yn/iLeXmnL1Rb8whiNN9UqOK4xirDuZ4SjZa6noqKGqlMnelWgcidny/fjOB+fkJZMiA X-Gm-Message-State: AOJu0YyCTMykgfgw4wqq3JriakxlBwYigk0h6oOLUtXxgli9GHOE/3sE Iw/6t12KUxsFMoPQcTybAjycNYPzBXysAxJVCqVVru+2symODRkI X-Received: by 2002:a5d:5741:0:b0:341:6b9e:4ff2 with SMTP id q1-20020a5d5741000000b003416b9e4ff2mr3175809wrw.14.1710760804494; Mon, 18 Mar 2024 04:20:04 -0700 (PDT) Received: from [192.168.20.102] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id az1-20020adfe181000000b0033ed7181fd1sm6650421wrb.62.2024.03.18.04.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 04:20:04 -0700 (PDT) From: Gabor Juhos Date: Mon, 18 Mar 2024 12:19:57 +0100 Subject: [PATCH 3/5] clk: qcom: apss-ipq-pll: remove 'pll_type' field from struct 'apss_pll_data' Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240318-apss-ipq-pll-cleanup-v1-3-52f795429d5d@gmail.com> References: <20240318-apss-ipq-pll-cleanup-v1-0-52f795429d5d@gmail.com> In-Reply-To: <20240318-apss-ipq-pll-cleanup-v1-0-52f795429d5d@gmail.com> To: Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Gabor Juhos X-Mailer: b4 0.12.3 The value of the 'pll_type' field of 'struct apps_pll_data' is used only by the probe function to decide which config function should be called for the actual PLL. However this can be derived also from the 'pll' field which makes the 'pll_type' field redundant. Additionally, the CLK_ALPHA_PLL_TYPE_* enumeration values are meant to be used as indices to the 'clk_alpha_pll_regs' array so using those to define the pll type in this driver is misleading anyway. Change the probe function to use the 'pll' field to determine the configuration function to be used, and remove the 'pll_type' field to simplify the code. No functional changes. Signed-off-by: Gabor Juhos --- drivers/clk/qcom/apss-ipq-pll.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index f5c7eaf8db374..fb015385dae4b 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -147,37 +147,31 @@ static const struct alpha_pll_config ipq9574_pll_config = { }; struct apss_pll_data { - int pll_type; struct clk_alpha_pll *pll; const struct alpha_pll_config *pll_config; }; static const struct apss_pll_data ipq5018_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_STROMER, .pll = &ipq_pll_stromer, .pll_config = &ipq5018_pll_config, }; static struct apss_pll_data ipq5332_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_STROMER_PLUS, .pll = &ipq_pll_stromer_plus, .pll_config = &ipq5332_pll_config, }; static struct apss_pll_data ipq8074_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA, .pll = &ipq_pll_huayra, .pll_config = &ipq8074_pll_config, }; static struct apss_pll_data ipq6018_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA, .pll = &ipq_pll_huayra, .pll_config = &ipq6018_pll_config, }; static struct apss_pll_data ipq9574_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA, .pll = &ipq_pll_huayra, .pll_config = &ipq9574_pll_config, }; @@ -210,10 +204,10 @@ static int apss_ipq_pll_probe(struct platform_device *pdev) if (!data) return -ENODEV; - if (data->pll_type == CLK_ALPHA_PLL_TYPE_HUAYRA) + if (data->pll == &ipq_pll_huayra) clk_alpha_pll_configure(data->pll, regmap, data->pll_config); - else if (data->pll_type == CLK_ALPHA_PLL_TYPE_STROMER || - data->pll_type == CLK_ALPHA_PLL_TYPE_STROMER_PLUS) + else if (data->pll == &ipq_pll_stromer || + data->pll == &ipq_pll_stromer_plus) clk_stromer_pll_configure(data->pll, regmap, data->pll_config); ret = devm_clk_register_regmap(dev, &data->pll->clkr); -- 2.44.0