From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D410C54EBC for ; Sun, 8 Jan 2023 12:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z3PNCAC+sIzRQMnXlZ7djkDu5Jt0QhqQG+9ugBDwl2M=; b=RRPUFV6neVjS6O RTO0AxszNe6jTXJetC6cilIayrbdQDPgtPfBOtuY2CLMT7aBxz+rS00QhBaFoMxSuZSmqOJC0s2hn mn6zBb2A4u825hg8Z5kSdat8mzAgIiGiMSqNUG3WWMzlXqK1ahpzefmzjnXALF/+fl7N7GB0IPDao Npds/m4fZTihKmK+24Ex83viQKOXNA0MDApPazzkuqvKPiVw01rX+gr4+pgzkTFawqj0Sl0GEVUl3 QXjEunnE3J1OvJU7SyhoqKm2MWI0HUhTOiLCtfnsyjFFwshqkwF5H9lXDd8Ly3Nw4/hILqXuO8ztT CWr9zK4T7bQgtxa7kcyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEVFT-00DoCX-Tn; Sun, 08 Jan 2023 12:58:04 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEVFQ-00DoBz-Dd for linux-arm-kernel@lists.infradead.org; Sun, 08 Jan 2023 12:58:01 +0000 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 A7B4160C63; Sun, 8 Jan 2023 12:57:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FD94C433EF; Sun, 8 Jan 2023 12:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673182679; bh=TxvREl6UDYmnCeKmIm1J8t4vc0IFfK/snhTTrx3rGQY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=V/nkC+C0lUnI/amaOQ28+jUx+I3BND94oxh4UPQ8py0HazQ/K/8fmSSHAHMztjwkI gTC0BkeJZR+z4BOjhA59pq9GHSTdwt9bSIeab/9Jfh46mSEEWHemGZ/c3sR06VUnLh bHBcmmPbth21RZ+lZI7Kbn1HDHlesu3/qyOcuLbUkUVYH9rsOGEDgMxAhMHL71jibe QLmzOXUTu9wFy1hKOXd82TSAV7mBrd5L606wluM6knLwmNHFe+CKR9frYOomM50yQN MqFOdo9UBWd1iQhsB8mUdiNhw5bZsCddgSEkjKE3Q40VDASLZM2JiD8cljWfvYoiHr ZS5mAlJZjYyQA== Date: Sun, 8 Jan 2023 13:11:26 +0000 From: Jonathan Cameron To: Olivier Moysan Cc: Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , , , , Subject: Re: [PATCH v2] iio: adc: stm32-dfsdm: add id registers support Message-ID: <20230108131126.39e15757@jic23-huawei> In-Reply-To: <20230105125331.328275-1-olivier.moysan@foss.st.com> References: <20230105125331.328275-1-olivier.moysan@foss.st.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230108_045800_531451_4A939DA0 X-CRM114-Status: GOOD ( 18.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 5 Jan 2023 13:53:30 +0100 Olivier Moysan wrote: > Add support of identification registers to STM32 DFSDM > to allow hardware capabilities discovery and configuration check. > The number of filters and channels, are read from registers, > when they are available. > > Signed-off-by: Olivier Moysan One minor thing inline. I'll tweak it whilst applying. Applied with that tweak to the togreg branch of iio.git and pushed out as testing for 0-day etc to look at it. Thanks, Jonathan > --- > Changes in v2: > - Add and update comments > - Remove useless masks > diff --git a/drivers/iio/adc/stm32-dfsdm.h b/drivers/iio/adc/stm32-dfsdm.h > index 4afc1f528b78..b64cfb42c549 100644 > --- a/drivers/iio/adc/stm32-dfsdm.h > +++ b/drivers/iio/adc/stm32-dfsdm.h > @@ -13,25 +13,29 @@ ... > /* > @@ -231,6 +235,28 @@ > #define DFSDM_AWCFR_AWHTF_MASK GENMASK(15, 8) > #define DFSDM_AWCFR_AWHTF(v) FIELD_PREP(DFSDM_AWCFR_AWHTF_MASK, v) > > +/* > + * Identification register definitions > + */ > +#define DFSDM_HWCFGR 0x7F0 > +#define DFSDM_VERR 0x7F4 > +#define DFSDM_IPIDR 0x7F8 > +#define DFSDM_SIDR 0x7FC > + > +/* HWCFGR: Hardware configuration register */ > +#define DFSDM_HWCFGR_NBT_SHIFT 0 The _SHIFT macros don't add anything useful over using the _MASK ones directly. So drop them. > +#define DFSDM_HWCFGR_NBT_MASK GENMASK(7, 0) > +#define DFSDM_HWCFGR_NBF_SHIFT 8 > +#define DFSDM_HWCFGR_NBF_MASK GENMASK(15, 8) > + > +/* VERR: Version register */ > +#define DFSDM_VERR_MINREV_SHIFT 0 > +#define DFSDM_VERR_MINREV_MASK GENMASK(3, 0) > +#define DFSDM_VERR_MAJREV_SHIFT 4 > +#define DFSDM_VERR_MAJREV_MASK GENMASK(7, 4) > + > +#define STM32MP15_IPIDR_NUMBER 0x00110031 > + > /* DFSDM filter order */ > enum stm32_dfsdm_sinc_order { > DFSDM_FASTSINC_ORDER, /* FastSinc filter type */ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel