From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 A91A6136E37; Mon, 24 Mar 2025 10:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742811319; cv=none; b=OwOUcjYknJges6/6tM8uF2rnNH0RNv/uu466kq68ba3EPrc3g2UPwzFNfnLCbZ+a7+2/5d/jMlOcrzJrqCePeoBYSy+vn1xowTj3XWwqXdlOBxQ0AQD78R/sXitMpe5njWXPQ4EqvDM5a4HK1RghgRiofH0FwICV/kcm+GfUsJ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742811319; c=relaxed/simple; bh=ckL2H71VGJcEqW4jJr2q5w5tI/8gthiDoGYY1li3Srk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nSnYoYaiYsz7T4ICiD8SKJ5/kEwe8esPvkldnFnygF6ryoIqa+YqCwFOk1BQY0RkV5NT8GJajYpWz5DlCsBRUYJdxUxNeyO6PW59f1Fgc2WYznf84cIAAKazvE2Zi7ICTetmXEEi7a/50z8vKtTLYjOiivfeluJ7vTstRdrN8uo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Sa7nEvF6; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Sa7nEvF6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742811318; x=1774347318; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ckL2H71VGJcEqW4jJr2q5w5tI/8gthiDoGYY1li3Srk=; b=Sa7nEvF6NHOPIlg4gvU18dBDfyyXW/mb5N8yZxBsaRs36AuSTj+EVqlb rii8HkrHII+E5kddxAZ6OpfKFrIDtKRP80aSkHZMeMbitGui8aFVM6LtX PtpWb2PDgOBAsTXAcIgn+pvwVchMgzxTbEmzBjoFf1RPRz+MuYG9EtNg7 K747KxSgDmMcGygGllNQT33MjZqylGDNsw6YGeZ+HOzVjUPzJO2UlfOr9 KOnRSV3hilECUa4MJg+RSCCvbf4kMVkclrkbCOs3By+eIGulD9jBfdO+5 gs9feyDQ6rTIFQYvSQxYQh9batT/qiOlpjPRAFL3umvFP8y6JCE4Jmn9U w==; X-CSE-ConnectionGUID: sa2Q5AJJR2KIyWLFy+kXDg== X-CSE-MsgGUID: xjLQ0toCRiKqje0F/3GsRQ== X-IronPort-AV: E=McAfee;i="6700,10204,11382"; a="61532046" X-IronPort-AV: E=Sophos;i="6.14,271,1736841600"; d="scan'208";a="61532046" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2025 03:15:17 -0700 X-CSE-ConnectionGUID: 9d3orBLpQuS3/6S3NDh1tw== X-CSE-MsgGUID: GlQDv/8rQ42UHk+SyTtocg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,271,1736841600"; d="scan'208";a="155021334" Received: from smile.fi.intel.com ([10.237.72.58]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2025 03:15:11 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1twepo-00000005JFU-24ey; Mon, 24 Mar 2025 12:15:08 +0200 Date: Mon, 24 Mar 2025 12:15:08 +0200 From: Andy Shevchenko To: Pop Ioan Daniel Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nuno Sa , Olivier Moysan , David Lechner , Javier Carrasco , Guillaume Stols , Trevor Gamblin , Dumitru Ceclan , Matteo Martelli , =?iso-8859-1?Q?Jo=E3o_Paulo_Gon=E7alves?= , Alisa-Dariana Roman , Marcelo Schmitt , Herve Codina , Ramona Alexandra Nechita , Dragos Bogdan , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] iio: adc: adi-axi-adc: add set decimation rate Message-ID: References: <20250324090813.2775011-1-pop.ioan-daniel@analog.com> <20250324090813.2775011-3-pop.ioan-daniel@analog.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250324090813.2775011-3-pop.ioan-daniel@analog.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Mon, Mar 24, 2025 at 11:07:57AM +0200, Pop Ioan Daniel wrote: > Add support for setting decimation rate. > > Add separate compatible string for the custom AD7405 IP and implement > the necessary changes. ... > +static int axi_adc_set_dec_rate(struct iio_backend *back, > + unsigned int rate) > +{ > + struct adi_axi_adc_state *st = iio_backend_get_priv(back); > + > + return regmap_update_bits(st->regmap, (ADI_AXI_ADC_REG_CHAN_USR_CTRL_2), What' the purpose of the parentheses, please? > + ADI_AXI_ADC_DEC_RATE_MASK, > + FIELD_PREP(ADI_AXI_ADC_DEC_RATE_MASK, rate)); > +} ... > /* Match table for of_platform binding */ > static const struct of_device_id adi_axi_adc_of_match[] = { > { .compatible = "adi,axi-adc-10.0.a", .data = &adc_generic }, > { .compatible = "adi,axi-ad7606x", .data = &adc_ad7606 }, > + { .compatible = "adi,axi-ad7405", .data = &adi_axi_ad7405}, You really need to be as much as possible consistent with the style in the current code. > { /* end of list */ } > }; -- With Best Regards, Andy Shevchenko