Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1139260rwl; Wed, 29 Mar 2023 13:18:04 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZ8bMbjVb2XzlR22LlUXX8O0ajWTSSHtNxajsCIgqC7U3FYBo8xWgZvn8RVc9sDHXhXxS7 X-Received: by 2002:a17:907:c087:b0:8b1:779c:a8b1 with SMTP id st7-20020a170907c08700b008b1779ca8b1mr22100928ejc.5.1680121084465; Wed, 29 Mar 2023 13:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680121084; cv=none; d=google.com; s=arc-20160816; b=Z+axY0JK9Y1j4wwKYbyCbhMA15N5ekCIqY1vhH1rqi7JIJeu2iNdU/sK1dlCHMvHLY lJkeRg4XWe761/MV7hEkUa4GsUsfJbDSNtnO4OlYXy3wr4APbB4Ug6S4M8RiSB5faTKv ChbhPynhZqHZDyFLlU0mpLpiFh8/eGNmwpnEbBw0AeS1Npmhcf2OvjrAKIBjNGIllS/A 2HhttV/OOkLDlsRIWB1KRKsJa1A+GUAkd+k+zQgq3G/kkcNaRatx1HQxxagTEC6D+S3I G72YbkRorBnHwli1F5YnidVzBp89rp4h5FbRkTqm2mJT20PFxLcQ/zxvpdIPxw7ATd6X aV7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=CEA2E91/D6OdKdeQwI9RPv8P5TCyBSrVoXfZn5bPmXE=; b=RGB39C3prLn50Dzu/VBU55H/FZmJVdJcLyf8Ei/YgxWlkd45aUKs6zQDIWACkrDBBT LAScMBPVRJBiQ2/LMLk9KNQc+qu8Z/DwrPhkFtEDwaZgEfP9yoJQ+4F11ZswKr0eguVT Ek0jEfRmWRs5qd4VD9Che8DJnMsO/w4ypiyd3k4JrSewvkDGjjG/p8z+i6da6GIYnZEM RUVr3ffQ/idcZcjq58eiFbfpXU6TlB0f1j78M7sUGsN6vo0ySQrU+SJUI30fa++xBxz3 gS82dcd+QcnIejEuqWoHkukPdyy1f5My+vo96/EDejrSZ3Qi2vtPD9esdnPuqD69xcV1 iq0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g84JxOb1; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq14-20020a1709073f0e00b0092f1d91787esi42424134ejc.299.2023.03.29.13.17.38; Wed, 29 Mar 2023 13:18:04 -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=@kernel.org header.s=k20201202 header.b=g84JxOb1; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbjC2T70 (ORCPT + 99 others); Wed, 29 Mar 2023 15:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjC2T7Y (ORCPT ); Wed, 29 Mar 2023 15:59:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAEBF61AD; Wed, 29 Mar 2023 12:59:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6667961DAD; Wed, 29 Mar 2023 19:59:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE040C433EF; Wed, 29 Mar 2023 19:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680119957; bh=tucWIjvVAY6oYmk4WMzNkOOTjS2GDIhv/FrLw7TTJI4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=g84JxOb1v1QRnnQ3CSRXVAy8A5VZF5jYLQ2TE3FSXTjF6/z3gyFEjKCiLgzOr2PFQ i0O4QUT0rJoNRMiIEOZyYaGvV2p+/0YmJERhxCO+qiIRxbmU+nUzBdHs+4z5S3rYcX jVpIKnBVNq3HqnbbwjriwLP06JHLo4wIanEP7lxSmzP4uDP4WhqmqXj2ENZIg6UV8X 5NyUOWJTuN9MyuW4cYqkm8yQlXVld6uEl/lai5PGMyiQ2JeI4x1Gm8I8i1YlfDFj4n Cqyr/9T7ztYJmjOUn0mPxxclaQ4/EzrUT/JCsSIxht8QzRA4w2IS6Wf2AXyM19rT0V ATrVCz2q0La+A== Message-ID: <343f23076b328089f59820d98cd29dac.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230117135459.16868-6-ansuelsmth@gmail.com> References: <20230117135459.16868-1-ansuelsmth@gmail.com> <20230117135459.16868-6-ansuelsmth@gmail.com> Subject: Re: [PATCH v3 5/6] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq From: Stephen Boyd Cc: Christian Marangi , Robert Marko To: Andy Gross , Bjorn Andersson , Christian Marangi , Konrad Dybcio , Michael Turquette , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 29 Mar 2023 12:59:15 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Quoting Christian Marangi (2023-01-17 05:54:58) > diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h > index 01581f4d2c39..18f4f7b59f36 100644 > --- a/drivers/clk/qcom/clk-rcg.h > +++ b/drivers/clk/qcom/clk-rcg.h > @@ -15,6 +25,8 @@ struct freq_tbl { > u8 pre_div; > u16 m; > u16 n; > + int confs_num; > + const struct freq_conf *confs; This design is uncommon. I suggest you have a different clk_ops structure and/or entire clk_rcg (clk_rcg_fm?) that does things differently. Then we don't have to worry that all the other rcg2 clks (of which there are many) could be broken by this patch.