Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4184407rwb; Tue, 20 Sep 2022 09:58:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4SHCWMl2Cg78DLy83mqRQ6ot7U0r2skRqlLT0KRhb5SkVjDi6xoSxJ5PrHq++TK4B8jPBC X-Received: by 2002:a17:90b:306:b0:202:b9a4:b0aa with SMTP id ay6-20020a17090b030600b00202b9a4b0aamr4942133pjb.78.1663693115905; Tue, 20 Sep 2022 09:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663693115; cv=none; d=google.com; s=arc-20160816; b=FP/4KsmYEjNyXn2TJC1/kGRUUfHuY1/APfka2EIceKq0NNFQj9hSEcJQJ4Y1Di3Kad 7Tu1S8DO0Hnf6AyzHbqQHl6NivUw6VrbAy16bkGIVOwFd+McPGCxX5jceJbhNfK9FyAO gJqZFEBbvtb0c5dmUDId0gATqGRUfJR+CgFfJianbmarIl0NLfIigeN1teC5MLztU+wa IlmcWFQE4uKO00n/wuZ7dB9iz7JLQV4GnOsKvyprjnmHHwTPDMqSwN2FoaXhGCYIseAk LWlLlsZMBWSpDzPs0d+yrvzOxCKMbad8+LrsijuYLZ8amtaReGgbY3gvpxKW90Xd/CTD mPsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=75HQqNAp0I0yNcAGZpLrhy2xjvg2qSjIDP5Yg9/iEC8=; b=g5lItBP4k1TQ1sb+RJly0pLgjwno2saBUUmOD+uTeEfqDCivGK61b1XUg+EX2PLpuq FCNEcJlSJCW0tow12+jbKtLA3eIQuISmzDcOwRbyEHwiispVsqWjeSVElhJUHgGFNsVs buP3D51FhVOKbJbWw6rx6D7DaBMaLSV8iA9C7sNW/gmUQxswZTNJCYAeBGEZhuGCFL3c x4D7qkPPVOim/H+3BwUhiovUOTvW6EFabiLbaMV+RMVUQRW/jvzucbkUecomEm6SDZl0 wrd02HG4ZFeUD5e2Vtsdia3veaAqhuM0lAWn95OCkahWQaqUAp43RLlPL7/sucvc/qsk 7LIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="m1/nry5h"; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a056a00130300b00536ee478380si243784pfu.7.2022.09.20.09.58.23; Tue, 20 Sep 2022 09:58:35 -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=@collabora.com header.s=mail header.b="m1/nry5h"; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbiITQMZ (ORCPT + 99 others); Tue, 20 Sep 2022 12:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbiITQMW (ORCPT ); Tue, 20 Sep 2022 12:12:22 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106FC6BD67; Tue, 20 Sep 2022 09:12:22 -0700 (PDT) Received: from mercury (dyndsl-091-096-056-222.ewe-ip-backbone.de [91.96.56.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id AD73E660036C; Tue, 20 Sep 2022 17:12:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663690340; bh=4pnxuSa/+SQckgAxGLcLTdbVCsMAQVJqmr/cvX1u6IQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m1/nry5hg+gMrp6neyk2AW6Za37ZK5LktEaeIhQQoly6pT0Q/uYxhr1qgyuUnQkt/ uYWe65/RJPiAN3FYfjn9a6f+CEHqAJRmJClV+1ZkVC1J6RZQhF4CVpbGMm1bTmyQD2 VyCdvQzV97qDUEIPJnqwUyy136UVNcCMfnWNhi2zTInsF1A3N9FSho9KDJ8TggT2Zn rxSkWgx6Jop7gewvED1Aerhkdb0WAW1+3M9vzm2JzrrNLwlAdxRuvhUI+6rA6NutZb sdqw2eay3nF07QttAyszuU7MYl47I13kbnj5qh2h/P1j/gxzlOgpqjmqAqBAVG/faJ VXhXH57/sRYng== Received: by mercury (Postfix, from userid 1000) id 9037D10607CF; Tue, 20 Sep 2022 18:12:18 +0200 (CEST) Date: Tue, 20 Sep 2022 18:12:18 +0200 From: Sebastian Reichel To: ChiaEn Wu , broonie@kernel.org, mazziesaccount@gmail.com Cc: pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, jic23@kernel.org, lars@metafoo.de, andriy.shevchenko@linux.intel.com, chiaen_wu@richtek.com, alice_chen@richtek.com, cy_huang@richtek.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, szunichen@gmail.com Subject: Re: [PATCH v11 4/8] lib: add linear range index macro Message-ID: <20220920161218.dkkfvfomrruebahi@mercury.elektranox.org> References: <0418eade65d434a25d304eaa804b34f92318be87.1663254344.git.chiaen_wu@richtek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="l5tnc2jgsehdwtia" Content-Disposition: inline In-Reply-To: <0418eade65d434a25d304eaa804b34f92318be87.1663254344.git.chiaen_wu@richtek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 --l5tnc2jgsehdwtia Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Sep 15, 2022 at 05:47:32PM +0800, ChiaEn Wu wrote: > From: ChiaEn Wu >=20 > Add linear_range_idx macro for declaring the linear_range struct simply. >=20 > Reviewed-by: Matti Vaittinen > Signed-off-by: ChiaEn Wu > --- Thanks, queued via immutable branch: The following changes since commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868: Linux 6.0-rc1 (2022-08-14 15:50:18 -0700) are available in the Git repository at: ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-su= pply.git tags/psy-linear-range-for-v6.1-signed for you to fetch changes up to c2f2e2c3aecdbabf822272a4b6e7d91537633cd9: lib: add linear range index macro (2022-09-16 22:27:19 +0200) ---------------------------------------------------------------- Immutable branch for linear range and power-supply for v6.1 Immutable branch between linear range and power-supply for driver changes in MT6370. Signed-off-by: Sebastian Reichel ---------------------------------------------------------------- ChiaEn Wu (1): lib: add linear range index macro include/linux/linear_range.h | 11 +++++++++++ 1 file changed, 11 insertions(+) -- Sebastian > include/linux/linear_range.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/include/linux/linear_range.h b/include/linux/linear_range.h > index fd3d0b3..2e4f4c3 100644 > --- a/include/linux/linear_range.h > +++ b/include/linux/linear_range.h > @@ -26,6 +26,17 @@ struct linear_range { > unsigned int step; > }; > =20 > +#define LINEAR_RANGE(_min, _min_sel, _max_sel, _step) \ > + { \ > + .min =3D _min, \ > + .min_sel =3D _min_sel, \ > + .max_sel =3D _max_sel, \ > + .step =3D _step, \ > + } > + > +#define LINEAR_RANGE_IDX(_idx, _min, _min_sel, _max_sel, _step) \ > + [_idx] =3D LINEAR_RANGE(_min, _min_sel, _max_sel, _step) > + > unsigned int linear_range_values_in_range(const struct linear_range *r); > unsigned int linear_range_values_in_range_array(const struct linear_rang= e *r, > int ranges); > --=20 > 2.7.4 >=20 --l5tnc2jgsehdwtia Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmMp5mIACgkQ2O7X88g7 +poHHQ/9HvToYVOdeiCOww5XunH69+2ib0YVQCxyUaHB5DouNsW21uhKmKI8C3SM znd+W+uaniZH4HWy1VOTPNYb+bFalIFf6ED4cI1ppBn4l2iUlAYbWzIBc7pk5z7C HdUtqzHPkq5jKuosU38jg/1TBlwnXApBwEuWVRBIwtLKm0y80XBBPUQycr+yqlww l02ngiAIu7bxPM37iYWorHFE3UzhoW250pzaMDANsIwz/A+T8PrGa+Br4r5R13G+ u+ZUtbzTjmx8HkLFV++DQ3lfJRPWgWtQms+nrSr3V6YNh9KpOl35x6TXaLLyUICa JStHqjnzrxDWg9vkKHO8FBh2SA8ERt6m0hsLNnGZofbZqot8VqQXz8jPlPFjLw++ ihupgvK2DCSg7ZesmrG4aE2Bt883pue0OVVK5vj+Kvb1QXlwe1QvovMK9jyEe4pd eS+ItZvrJsBKCRGYXmLO06ZiF7VPIlsm+5atVK1oU4qzmf0i+Q44NH8AneNLsTYO pdurTGwKmdwaUqLyxOZnYB2FqUlE98aFLvv1AIl8U/jB8Gg6iwPf8OVEP/Ot7BRW UJzia8CQTINKArz+E9FJm6mkj7GQAmoszMa19j3Bdj+qpSyN9Anjjhoohtz724Ix c9Gjx2otNjq67/kq0nXvg+X5hi3PiCVDr0q6o8TdaVbseaZP/lk= =StQZ -----END PGP SIGNATURE----- --l5tnc2jgsehdwtia--