From patchwork Tue Nov 15 14:40:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 20415 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2767680wru; Tue, 15 Nov 2022 06:43:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf4EWYErTGDjVkdgH99nVN/iYApN2D9YstMXc5HakVxWsclmHnlYYdbL1D5DSl9/IEeqIeFg X-Received: by 2002:a17:906:960e:b0:781:aff3:c68d with SMTP id s14-20020a170906960e00b00781aff3c68dmr14334376ejx.36.1668523408303; Tue, 15 Nov 2022 06:43:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668523408; cv=none; d=google.com; s=arc-20160816; b=0RfoktVnFwxA0etsePVD9/vTg5LZWXX/kCYNzXQa14J20X1f4hiJGnCI7Hi1ivxFvq koyJ0tZmaSenAlVL6NBy2GFClS0oHLDJH+vprj54qtnXtcP42mU0SsACGEkwhVM5kJbv yMOpq1oRwXz2Vz1Mim+JTn7g84fYLtPYsdf1L9wJhDsAiB+bZTtZaAQ4Kh0efdH5otHh t3Wk6x696sOGxQ18WwsamPoh1VAPnEJ/6MeNtwLwAA08/BH4UmS6MhaDmrwz3x20NnTg XNhUzy8cavWHT9NfS5BnIPS28lXDw4d+5X+l0HSdf3zB55Ss2VN1wr1k1NjquS5OAgac RVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gj4hZSYrtHzEmyIFp2Nya/saveiND0mcM8alV1ouO+Q=; b=UzjOrufT+4UMoF/cN96j3wICtu4+lJwCvq4UaMg6LbHsVbAeUKf4gDc3V+ITm48GxN yO6waux39aQsb/SSwqmZg6WTFijRWAQyNpRiCN3S35Gqoi0MPJ9SCkjxPgtGkq/W11W6 fI/gqH7scNksHTnxpiVIzZJb4w1blUXZb6CCqDFd0Euu7vT1LBxsKXs/W+PxefBOa3D3 JG1yh4vyJpCCJX6lu/WYffatt3b1FDbYrOheAtkd95v0IXrSZsWyAkaz/vduRns/5vB9 aShLF2uQ8khMXS5NmyRt2tLiBw05/NjisMyiF2PLR5c0RE65rMAp4whEPUjhO5gBUUfO RuqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fh+599Rk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr18-20020a170907721200b0078db3ce1e59si6582358ejc.38.2022.11.15.06.42.59; Tue, 15 Nov 2022 06:43:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fh+599Rk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230226AbiKOOmN (ORCPT + 99 others); Tue, 15 Nov 2022 09:42:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232253AbiKOOk4 (ORCPT ); Tue, 15 Nov 2022 09:40:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AEE22A251; Tue, 15 Nov 2022 06:40:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CE570617D4; Tue, 15 Nov 2022 14:40:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8411C4FEB9; Tue, 15 Nov 2022 14:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668523252; bh=RSCCNHg0pVmtS0IdanzEJRU1fo8izWYA/WxRqAymmF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fh+599RkVQIsa61dOExV36bAKWMov99+M+0dWiUJdkvYQBTYggK3jhCDsaqcqWcT5 z6aeDoTRNqIHz+KmGfOoyttR43zZ4c14yHZ6yFE7jxqapTcM8Bq4gTtf/PDiAdWSNc lQ7jxUtVaOFIcDbLqWsSXwWmMDztqI/tphbGr6O0/u4KxO1e0N0XFdn1IhLGhC2oQz ZlXaHNBTOLuDygBHcWPRs3ttM8db7mLMDY9sERZ0kw69eZEvbeyk60NtgdlDwPL4Zj jhpqBDKtwwpJj099lpyGtcqOg0PjNF+p1jLgfDkpYDFHwOx9TUOILAGij5TckAx7/9 3Rkemu4MW1F+w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oux6t-0000fn-Ak; Tue, 15 Nov 2022 15:40:23 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 10/15] phy: qcom-qmp-combo: clean up DP clock callbacks Date: Tue, 15 Nov 2022 15:40:00 +0100 Message-Id: <20221115144005.2478-11-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221115144005.2478-1-johan+linaro@kernel.org> References: <20221115144005.2478-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749573601134240317?= X-GMAIL-MSGID: =?utf-8?q?1749573601134240317?= Clean up the DP clock callbacks somewhat by dropping the redundant "qcom" prefix and removing line breaks after type specifiers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 33 ++++++++++------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 89a5b51c770d..fb3705b00823 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2304,8 +2304,7 @@ static int phy_pipe_clk_register(struct qmp_combo *qmp, struct device_node *np) * for DP pixel clock * */ -static int qcom_qmp_dp_pixel_clk_determine_rate(struct clk_hw *hw, - struct clk_rate_request *req) +static int qmp_dp_pixel_clk_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { switch (req->rate) { case 1620000000UL / 2: @@ -2317,8 +2316,7 @@ static int qcom_qmp_dp_pixel_clk_determine_rate(struct clk_hw *hw, } } -static unsigned long -qcom_qmp_dp_pixel_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) +static unsigned long qmp_dp_pixel_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { const struct qmp_combo *qmp; const struct phy_configure_opts_dp *dp_opts; @@ -2340,13 +2338,12 @@ qcom_qmp_dp_pixel_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) } } -static const struct clk_ops qcom_qmp_dp_pixel_clk_ops = { - .determine_rate = qcom_qmp_dp_pixel_clk_determine_rate, - .recalc_rate = qcom_qmp_dp_pixel_clk_recalc_rate, +static const struct clk_ops qmp_dp_pixel_clk_ops = { + .determine_rate = qmp_dp_pixel_clk_determine_rate, + .recalc_rate = qmp_dp_pixel_clk_recalc_rate, }; -static int qcom_qmp_dp_link_clk_determine_rate(struct clk_hw *hw, - struct clk_rate_request *req) +static int qmp_dp_link_clk_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { switch (req->rate) { case 162000000: @@ -2359,8 +2356,7 @@ static int qcom_qmp_dp_link_clk_determine_rate(struct clk_hw *hw, } } -static unsigned long -qcom_qmp_dp_link_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) +static unsigned long qmp_dp_link_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { const struct qmp_combo *qmp; const struct phy_configure_opts_dp *dp_opts; @@ -2379,13 +2375,12 @@ qcom_qmp_dp_link_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) } } -static const struct clk_ops qcom_qmp_dp_link_clk_ops = { - .determine_rate = qcom_qmp_dp_link_clk_determine_rate, - .recalc_rate = qcom_qmp_dp_link_clk_recalc_rate, +static const struct clk_ops qmp_dp_link_clk_ops = { + .determine_rate = qmp_dp_link_clk_determine_rate, + .recalc_rate = qmp_dp_link_clk_recalc_rate, }; -static struct clk_hw * -qcom_qmp_dp_clks_hw_get(struct of_phandle_args *clkspec, void *data) +static struct clk_hw *qmp_dp_clks_hw_get(struct of_phandle_args *clkspec, void *data) { struct qmp_combo *qmp = data; unsigned int idx = clkspec->args[0]; @@ -2408,7 +2403,7 @@ static int phy_dp_clks_register(struct qmp_combo *qmp, struct device_node *np) int ret; snprintf(name, sizeof(name), "%s::link_clk", dev_name(qmp->dev)); - init.ops = &qcom_qmp_dp_link_clk_ops; + init.ops = &qmp_dp_link_clk_ops; init.name = name; qmp->dp_link_hw.init = &init; ret = devm_clk_hw_register(qmp->dev, &qmp->dp_link_hw); @@ -2416,7 +2411,7 @@ static int phy_dp_clks_register(struct qmp_combo *qmp, struct device_node *np) return ret; snprintf(name, sizeof(name), "%s::vco_div_clk", dev_name(qmp->dev)); - init.ops = &qcom_qmp_dp_pixel_clk_ops; + init.ops = &qmp_dp_pixel_clk_ops; init.name = name; qmp->dp_pixel_hw.init = &init; ret = devm_clk_hw_register(qmp->dev, &qmp->dp_pixel_hw); @@ -2452,7 +2447,7 @@ static int qmp_combo_register_clocks(struct qmp_combo *qmp, struct device_node * if (ret) return ret; - ret = of_clk_add_hw_provider(dp_np, qcom_qmp_dp_clks_hw_get, qmp); + ret = of_clk_add_hw_provider(dp_np, qmp_dp_clks_hw_get, qmp); if (ret) return ret;