Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10364328rwl; Wed, 11 Jan 2023 19:09:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXswcQN8cSyUr8+TnzigrUF07TcCGRlkV4PTzFocKYxN78sglNyQ1d3jwlUCd8ghLmkXv5dd X-Received: by 2002:a17:903:2652:b0:192:8e0a:16b with SMTP id je18-20020a170903265200b001928e0a016bmr52678628plb.14.1673492953955; Wed, 11 Jan 2023 19:09:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673492953; cv=pass; d=google.com; s=arc-20160816; b=ngJWyAJW9eaNqZn8aya1lTrvWj4vDyD6IWGjy010LKjdnif0lWVlMIC4WvswZfBSmw G+fxsdXD1ZkzXeX/W4iF+zZ6syc0mv8cjHtdT3e1JKzauNt2p9kc9MJl0MQON2jdth8+ XGMWs2aeYL/YSDuzfImPfcP1u9ekHjyB3mnZZEHzWIHT7VvTAndkL/n6HPHJZWUe5IKQ FdLPvaIGasjHLOo2pnzczIf8Y0GrKUU7X6IWpG/eYOvSW4RsG/2rBxq17jyh0hlfvQ/e xpSlUM8vhV0k7Rm1A9hJx4nTOB3WrFB8LRCgRw/Mwg4MfgjArQjJ0Y8EwV3evMlHWIsR rKOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=Aj2DDQC6mtht01ASphlvME6cV1HOoWq0/2zmP4tTGy0=; b=gZxBcVia1ZsUbkEP8o/KHnnpH1DCzXaD1m8KiU9xx2/UCSelqJhX48dvhNEI6vIY9m ksH4aZS/W7xBqlX4BI2vZHQ06NPfkME6P27vj+T/8hAcCn61E7EYUrCMuavzJJ10gd2N a+rMN8/IqPtfeitqPFlyZbfJ8ppDnU3qKFmhr6el/qnDgzZaBfosqmnahPyNR9S/Iule 7X/5XTkFbEISzmV6rVv/I9UWZR5T8dtNjWAl0M2Jnh6gawr4V9EHSU678AxS1ft5RsYi 0Dms1CKkINiWSD+pNG/85jeDLRasYO73y8BTCLKMAM58s5Qlh80y/DA/RLr6E8y/skyi WJkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b=TJSB442e; arc=pass (i=1 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty dmarc=pass fromdomain=linux.beauty>); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a63aa0a000000b00477bb3c1b5csi15831270pgf.871.2023.01.11.19.09.07; Wed, 11 Jan 2023 19:09:13 -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=@linux.beauty header.s=zmail header.b=TJSB442e; arc=pass (i=1 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty dmarc=pass fromdomain=linux.beauty>); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236045AbjALDFs (ORCPT + 52 others); Wed, 11 Jan 2023 22:05:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234552AbjALDFn (ORCPT ); Wed, 11 Jan 2023 22:05:43 -0500 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4266C4882A; Wed, 11 Jan 2023 19:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673492736; cv=none; d=zohomail.com; s=zohoarc; b=Kzv7hF+g/k1OWqjGzjTaaBgXIu2xM235XxGPkXFx2FoqrCnlmZijnv8wRrSaYE9YIS5PAvqaGwVYCscP8miDbAER+LTIzDRg5GWdXKAS7FPtafRzckdz9azhhTVeM1vNMLKxnw0nSIhxfxz9Z6QuUZkPj3a9KSl0BE4G3xI6uVc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673492736; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Aj2DDQC6mtht01ASphlvME6cV1HOoWq0/2zmP4tTGy0=; b=bYD8scRL+5RYtEFR6BCwo4qkwHA+G1hyKBcerU3JQdwLrAUVe1654ZlEaERgw9prrEF4jCO4rXdKuLQzLb+W6SFgdbA3iZcbR9RBPg+xkAm5k0TrYeM9wPbT7X5PDXYVQ4vi/CPjKdFuoJ5kF0jAch7kif2SeyVkkSrKP1NtFeI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1673492736; s=zmail; d=linux.beauty; i=me@linux.beauty; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=Aj2DDQC6mtht01ASphlvME6cV1HOoWq0/2zmP4tTGy0=; b=TJSB442eaOth18GqCSDt5DUnEjuCkRAHraeYNN4vL8SFILUsRx60R3NRUqpBJGRa VdkAs1a4kFvOWNneWSnUluuVyQP563dGDqZC6ZvkUPCgkSXwXa0RGMKhX0tZcwESfxV dSleIMC6BO43mvgw8+bvaN2J2xt0B1RoduHqua6M= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 167349273477392.5999946788379; Wed, 11 Jan 2023 19:05:34 -0800 (PST) Date: Thu, 12 Jan 2023 11:05:34 +0800 From: Li Chen To: "Stephen Boyd" Cc: "michael turquette" , "li chen" , "linux-clk" , "linux-kernel" Message-ID: <185a3f0a326.b623e6bd1243489.6765528573167668508@linux.beauty> In-Reply-To: <57d1f58c4c6cca793d629d5776b477d0.sboyd@kernel.org> References: <20230110114540.2975540-1-me@linux.beauty> <57d1f58c4c6cca793d629d5776b477d0.sboyd@kernel.org> Subject: Re: [PATCH] clk: create write_enable file to control clk rate write and other dangerous ops permission MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 Hi Stephen, ---- On Thu, 12 Jan 2023 02:37:29 +0800 Stephen Boyd wrote --- > Quoting Li Chen (2023-01-10 03:45:39) > > From: Li Chen lchen@ambarella.com> > > > > It's common requirement for bsp debug/test to change clk rate from userspace. > > > > Currently, we must define CLKOCK_ALLOW_WRITE_DEBUGFS then re-compile kernel > > to allow this feature. Let's replace it with a "write_enable" file to > > allow enable it at runtime. > > Nak. This design is intentional. Thanks for your reply. Got it. But sometimes re-compile is somewhat low efficient. Is it acceptable to provide a write_enable to clk_core(not enable by default), and allow clk driver to enable it inside clk_ops->init via clk_hw->core->write_enable = 1? Regards, Li