From patchwork Sun Jun 5 16:57:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2005 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 019783F0FB for ; Sun, 5 Jun 2022 18:57:11 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id a4-20020a056402168400b0042dc5b94da6sf8938303edv.10 for ; Sun, 05 Jun 2022 09:57:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654448230; cv=pass; d=google.com; s=arc-20160816; b=jLiDarSD5V8+B5HqEIyTM19A5KlksBBkoIZkLxgCEUgnJ1HTqxIuGl4SwzhVAaQj4Q MnPc8euSY0Mijm1Tsrc2TwJViV9O+Pu34J9W5/opyGLabQeWwryTRPXQrf69mErSI+ep H4Ue5FMq6hZy0r3u3V6LgDxAHfL1QBCEH8yZ3jYJbOXViqde0Ubw+vDA044hdz38m5F/ ARDvDrqsTX5Z6yRITSVazNHzGqNmU/C9hH0a/EvdldgkQBm//UgfE0SNR6+5/V0GtxxY +/vHOZ6wRLyLU4q/LO8ofKet5MQLs1z7Ve+tnvZMu+4oPxhs4dFz9UyK7QVlxLUhW+Y1 6yUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DN1MyXYkO7blhwXbiGVDCEsqRtGCCYJQhDE4/eoGBUI=; b=HSjQK8CaGHI0TgRFfDOuO/HqeK3bSsejBxgmFYQljYq19ydC7ag2ZwrA+ifddkMdHb zvQy2Djl84IA25g3ytv40UG5n+od+Um9mQNPyRVSD2Y4uJvCuH0H+7MdBO7NmXHGFDI9 WWiPRCz/yFuAnMDK8syR4S7nTyGqHX+8X9z2JZgi3ciTGFNvYi7p+O+QY2f75WhMRi6H 502+I7t1/8PPVarZ4pP4aDGci/2sDX46H+duGA4GMUk6ucD4qnl1FAeBbB/ozbfxqr9a okc8uQFCC7rDs2G+l2yUzIn9iMM0APTTVCeN2Ovnz2peSofz5CnhZXAr/Y9bpolFxDE7 vl0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PJUDXWiC; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=DN1MyXYkO7blhwXbiGVDCEsqRtGCCYJQhDE4/eoGBUI=; b=HAsMl8QWQKUSSwhHxyW3EvAQb99AAOKwY42iBfoYGxHvyTpgFrKhKy7g57GqstQ1FE 7pVEfTDP1vi1g+L/ItNK+HXVIiHRGeOwVkjXlHNV/3ZtFDEBsIVQ5w+sKDijh3a97Z/s BfE4XqMLUNIcVmK21AcpI793Esq0oE59BLEco= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=DN1MyXYkO7blhwXbiGVDCEsqRtGCCYJQhDE4/eoGBUI=; b=vqvbJfERgkiVrMUBtEAOEB5BJs9jOOOSO/tdWWuri/2wI7myoQKX36RiMLvxCjGBoV uXYGZNSmnLVReH4tHSEVTUJ3gGwN/OT6W7ylwAmX8P8tyQUMqcqa85kvKmRwdiMnQtoW NwMudicbrY7dT0u+yIkPvHH2seW3VDjD6F2QCMYMOXxeSgSr+hLqTl/LKI8jRzfnu65Q CCQYUn0jgDUez+RI608GZIlmU7qDq7mBO+xM9svVMF5z6kGLBTUiK4/1OXXhsrh9A+cm pwDWPJAS4/5U+BW/VdNymSwYz/JqZQN5f7F6g6r06ZumaDrZxQ8GbyMhzMGm3G7o5K5D lhUQ== X-Gm-Message-State: AOAM530MIHSG+suZ0l13+Hm0zK1W/lcDTv3kUQUq29RbymWIF34JUPrd xU71JAvblXC4WuPYlj1zP2VQWtpp X-Google-Smtp-Source: ABdhPJzkgPCrRW92xERtQRvYgxxcJcXKnZIx6XF0tKKSEAVADY3xdwkjNhpU0pz6pOoIJR10a5TpKQ== X-Received: by 2002:a17:907:1c01:b0:6f4:2692:e23 with SMTP id nc1-20020a1709071c0100b006f426920e23mr17862378ejc.243.1654448230615; Sun, 05 Jun 2022 09:57:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:95c1:b0:6ff:45d:c05d with SMTP id n1-20020a17090695c100b006ff045dc05dls359442ejy.5.gmail; Sun, 05 Jun 2022 09:57:09 -0700 (PDT) X-Received: by 2002:a17:906:14d5:b0:711:c55a:998 with SMTP id y21-20020a17090614d500b00711c55a0998mr3951572ejc.708.1654448229276; Sun, 05 Jun 2022 09:57:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654448229; cv=none; d=google.com; s=arc-20160816; b=heY4djvDj0vKW91MBAr4b5sNAajI3sZFDRV1Hg8Lo9kDSZ34vi177jiodqS6OFx1Bb Qtqe/FKXKaPwMmENv0q5TA97Yt0a+ntsk5m3yP72j2AqbzjK4cghoIoV0mhCW6AE7mHw qGe8mjgl9My9b42QbomktpqS/UTMYIGaPKde7yw0EuAXzGtVidtCdV+37iG5uxrHtst9 CL6ZvEY4Z96RJebzjk3EgcjZIEzFEpUobU0Li+UzpVBnMc2FkIvIUF9dNSpz6RdYZPMS pFbsEf6wOJGh7dJrkfWHSqBQmgZp98TGnvzGc2G9/vYEErKCns2xrexWkTf6p/CkPBQW k8UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4gqvv7SB+vS5l3sqUpll/2cHcxIjp6YvEKZyVVCwBAk=; b=bkYUeEFJiOUdsAuQb80BEefkQLiun5aRspoDq1lQlzvrNh5lMr5WgM0OW2AHTmzwYj ZUApAIv/QXbjJklT9ezB/9A9pu0A2fAuigN67J05xuWOF3TQfLKoDAU536CUrUIN1w+D ukkW7Vsea9iqlgpFsbJCsLVxZ5ApwdZ06JOmR/i3thnUs8+NymNHMc5TMfcblhDdeAdw 04aN1tPyJH4P8TUKblq9Y1lLyMDFiC/TukRTH0P3SK7EIofZCPeAm+mBiB3zoySpzKfZ miaFKwazMmDMjneIC03tefxnVaIoTbl5MzP34SprGgu4i5YnbMDT3EpTFLNGVs/LvkH3 lgZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PJUDXWiC; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id p3-20020a170906604300b00708886b12f7sor5294695ejj.55.2022.06.05.09.57.09 for (Google Transport Security); Sun, 05 Jun 2022 09:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:c797:b0:711:8c01:32d4 with SMTP id cw23-20020a170906c79700b007118c0132d4mr4733057ejb.205.1654448229001; Sun, 05 Jun 2022 09:57:09 -0700 (PDT) Received: from localhost.localdomain (mob-83-225-9-201.net.vodafone.it. [83.225.9.201]) by smtp.gmail.com with ESMTPSA id b12-20020a170906660c00b0070e3f58ed5csm3260761ejp.48.2022.06.05.09.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:57:08 -0700 (PDT) From: Michael Trimarchi To: Matti Vaittinen , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Dario Binacchi , linux-amarula@amarulasolutions.com, linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [RFC PATCH 1/3] clk: bd718x7: Clean up the code, no functional changes Date: Sun, 5 Jun 2022 18:57:01 +0200 Message-Id: <20220605165703.1565234-2-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220605165703.1565234-1-michael@amarulasolutions.com> References: <20220605165703.1565234-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PJUDXWiC; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Michael Trimarchi Reviewed-by: Matti Vaittinen --- drivers/clk/clk-bd718x7.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/clk/clk-bd718x7.c b/drivers/clk/clk-bd718x7.c index ac40b669d60b..04cc0beb67df 100644 --- a/drivers/clk/clk-bd718x7.c +++ b/drivers/clk/clk-bd718x7.c @@ -81,27 +81,28 @@ static int bd71837_clk_probe(struct platform_device *pdev) struct bd718xx_clk *c; int rval = -ENOMEM; const char *parent_clk; + struct device *dev = &pdev->dev; struct device *parent = pdev->dev.parent; struct clk_init_data init = { .name = "bd718xx-32k-out", .ops = &bd71837_clk_ops, + .num_parents = 1, }; enum rohm_chip_type chip = platform_get_device_id(pdev)->driver_data; - c = devm_kzalloc(&pdev->dev, sizeof(*c), GFP_KERNEL); + c = devm_kzalloc(dev, sizeof(*c), GFP_KERNEL); if (!c) return -ENOMEM; - c->regmap = dev_get_regmap(pdev->dev.parent, NULL); + c->regmap = dev_get_regmap(parent, NULL); if (!c->regmap) return -ENODEV; - init.num_parents = 1; parent_clk = of_clk_get_parent_name(parent->of_node, 0); init.parent_names = &parent_clk; if (!parent_clk) { - dev_err(&pdev->dev, "No parent clk found\n"); + dev_err(dev, "No parent clk found\n"); return -EINVAL; } switch (chip) { @@ -119,7 +120,7 @@ static int bd71837_clk_probe(struct platform_device *pdev) c->mask = CLK_OUT_EN_MASK; break; default: - dev_err(&pdev->dev, "Unknown clk chip\n"); + dev_err(dev, "Unknown clk chip\n"); return -EINVAL; } c->pdev = pdev; @@ -128,15 +129,15 @@ static int bd71837_clk_probe(struct platform_device *pdev) of_property_read_string_index(parent->of_node, "clock-output-names", 0, &init.name); - rval = devm_clk_hw_register(&pdev->dev, &c->hw); + rval = devm_clk_hw_register(dev, &c->hw); if (rval) { - dev_err(&pdev->dev, "failed to register 32K clk"); + dev_err(dev, "failed to register 32K clk"); return rval; } - rval = devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, + rval = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, &c->hw); if (rval) - dev_err(&pdev->dev, "adding clk provider failed\n"); + dev_err(dev, "adding clk provider failed\n"); return rval; } From patchwork Sun Jun 5 16:57:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2006 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 22FC23F0FB for ; Sun, 5 Jun 2022 18:57:13 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id x8-20020a056402414800b0042d8498f50asf8949839eda.23 for ; Sun, 05 Jun 2022 09:57:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654448233; cv=pass; d=google.com; s=arc-20160816; b=0RjzIqX18H1lwAqUy0yFNkpTED+OuJ9AUAj8Q1diJyTH7uwV43tNgACQhA/n7eohY7 HKUu9dkBzXf+hxCoJeuX7Uo/rQdoDrJBQCQH/88cqpLzOeBMUNrslwgFv3KFP8FZePba PDjutvqdDW4ewM0AHG7fzmiXNNI6y8zVrcjaIRPATj08BFjeIpf2Snkyfe7cwQPEBF9A 5bh+Al5gDAYQ+PwM7EkjpLhoZvAWEx2RHZvkn/1ugAkkF4CL4AO7/a3Zk0g6x3POTE0A 5V1UZBR3WKGvyVZUdQGiT2wUcBMguqcaKdNLbgqCVjapbKUbvuiPkaZ/u0j1uRjbrkRZ MoFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5KwE2LgoEN9ef2ZBZ4saewvtRAUpg1ZASxZ8LdpDc28=; b=Ux8RhHFvYm7ZKZZzF+UolUfoHUjB0XKxisnKoaZRGi965m6eLwqgGVtnyY8P4+IBwI coo+BWuYWVBtLLz2b6JoqegiZqhd9u9QPUxnmsUv6bZXHbTALnSMJxOEkEL/mutu7KJU ayxDBbfg9pHSz0+4DIEEf1RSvUH1aotcnUSFLgnRuh/5Mf7JPaeKqe+HOPhnCi+mn8eS Ilh3ZGgYlw76wPItyyWqUGj4x01S2axoR9VWtZULdrai1gnF9M30IglWqYBQiiTgplqz F7ihHfJkM0InN4OYTh787KykMzyA2uyPre3QQBzHIJnSzQRhmothyoaMm2rzjCgrgMPm J3KQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5KwE2LgoEN9ef2ZBZ4saewvtRAUpg1ZASxZ8LdpDc28=; b=bvwVwaCUk7xnWMHIvtTBf0SSKlbXmpBgkM5wVMbr9x7kk+2F1jVW8ndSGWJkVu5xtF dKg+NQ4tH6P/Dyc/8x6QOlkEYW1uwaonnPchUKbseGYcxsXLwd3biIc+5pmNDZAugQYm YXIvpRXVrlde4puPSLpiBVWhPHQ6AqHNFWJRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=5KwE2LgoEN9ef2ZBZ4saewvtRAUpg1ZASxZ8LdpDc28=; b=ZHS7W/CTgErdM9jIB9GpbJlYmBX5lBoz4Vc/IkLGNKPe6oCFWAEyvxQjouVbLrsgq8 OpYaD6+hMlkapJh+cXghuzTcAz8TzEA8nKXOigJhRh5TPrT7gVcR7AYJg8g+VCz2Kqe3 AROlHuRy5cgEwElSyPevBR4FAoqvattLuHUX81ez70DyCmEy9P5dDO+2XX7U8jKep7fk 0MsTSKzuWk7i0z2bRCePdsqoCPSPpuUTdMI5/I6JxBseRgGmd5OgqnwuUEbXNhCHIzCU u9DWQ5fXvw0JGZyZITE/tJklKTRDlRGBS/81fknVzk5zGjGqhXX5FGZSuUK/OHGC9QXb Kmsw== X-Gm-Message-State: AOAM531zeJuaIcPz0IlPbvIFCjrYHIHhIhjcUzVb14G7j/HKIVXGFKKU ol/XmZZaSrm/M1MOizx9xQN0FvYe X-Google-Smtp-Source: ABdhPJxf3ZxEraF1JEWjd1Y27W5Wd6hTQFBw7axQaXRGF/kun2x7vVfbHrG7swV9fo21MTsp0agBww== X-Received: by 2002:a17:906:9b86:b0:6f8:24e7:af7d with SMTP id dd6-20020a1709069b8600b006f824e7af7dmr18468983ejc.295.1654448232907; Sun, 05 Jun 2022 09:57:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:294a:b0:42b:31b9:2087 with SMTP id ed10-20020a056402294a00b0042b31b92087ls25883edb.2.gmail; Sun, 05 Jun 2022 09:57:11 -0700 (PDT) X-Received: by 2002:a05:6402:cab:b0:42d:c842:8369 with SMTP id cn11-20020a0564020cab00b0042dc8428369mr22036121edb.181.1654448231607; Sun, 05 Jun 2022 09:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654448231; cv=none; d=google.com; s=arc-20160816; b=awemJhTXhd76esI3EQoNoHJ+rupTuc0jnKdfaVv2YIypywvI4oc1NJVANpIVTVj7vi a0NG7LWXHpJqc4OMVWXbVPcc3778SA+N0+UY8faMfwAEK80zIUbKmvswj8t9YpBWWVwL 7qcfKtUAcgabayA6oXBQkw/CqWH3aU95FtFaC2bhela3mGWmDIkdaU5dIGQ4DjeqUEmf ELmj8bdXeKNQAQv61DqlnP81EF8W1izeT59POVdKKaU30AoSUUpKIPENkXXriJD8oBCL 5TXUIxtHjbu6rcJi33PG8vIVZ9ovruS/+U+adTSfoU74tz+gVKjUZfxjyIpE9lFuJUdq /LIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=uqI55ErVc07HSIivOX7AXS9kfYIm1rBhZwSqgaXUh40=; b=D+5wRrTb2q1QI6rP4LSKMliFIpUVsS4uMssI5MMgyaCziNJUwolfalUxnmnEv1xr21 YPZHJ5V8vLTjeinR0vQQ2s1Cj4j0Npc97SCnQqgeW/29ev5lt8tCDuJy4Kexjx75+9wu PK8MC9FdYFmt2yHeCHBmG7HHMNf4tr5ZrBHNW1KpZrLdTlwKlin9L9uJB7/FVWwrxsXs bfmT7cxIIz+BMBHSQGvTCNPPpcWG4TWmrpWxeGoqjzZMqAH5cV5/ftZnXXYxUmrrdhHh Pmc+CIz+p4v5rzVUOFyzFYci0ICl5B9XR5LGo3mZ18c3AEyoRS4Nwx3BzQG1xHiRTN9Q dZbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id kl9-20020a170907994900b006feb8232c82sor5618482ejc.126.2022.06.05.09.57.11 for (Google Transport Security); Sun, 05 Jun 2022 09:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:1492:b0:70e:294c:c37e with SMTP id x18-20020a170906149200b0070e294cc37emr12007185ejc.574.1654448231288; Sun, 05 Jun 2022 09:57:11 -0700 (PDT) Received: from localhost.localdomain (mob-83-225-9-201.net.vodafone.it. [83.225.9.201]) by smtp.gmail.com with ESMTPSA id b12-20020a170906660c00b0070e3f58ed5csm3260761ejp.48.2022.06.05.09.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:57:10 -0700 (PDT) From: Michael Trimarchi To: Matti Vaittinen , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Dario Binacchi , linux-amarula@amarulasolutions.com, linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [RFC PATCH 2/3] clk: bd718x7: Enable the possibility to mark the clock as critical Date: Sun, 5 Jun 2022 18:57:02 +0200 Message-Id: <20220605165703.1565234-3-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220605165703.1565234-1-michael@amarulasolutions.com> References: <20220605165703.1565234-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If the clock is used to generate the osc_32k, we need to mark as critical. clock-critical has no binding description at the moment but it's defined in linux kernel bd71847: pmic@4b { ... rohm,reset-snvs-powered; #clock-cells = <0>; clock-critical = <1>; clocks = <&osc_32k 0>; clock-output-names = "clk-32k-out"; ... } Signed-off-by: Michael Trimarchi --- drivers/clk/clk-bd718x7.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/clk-bd718x7.c b/drivers/clk/clk-bd718x7.c index 04cc0beb67df..5088379ec2b7 100644 --- a/drivers/clk/clk-bd718x7.c +++ b/drivers/clk/clk-bd718x7.c @@ -83,6 +83,7 @@ static int bd71837_clk_probe(struct platform_device *pdev) const char *parent_clk; struct device *dev = &pdev->dev; struct device *parent = pdev->dev.parent; + unsigned long flags; struct clk_init_data init = { .name = "bd718xx-32k-out", .ops = &bd71837_clk_ops, @@ -100,6 +101,9 @@ static int bd71837_clk_probe(struct platform_device *pdev) parent_clk = of_clk_get_parent_name(parent->of_node, 0); + of_clk_detect_critical(dev->of_node, 0, &flags); + init.flags = flags; + init.parent_names = &parent_clk; if (!parent_clk) { dev_err(dev, "No parent clk found\n"); From patchwork Sun Jun 5 16:57:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2007 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5D8B03F0FB for ; Sun, 5 Jun 2022 18:57:22 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id z20-20020a05640235d400b0042dfc1c0e80sf8503320edc.21 for ; Sun, 05 Jun 2022 09:57:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654448242; cv=pass; d=google.com; s=arc-20160816; b=A5gmZQmCWt1T5x9bFke98dF2Dpl809huEafGbd5+nj54g49KVGvfo6X/ggt4aYF6yv CAe4eziXGJsxJyKz/8KNEnC4jYMVufR9GJwavUuQstKNziSwmKiyabGmNNV0ijWVz2Zk r6SIUglkwIirTHAft+I9QgkJm/zQBen70/20sRcWJzwaB8CCDMu+Zdb5TKfg8fXcnf4n 3e4AZFpoxyfQ3XJfz4pCUG64ue/p1cG+VgWahHh5rm1OKbtX0PalfC+VoCQtenalYArf kJLkmakiGs2A1USiOHFhTBDctQpTrmF2+8wi0ib0t5vSn168O92aPuinp0/6MkRSZIJR 7M1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=sg751B5LezZdl19MHdR/I/CaKSpTToB3fhNeRFxQq4M=; b=EHthM2GlzdiWcFVhPHGZMHBGYGiFUYk7lPKRPR1SlOYjJJATdpPFIgfFwvaVRJwA1Q TwgNKWIjq4Gp1eP3F55jb+W3Y9NjxhHLoP2OZYAkp9uDBPILMpMDVPa2qzYlUbwIdisE Mah0WI0S7tD646k/GQ8wVmCePMudU1WcMbV/4EgS+hPN75ixuf8ztZi7Zc0BO6TBt59G 365gdFOJ225AUwaG+TPUmGp4OHbrLuofvqNpGfALStFW/faMWiHxlrbNiPp+X4a5yYEL T3m8xBxumpR6weqGi9St11LswbYdJjH9z2HxizfykR/JkYJqmGBFsW9i8wpbub11ec7y ASKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qgHPz3Td; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=sg751B5LezZdl19MHdR/I/CaKSpTToB3fhNeRFxQq4M=; b=JN/FQQTBHmDQnyob2b2/53FzU7OoZLhDdzdvHqLanbgCQWrNvtEUM7yUggdID8KFQn o05GT72tscD04Z+fOkg+ek1K+HkGWHo3Ngmt1rFz/6o1xIEkcE6hX6V4XodqQHpsp8cm 4tPHfatuo6txSnE2P8Gdu2m+FAMACuU1gjmqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=sg751B5LezZdl19MHdR/I/CaKSpTToB3fhNeRFxQq4M=; b=fq/bgteRA7qZ/xDQA0ktvqTrK3D9xQqP3HkJoyD5izpag+JN8ef19U8oKH24+Nf709 Fo9xbTRplmjdIlu0WFYYuJX7ud6k6xJN8e+l2I99SCi3v0O6Hb7F35t5OhMuxuJmjvCx P6yzpGQVv78A9IQSHAFqYLiJvtmYU+CxxuaiBgdX0SdUek9pi8v4KeG6+MwieaFZZqBf 0ZitJtlIRP8Zq7AZ8IsPyM7AmQN+pv8McDLqDP6MPHq2TzUuiOXfgOlGoiPkhphIgjtY Gxi10rN83srj5+M3NeX8teTT1BxAKtrrrvXmhTnAUchsRwXDKaqMg5WpiumoltSs+TFa 0Xxg== X-Gm-Message-State: AOAM530dkj+y9ONJcVB0GFipDsldIpgMqpYBMKONlb/7RAhPcKsNllE1 cq0HH3eidMeuZxIpfM95RymkN0Hm X-Google-Smtp-Source: ABdhPJxamns5e5rzgcwBV2RbFW2+4AvbBn5Oqfhq9dDxS7ngSt1fFvDdHCtWWjzHdSgiLAtjL1mWXw== X-Received: by 2002:a05:6402:5413:b0:42a:adef:b360 with SMTP id ev19-20020a056402541300b0042aadefb360mr22389668edb.122.1654448242217; Sun, 05 Jun 2022 09:57:22 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5415:b0:42b:305b:5501 with SMTP id ev21-20020a056402541500b0042b305b5501ls25531edb.0.gmail; Sun, 05 Jun 2022 09:57:21 -0700 (PDT) X-Received: by 2002:a05:6402:368a:b0:42d:ef42:f727 with SMTP id ej10-20020a056402368a00b0042def42f727mr22279861edb.204.1654448240896; Sun, 05 Jun 2022 09:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654448240; cv=none; d=google.com; s=arc-20160816; b=q6jq0nPiYlvW9oIvHfPHJxfgSPO5a6VG0ZQSHDkfvQtr7e9NyKrwnkikeIcBXvi1Go l2Y/NyL/blBXVht0eJVX4qf/p7ynQ9G0DGL1BQ9SqmlKv1y1XI3aMoLbPY5fxr1ZR8Kx GEJat1X2nQEx0o+mTNudFzq1fz/hY9/pCVvfiM9UqsRt8qbelU1B1BpMNpXZwqwz0pbV uW9I5zwjMNuEYbG7tc1Li1J0Ok34G2cFz14/ZICwNVnmojrwHWlnV6v+k9WBhKVCPOLj A9vyeY3XVkRy8aS6uGvVZWJB4Bx9uUo6PENtwoHd4JesTddtn94VXCiIRKf965Vj+Xvv vFgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3v0LT+L5TRQJB/iw4+CcRfgsTzHHSl9FTGeCvvdSOwc=; b=EeQU/QdrC9Bu3QuUHlFI6ddIgjCE38yooM/4QiKsaGd08pyVwefzcQAmpYIjRWd3bR hZWyWoOpu4CsrPE++qAZY6AhMgFLywfEl/z4f88mM1tuzV0Sa5uVAN68Z3qgx8AB6KSz 0HPZzQofc6+IAkQ+zwiU35gOwCFNsvtXkLoA37l0wUa2RtM8qGmgMXD9h4uCRL52ToDL C3rXMRgl8zuNgLxvaI+Zj6r9uILtMO/CFCpIRZIqiMqArwfInEP156dYUgotBzLSRw4S mX4jVdiC7bao37HisoSOshrPzwpfAEE1Q6NUZOdq4R3yGIJzfZzcTVISFa7WB2x7FxRu +Cug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qgHPz3Td; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id f20-20020a50fc94000000b0042dbda388e7sor6978564edq.43.2022.06.05.09.57.20 for (Google Transport Security); Sun, 05 Jun 2022 09:57:20 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6402:4410:b0:427:ab6f:a39a with SMTP id y16-20020a056402441000b00427ab6fa39amr22262247eda.120.1654448240628; Sun, 05 Jun 2022 09:57:20 -0700 (PDT) Received: from localhost.localdomain (mob-83-225-9-201.net.vodafone.it. [83.225.9.201]) by smtp.gmail.com with ESMTPSA id b12-20020a170906660c00b0070e3f58ed5csm3260761ejp.48.2022.06.05.09.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:57:19 -0700 (PDT) From: Michael Trimarchi To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "Ariel D'Alessandro" , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Cc: Dario Binacchi , linux-amarula@amarulasolutions.com, devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [RFC PATCH 3/3] arm64: dts: imx8mn-bsh-smm-s2/pro: Add pmic clock connection Date: Sun, 5 Jun 2022 18:57:03 +0200 Message-Id: <20220605165703.1565234-4-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220605165703.1565234-1-michael@amarulasolutions.com> References: <20220605165703.1565234-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qgHPz3Td; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , pmic clock is connected to svns_rtc using RTC_XTALI pin so we need to mark this clock as critical. The clock source even the wifi/bluetooth chipset Signed-off-by: Michael Trimarchi --- arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi index c11895d9d582..072d2c480f20 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi @@ -28,6 +28,8 @@ usdhc2_pwrseq: usdhc2-pwrseq { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usdhc2_pwrseq>; reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; + clocks = <&bd71847 0>; + clock-names = "ext_clock"; }; }; @@ -92,6 +94,7 @@ bd71847: pmic@4b { rohm,reset-snvs-powered; #clock-cells = <0>; + clock-critical = <1>; clocks = <&osc_32k 0>; clock-output-names = "clk-32k-out"; @@ -235,6 +238,8 @@ bluetooth { shutdown-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; device-wakeup-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; host-wakeup-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + clocks = <&bd71847 0>; + clock-names = "lpo"; max-speed = <3000000>; }; };