Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp87424iof; Sun, 5 Jun 2022 21:59:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8VEwWXp80V1wLcmHoc3qn2ky2UbMu/pSaHG42ixdONt/Gg9FPMV8UY2uQD9yydUJ+P2Xz X-Received: by 2002:a17:902:db0f:b0:166:42b5:c819 with SMTP id m15-20020a170902db0f00b0016642b5c819mr20521614plx.96.1654491541831; Sun, 05 Jun 2022 21:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654491541; cv=none; d=google.com; s=arc-20160816; b=EqoeJxl0JsjV1OIoAlPthtyiexlQDbZ9rGJMAicvKzsfILOwA6NrUOgBsZDA8cE6g9 n1tP093r87mkH5vYhgi3R82XPHxKpWDIV3HRjt/JE1BIWZJR3AOAPwuT+EVjq8PDVxAX JV2AcGOcPrsdyP1gdBJ6PQQ5Fi60a4VRPBJKM5w+hHr2ANNy1zzyrCZwqAGSCs+3npR6 MPrqz3XfIyakBfAt15VRaBW337JzHQqYyhrfHs0ikeENf2CrD8WQEBiexyg2bz3mOaxK Vw53Rst8IuSavMOIqpcwqKvU4yUeIHcuqfCoLJOYglnBrJU+zthJRldgkUnxfeBpH4Pm pOFQ== 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=uqI55ErVc07HSIivOX7AXS9kfYIm1rBhZwSqgaXUh40=; b=TXBHWkJMuS4Ep3/s1x5Snr9/euBpt50UduDyTL6pEiagoXjhig09hP7g4J+2jjq6e+ E6N8n4IkB0pZArhkxoYyG+rjsee8VY0q+ZKb+C/0DgMDUJm3kGN0a+zSOnqRr2E0PYQc CZjspM6W6IIfVAmRRTm6f70BJK0I4XQq7cR90LrVgYsJ6CdbYmW/tvKY9jZf5ed/ah6C +6ZfeP2FxqKrPGtuGHsUyCZRvfU6FfHGfzrwPXaywKo7E0viKVgsF0CaNzG8D6gB7gqc 7qoql5NHkbKsTUMtk73DeyAGj7VpfLHRe+tgCzkYQtgy52xMCWDnMn/bWBJ26kY+769p e/Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q2-20020a056a00088200b005190631b525si22700955pfj.148.2022.06.05.21.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:59:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0093F72E38; Sun, 5 Jun 2022 21:12:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351330AbiFEQ5R (ORCPT + 99 others); Sun, 5 Jun 2022 12:57:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351325AbiFEQ5O (ORCPT ); Sun, 5 Jun 2022 12:57:14 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C788225FC for ; Sun, 5 Jun 2022 09:57:12 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id me5so24329726ejb.2 for ; Sun, 05 Jun 2022 09:57:12 -0700 (PDT) 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:content-transfer-encoding; bh=uqI55ErVc07HSIivOX7AXS9kfYIm1rBhZwSqgaXUh40=; b=VIbhzFl/bTjxpaT0eAACnezKnRbICldZ9hYrKiZSu8aZCsyIkvl+8ItvppwWMaM4cy vX2bu2dfheiQ1Y7jfYkNbnp08WFWGXzWDrijCAU8ZK2neE8ilIIQ7fFDBcpcoTFpfTzg so8qbCau2wxK0Lg3SPKxyi/ywoSq5tOmi5U2Q= 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:content-transfer-encoding; bh=uqI55ErVc07HSIivOX7AXS9kfYIm1rBhZwSqgaXUh40=; b=JbG3nKRxyjgOooTaUDydvtDPH+zbZ0QG1VZHG6CJaXk9R9523HdzY463PWMBmHo+3D ps4U54Ji9wVWVTy5EwK7GWbJDcZq2de9RfiUizjBDudhEY4v3qPRSMSpli9Ju1sbV54d FCZECNvhZbFHsZ72MZXwLQsyMFZbZ5iIvP31IrGnFt2ZH9YNh/YlVl4oO/qiVB/U2maY e4EWtrJtWMXakbYRNTHl1C57vxlJe/9gKHtkx0rXQZdOz/rBaapSmrGmlZZ3YtsNuFfy BUrDpTSI7yXuGjGYR9ou7h34ue1X65m+W37tbL3i6Ot0WjgpI2kz491nHraElA/zFUfk Ddlg== X-Gm-Message-State: AOAM531enHGrPQu3v3ccMtlYXtzcrIINhsKqSc3MM2BHTqGA8BGXB9GP Q3wadsYjcM7iJDPAZgF8xXxWIw== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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"); -- 2.25.1