Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp283945rdb; Wed, 20 Dec 2023 12:07:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHT5e9o3ePZWXrhk99s8x68o8HKMd4LNqiquzLK68wZlfy12OkgxK8l1vuiyQkzlVbAnZAD X-Received: by 2002:a05:6a20:5491:b0:18f:ea5b:683e with SMTP id i17-20020a056a20549100b0018fea5b683emr197535pzk.85.1703102875867; Wed, 20 Dec 2023 12:07:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703102875; cv=none; d=google.com; s=arc-20160816; b=SyfMUYmBPcUYpOeA6wWHtSXM3GFqQJKcaddpR0ou6MlHnonkKamCAez7xJNCfuvOMT AohW7dOHe29/wXwrVO+Ct9MeSKeCGMOUUPb826kIpT0ck+0oyXeOcXqmFL1lMXArqXnh AAGOn7W9ZmiTULX6PVJY3azoTEscAnDUa/8vFprLKt7+q30voqbkHV9/iy7PLOjW4NTM JjmqwZ3nKwTbU+dg9pgnOPN3eLyRyVXp8qPTxZ/RpIJQhvhOUVYF/aNIwV+E8dahseBo /RLPt6+F7JQEsRjYlB0yBOvRcRZAqTMgWEysgpc9HilwWoSfBFxhlZIpdTOTw8APudzi hC7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=YaEP0vCrsJzhAwvJo8zMZijV6VW2T1qaoUu3Nf1mZ1A=; fh=wN15VK9BAQnS/b5l++cvaNWFusa3kl98s5uEMK+By2U=; b=NA4XxR7s0NSNJFAebRCZCg9iey5xTtrYSmNpyFrQ2S40qfBsgw7liGnOzybU14Iwup P2CXYjjj2FvsqoKUOZyJnBkgUuOp/2sriiKC4c89aa1LUYAMdm7mHgDpsCI5RvBr277V 6QCD1/yhsHmdKT0MgJ+de5WWZGOjFkh9Jw0fcYgOk89pRGxJevBBJa9QZmLa1XCi6R4t 6diSMY13P1WHECc0THl4VRou9Ue6gZKY3Jcb310DaxOxfCIfIoXy7Pm/KqpGrwzQSzeA zXo/y+UxgPfU7c0TmpBNSD8XuPcFf4KXFb0AYR0tcxHcX1jQhC1Gg3dM8bgaVOz+PvE0 vvgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XdYzkPQU; spf=pass (google.com: domain of linux-kernel+bounces-7408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t20-20020a056a00139400b006ce702e8930si231873pfg.215.2023.12.20.12.07.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 12:07:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XdYzkPQU; spf=pass (google.com: domain of linux-kernel+bounces-7408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EC693B247D3 for ; Wed, 20 Dec 2023 20:07:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 695BC487B3; Wed, 20 Dec 2023 20:07:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XdYzkPQU" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94CB34879C; Wed, 20 Dec 2023 20:07:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCFC1C433C9; Wed, 20 Dec 2023 20:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703102860; bh=I8ZJDqp5eNo74J5gktMHo6oHsM5qqMxm0Pus3JKGU+8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=XdYzkPQU93NbIfebSUJNiZILeSdnjT52dOrh4lO3b0TzGqpThMZvJ8KzRFhFH7/58 67U8v90dARir0lQ+vJt9Nt5RojG0A/y3t8NPhnZ0bnyzhoyTg4piLDo40+8IBbeg9d 5sagM8iDGokbFL6ykMHEumM1T+/DppF493II24qqJ8hSHaXvZ++kirXgYzCi6bZ25A J9fvLAgUz0mu+iiYjdC3tqLUkqA5kBOcWCC77aKqPj1fMhPOep6ToFAV/mHK902y3c s6AEGKsCvh4JR2pKJtK10qvck6spXmqxAtKHCfQOn5w/Tpa+1UHUiY6Hn59/+LHsSy q3RJg0n4lB98w== Message-ID: <5bcc0bafc1c31ca4902b9b574f02625d.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20231124151847.1915-2-ansuelsmth@gmail.com> References: <20231124151847.1915-1-ansuelsmth@gmail.com> <20231124151847.1915-2-ansuelsmth@gmail.com> Subject: Re: [PATCH v7 1/3] clk: qcom: clk-rcg: introduce support for multiple conf for same freq From: Stephen Boyd Cc: Christian Marangi 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, 20 Dec 2023 12:07:37 -0800 User-Agent: alot/0.10 Quoting Christian Marangi (2023-11-24 07:18:45) > diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h > index e6d84c8c7989..c81458db6ce4 100644 > --- a/drivers/clk/qcom/clk-rcg.h > +++ b/drivers/clk/qcom/clk-rcg.h > @@ -17,6 +17,23 @@ struct freq_tbl { > u16 n; > }; > =20 > +#define C(s, h, m, n) { (s), (2 * (h) - 1), (m), (n) } > +#define FM(f, confs) { (f), ARRAY_SIZE(confs), (confs) } > +#define FMS(f, s, h, m, n) { (f), 1, (const struct freq_conf []){ C(s, h= , m, n) } } > + > +struct freq_conf { > + u8 src; > + u8 pre_div; > + u16 m; > + u16 n; > +}; > + > +struct freq_multi_tbl { > + unsigned long freq; > + int num_confs; size_t? > + const struct freq_conf *confs; > +}; > + > /** > * struct mn - M/N:D counter > * @mnctr_en_bit: bit to enable mn counter