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 03861C433EF for ; Fri, 3 Jun 2022 15:03:13 +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=r3vTeEoxpLbaduySSHBGPbLXIGFK5NdEkXw7PB3CqWM=; b=lXfunPfv/ZWg0g 7eo6BvGhuyIGXQabCzSWMTltrRtaH/DdhAfi7I8gEpISvNecsNGivOhFE1Z7YeX+mt3y6duez4pZh EA2k3fJlp/TR0orqQbqrHlkYqa4hWj4pzfHFoEw+JOGvrPpu+P+0kmSerninMcQBo/R2t4bp09TPy 1bQAboaJWvh/PfP0+5g6vqh93Tl0rtnXxPilMPOL3yr8cb7SymrxJwHc49UMkcJKCSWFrW/EYh/kz UVIN4RkQTi6kOmKnhd7xetooeikDCM+cS1gEbsbK9/HBNP6pbKUVjhbd1PAOokPj+4FI+1RvnqTOv fgbJfQ0SgiCFWEBY/NZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nx8o2-007vMO-3I; Fri, 03 Jun 2022 15:01:42 +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 1nx8ny-007vLv-Go for linux-arm-kernel@lists.infradead.org; Fri, 03 Jun 2022 15:01:39 +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 7FDFB61827; Fri, 3 Jun 2022 15:01:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1264FC385A9; Fri, 3 Jun 2022 15:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654268496; bh=P2GX9HtyRXt4RIWOGgfY4NtR2QmjoTRTaFyv7WzjYrY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e+rxoohAU8ECV40mEB9ppea8osoCte3S0eZZDHCiFnnTQ+eBOD59mnjdWlMKIQsiO dssLF5PTV6BjUe7byCLCfoNlFwFxT1x9tIt4CYuDWxoik/UXWRXAFhQov5EawDYpdS pmAXD4Xq6KMlaa6dVxtJi9JxL7TwqymhXdi8sZ0DUUfpMdCpbMWXskdVeS+cK+3iDi SnZ9YDhh6tkcGj4XMwQXAQVcpeeMPJvenII0TdXcldiKBB1MHS/JT8GYbsAn5+9F1j A4A3KhlcXLCy+Y1EELd0KLfiseIrEQzpSgf/YuXeF9e2kd4PTVjdPA2ew1CifF8Rrf Josvx/T1N5mqA== Date: Fri, 3 Jun 2022 16:10:35 +0100 From: Jonathan Cameron To: "m.shams" Cc: , , , , , , , , , , , Subject: Re: [PATCH v2 2/3] iio: adc: exynos-adc: Add support for ADC FSD-HW controller Message-ID: <20220603161035.0f22420b@jic23-huawei> In-Reply-To: <015b01d874ca$69aa8bb0$3cffa310$@samsung.com> References: <20220520145820.67667-1-m.shams@samsung.com> <20220520145820.67667-3-m.shams@samsung.com> <20220522122555.6c65d2b6@jic23-huawei> <015b01d874ca$69aa8bb0$3cffa310$@samsung.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; 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-20220603_080138_687467_48F0D360 X-CRM114-Status: GOOD ( 29.18 ) 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 Tue, 31 May 2022 14:12:46 +0530 "m.shams" wrote: > Hi Jonathan, > > On Fri, 20 May 2022 20:28:19 +0530 > Tamseel Shams wrote: > > >> From: Alim Akhtar > >> > >> Exynos's ADC-FSD-HW has some difference in registers set, number of > >> programmable channels (16 channel) etc. This patch adds support for > >> ADC-FSD-HW controller version. > >> > >> Signed-off-by: Alim Akhtar > >> Signed-off-by: Tamseel Shams > > > > Hi, > > > > One suggestion inline, otherwise LGTM. Plenty of time to tidy this up as > this won't make the upcoming merge window - I'll be queuing it up for 5.20 > > > > Thanks, > > > > Jonathan > > > > Okay, Thanks for reviewing. > > >> --- > >> - Changes since v1 > >> * Addressed Jonathan's comment by using already provided isr handle > >> > >> drivers/iio/adc/exynos_adc.c | 55 > >> ++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 55 insertions(+) > >> > >> diff --git a/drivers/iio/adc/exynos_adc.c > >> b/drivers/iio/adc/exynos_adc.c index cff1ba57fb16..183ae591327a 100644 > >> --- a/drivers/iio/adc/exynos_adc.c > >> +++ b/drivers/iio/adc/exynos_adc.c > >> @@ -55,6 +55,11 @@ > >> #define ADC_V2_INT_ST(x) ((x) + 0x14) > >> #define ADC_V2_VER(x) ((x) + 0x20) > >> > >> +/* ADC_FSD_HW register definitions */ > >> +#define ADC_FSD_DAT(x) ((x) + 0x08) > > > > I mention this below, but these different register sets should be in the > struct exynos_adc_data to avoid the need for an if "compatible" == check on > each use of > them. > > > > Can you clarify on how exactly you want me to add these register sets to > struct exynos_adc_data? > Do you mean just for these registers or other registers too which are > defined in this way only? Any registers addresses that are different for the different chip variants supported by the driver. In cases where the only difference between versions is a register address then define something like #define ADC_FSD_DAT_BASE 0x08 In the structure have a dat_addr = ADC_FSD_DAT_BASE and use dat_addr + x to access. If things are more complex (and I haven't looked closely so that may apply to the example give above, the wrap the different access sequence and register addresses in a callback similar to already done for clear_irq. Jonathan > > > Thanks & Regards, > Tamseel Shams > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel