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 0C9FB2E3FB for ; Mon, 19 Feb 2024 11:58:26 +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=1708343908; cv=none; b=O22zD42sBOnarg1DetMZvFtg679MF9oH88exfpWez/IAluybWlH0wi1YDV0WptFThZZ5ueC8JBKY5gJ4OO8mRGS0xxOZTAYrqi9t9H01i4tLayax8cvQoMiWv4zJB9ZBh0NtZpqZ5pTBinYTEIVG3eUvKSowxyW7s3u1vczR07E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708343908; c=relaxed/simple; bh=XEN6t5N6DsrqG+x8bSqtGz4pn2cltJJS0G3tLaD65kY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LxteokEwtnTodcmoiI5wtvHN8WyNpX1PdvgmSWBVUOvtnz6GGcPuoyvsb/vZq3gSdtyrXAYUVNCdQGgJ3cBFVAk0Q1mbv678SHD+vbTVH0DW59b6mb9F9zN2SuCUVfFW/mF5aYU35D6qbXYxqO4ot3bhUAEfwnWVJaq9hDZOtRA= 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=hV3MAn3C; 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="hV3MAn3C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708343907; x=1739879907; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=XEN6t5N6DsrqG+x8bSqtGz4pn2cltJJS0G3tLaD65kY=; b=hV3MAn3C/KSTpqBazSe9qQYc1ZD4VSZPZ5iSCsBZePWag/qlidzr9Sau h9oLZ9TaK3FHNK2x0OFJOASk9BJeH3o417Pf3GZOz0QWa6UzkLgorKyOx k7UPjP5sSNzAYNILpH5ip0TBT+6GzhjOuJtR7W++eY1/wgSIfI+4KBmjM b2pUAKYSIdRaiCWGMZ5sNrG3YzNZfcPT0iSl45S706CyyhzAtcO/PplSP SPI/UW8l8qYu/UBFnluRKgvtAXKZ8lt8/jajoPOFUuyK4yCbAf5jzup26 hgvpVmddvz/CoEo8yUxhTEuMc7wyXoM0vDRT8EGQKg6mfQv+pl2lGZXuq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="19951174" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="19951174" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 03:58:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="912862933" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="912862933" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 03:58:23 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rc2Hs-00000005oSd-46ON; Mon, 19 Feb 2024 13:58:20 +0200 Date: Mon, 19 Feb 2024 13:58:20 +0200 From: Andy Shevchenko To: Jonathan Cameron Cc: linux-iio@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , Nuno =?iso-8859-1?Q?S=E1?= , Alisa-Dariana Roman , Haibo Chen , Sean Nyekjaer , Andreas Klinger , Jonathan Cameron Subject: Re: [PATCH 3/8] iio: adc: ad7124: Switch from of specific to fwnode based property handling Message-ID: References: <20240218172731.1023367-1-jic23@kernel.org> <20240218172731.1023367-4-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@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: <20240218172731.1023367-4-jic23@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Sun, Feb 18, 2024 at 05:27:26PM +0000, Jonathan Cameron wrote: > From: Jonathan Cameron > > Using the generic firmware data access functions from property.h > provides a number of advantages: > 1) Works with different firmware types. > 2) Doesn't provide a 'bad' example for new IIO drivers. > 3) Lets us use the new _scoped() loops with automatic reference count > cleanup for fwnode_handle Similar remarks as per other patch series... ... > struct ad7124_state *st = iio_priv(indio_dev); > struct ad7124_channel_config *cfg; > struct ad7124_channel *channels; > - struct device_node *child; > struct iio_chan_spec *chan; > unsigned int ain[2], channel = 0, tmp; Shouldn't ain be u32? > int ret; ... > + ret = fwnode_property_read_u32_array(child, "diff-channels", > + ain, 2); ARRAY_SIZE() -- With Best Regards, Andy Shevchenko