Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1010663rdb; Sat, 7 Oct 2023 08:04:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeg8FlAbMyrwkEhBnkzQYbBl+Zj9yAliGUSiM/v+m9frQqN4l9E9oqreVJdFzAAarYE7O+ X-Received: by 2002:a05:6e02:6d1:b0:352:a35d:246c with SMTP id p17-20020a056e0206d100b00352a35d246cmr10712231ils.24.1696691044847; Sat, 07 Oct 2023 08:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696691044; cv=none; d=google.com; s=arc-20160816; b=0gsei4GfTvUj0gLa0bc8ZPS1mGHMiqO2NAcChv/bLjhg1wXKcxrHcVRT2wJfw9wnuV ORGd6OV9aRE5KlzE1oTrhlHh5kXTHInHgH8LpcJlih4ysqvRQbVRxOQJ2GoSSnFKEj2U 1DcgTr5QNJnELVlBh69mPV263mYgi7CgV4UgUXNE0sJsyDVmhpa0QJbphjRoR3YYZFih atsKq+4NbZ1RJUpvoAqKZjKJN7CtJSSeAIlTBkFUJeSBzQQ/0R7HuEMmfcKo//dkw4W/ SwvfHA+HPwJx+/upfxmj4IRnZtpHcibSVYfi9jhoyDKuWV7vDKtDhLnT1nxsR0Iq/e9T LH3g== 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:subject:cc:to:from:date; bh=8yibHgqQOBzVkXGRme7z83YjlyTu6L1G6ejxxpZJiV4=; fh=9CIg4VxUHhBrp9jU3odAjSlkOQ0oCJCFGavpOPQgUGo=; b=ZUADcugMeVB4+cEY6cj5KAACgc+1d8K/1kkjUZyaH39Z8830fu67fS2hDB/x9cUryN tZg3TKCwjQJUgbhgLFD7aOrNzQOHxdVCY785MeQ2eGRUudQUenfabd57nQo4bhIt/mjV yFySAlG6f/5yylEBIoYG2f4NW30PYP9PmSA+swKzA2ymg/B1U3gbfogPnEy0svmMzcVD V/WwBeJvnBHuCzSamlWSbM7X6KvIGnL39+eEPzms4Xbs9aL5YyeO5RJgEY0CCBWnWh2V mwqW4uk8/tezfTxwKt0kIUNJd+Nnf2l/ChBwoF6+6PAm8KgjKeHI//Bk1lvqJtflL5bu /nnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z19-20020a63e113000000b005898dedc9f7si3496618pgh.180.2023.10.07.08.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 08:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 840B88024627; Sat, 7 Oct 2023 08:04:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343956AbjJGPDp convert rfc822-to-8bit (ORCPT + 99 others); Sat, 7 Oct 2023 11:03:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbjJGPDn (ORCPT ); Sat, 7 Oct 2023 11:03:43 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DB58B9; Sat, 7 Oct 2023 08:03:42 -0700 (PDT) Received: from p5dc58360.dip0.t-ipconnect.de ([93.197.131.96] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qp8q5-004cjc-Ky; Sat, 07 Oct 2023 17:03:33 +0200 Date: Tue, 12 Sep 2023 20:56:47 +0200 From: Andreas Kemnade To: Christophe JAILLET Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lee@kernel.org, bcousson@baylibre.com, tony@atomide.com, mturquette@baylibre.com, sboyd@kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH v3 4/5] clk: twl: add clock driver for TWL6032 Message-ID: <20230912205647.4be3b753@aktux> In-Reply-To: References: <20230911221346.1484543-1-andreas@kemnade.info> <20230911221346.1484543-5-andreas@kemnade.info> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=4.9 required=5.0 tests=DATE_IN_PAST_96_XX, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: **** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 07 Oct 2023 08:04:02 -0700 (PDT) On Tue, 12 Sep 2023 19:15:54 +0200 Christophe JAILLET wrote: > Le 12/09/2023 à 00:13, Andreas Kemnade a écrit : > > The TWL6032 has some clock outputs which are controlled like > > fixed-voltage regulators, in some drivers for these chips > > found in the wild, just the regulator api is abused for controlling > > them, so simply use something similar to the regulator functions. > > Due to a lack of hardware available for testing, leave out the > > TWL6030-specific part of those functions. > > > > Signed-off-by: Andreas Kemnade > > --- > > drivers/clk/Kconfig | 9 ++ > > drivers/clk/Makefile | 1 + > > drivers/clk/clk-twl.c | 197 ++++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 207 insertions(+) > > create mode 100644 drivers/clk/clk-twl.c > > > > ... > > > +static int twl_clks_probe(struct platform_device *pdev) > > +{ > > + struct clk_hw_onecell_data *clk_data; > > + const struct twl_clks_data *hw_data; > > + > > + struct twl_clock_info *cinfo; > > + int ret; > > + int i; > > + int count; > > + > > + hw_data = twl6032_clks; > > + for (count = 0; hw_data[count].init.name; count++) > > + ; > > Nit: does removing the /* sentinel */ and using > ARRAY_SIZE(twl_clks_data) would make sense and be simpler? > well, I would like to have it prepared for different arrays passed in some device data in the future, so I am choosing that approach. Regards, Andreas