From patchwork Sun Apr 16 17:32:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangfl X-Patchwork-Id: 8260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1667833vqo; Sun, 16 Apr 2023 10:34:41 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUW566JtoyZDhVSHfarvN3zvpekf2hXyLLIm9Z8SZJlb0ZvMKm+UlaIOfE+AvwDgqm2NZP X-Received: by 2002:a05:6a00:1695:b0:62d:b210:8c9d with SMTP id k21-20020a056a00169500b0062db2108c9dmr18962811pfc.32.1681666481482; Sun, 16 Apr 2023 10:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681666481; cv=none; d=google.com; s=arc-20160816; b=ozmEUpJ40Utwy9sn/YqvJp9mLX875jBWeJ5wMufLZBGILxT5Ug+7b2ZSJAdFP3CKVV TZaP0NiPBTsuTkENGhYxHm46ztAZRais3mzRZc1mJX1I6DiMCi80bynbCUsHF+UM7lr7 3aEGprwk7rH/XDt81IEe32B+K2bBie8o2LsiRCnliGXIAG1Zeu2gn+3nrfcAy2ZRwIW+ YhlWuhuzccHxQwEoJJlV7vmOeuUuoxozL89+tqlx7A654Guk4kR6x3DuvcbAq5n3YdYN ijgREtmzZvGuHmD/UgwUtn2vXQ4fibfOsR3RcQjUUEIzSV68aFU+Yct6UIV2p204X40Q 2W2A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=G5OXsid8SYL4GdSMfFGQSs/wdoDzyJyZpFKL7M/EWZU=; b=v+gatMxh1oQ5P+DA3MbJVQwMQQsWjv3Fytd+vWHCvmtENv+k3SLeRhQxk7wv5EXhJV OqBBLZpT/HYgZ3+8heU8uJ1aK0Yo4VnmoETg81c0T6G+StJXvu3xcBJKJvMxUKlI6rNM GDGVTUcsHdeo5t/+JwoxsmkCW4R4I6hZOcxvIL+A6uCNpNH2LTD9EZoaFC7oyEbOjrzN ElydD4c7EXWxRU0OnOL6fVjMK+bKj+ij7aCcHAHKnLGxJ8RQgJEYco/dV2KZCs6n3P/e 2Vwe2lshkHtyUpI2d9tUaECDE5nWApBIU76w9MA7sTZM4YfSpSlhmxEoMDs58dI5crhd LXzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=r26bZ91M; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b0050f818e900dsi9960368pgp.761.2023.04.16.10.34.28; Sun, 16 Apr 2023 10:34:41 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=r26bZ91M; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbjDPRd0 (ORCPT + 99 others); Sun, 16 Apr 2023 13:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjDPRdY (ORCPT ); Sun, 16 Apr 2023 13:33:24 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B1A792; Sun, 16 Apr 2023 10:33:23 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-63b8b19901fso206360b3a.3; Sun, 16 Apr 2023 10:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681666402; x=1684258402; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G5OXsid8SYL4GdSMfFGQSs/wdoDzyJyZpFKL7M/EWZU=; b=r26bZ91MxZ8MIhL3bXOVZym4OV4qGD+oXb+sZ6/Bbj88MEymCf06SEFfbJ1rJvc2q1 deH0nKmnSkPXiGMsDh1RxIQjjNioNDR3L70xYvCpb2Inm0MnMR7n/+DGpkEtjgFcYajq X8MtthEibrfeXhnNPGsq6dO6V9SEASZIjbnyhFcD3zNaW8wdagJYamUA/l75EXgpkl6J GCMS75hM8XEm87oly5ydBtTc1eByYn2eL2Rpg97qU6+uhXownM7uxSbs29Q7IOyJCSmn GYFFRp+rmojhelvZprQysyptI+Od47EBs7GEdLJBUD3nrUzgqB/ySo7thbgcye8g33D2 T1ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681666402; x=1684258402; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G5OXsid8SYL4GdSMfFGQSs/wdoDzyJyZpFKL7M/EWZU=; b=a1tkmuWnIlv9JU1jN/JbjrxKtwOmqQVwoFWFXMNQY2WKkjiLDfJc2347/H/ULmJy4w DBlSPeMu9Y3loW1TPeB+Q4WPnQpo/qkCQeDv4A1jUsI8sI6WdTV+g3QQ0LlRf6LTmeKv NgYUGx2fNh9zd74WK9hPZS5dymP3CEVkRFXXmXaLZ3Ibe6PzChFg1L2NdTW83T895d5f 8/hso3i4UVrnuZAGC8fjSxMSo2oSJrrhhFEXDow3tQ6RtAKBxBN5I3ttvQqiPzeH/Qzn PP3xZ4SfeksSc/5CSPpuZ04nqG90R4nQL2DWAzGIdyvguy/OUV9nSkBY9Swr3s2E2aDR yzmw== X-Gm-Message-State: AAQBX9c//BNcAGUG09yc+NrC814eI4anOOoi3WGGnZVjwN2FS5cMpLM6 g5dMy2ct2/QAvdlFIPjNWssT21sAkPjbk7FrCyg= X-Received: by 2002:a05:6a00:240b:b0:637:c959:8ea1 with SMTP id z11-20020a056a00240b00b00637c9598ea1mr16584791pfh.22.1681666401849; Sun, 16 Apr 2023 10:33:21 -0700 (PDT) Received: from d.home.yangfl.dn42 ([104.28.245.200]) by smtp.gmail.com with ESMTPSA id j22-20020a62b616000000b0062d90f36d16sm6110973pff.88.2023.04.16.10.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 10:33:21 -0700 (PDT) From: David Yang To: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org, David Yang , Michael Turquette , Stephen Boyd , Philipp Zabel , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] clk: Add basic register clock controller Date: Mon, 17 Apr 2023 01:32:56 +0800 Message-Id: <20230416173302.1185683-1-mmyangfl@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1763355112186390314?= X-GMAIL-MSGID: =?utf-8?q?1763355112186390314?= These clocks were provided in `include/linux/clk-provider.h`, but lacks DT bindings. Add a clock controller to avoid operation conflict on same register. v2: split clock controller and its clocks Links: v1: https://lore.kernel.org/r/20230414181302.986271-1-mmyangfl@gmail.com David Yang (4): dt-bindings: clock: Add simple-clock-controller clk: Add simple clock controller dt-bindings: clock: Add gate-clock clk: gate: Add DT binding .../devicetree/bindings/clock/gate-clock.yaml | 58 ++++ .../clock/simple-clock-controller.yaml | 50 +++ drivers/clk/Makefile | 1 + drivers/clk/clk-gate.c | 81 +++++ drivers/clk/clk-of.c | 292 ++++++++++++++++++ drivers/clk/clk-of.h | 26 ++ 6 files changed, 508 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/gate-clock.yaml create mode 100644 Documentation/devicetree/bindings/clock/simple-clock-controller.yaml create mode 100644 drivers/clk/clk-of.c create mode 100644 drivers/clk/clk-of.h base-commit: 7a934f4bd7d6f9da84c8812da3ba42ee10f5778e