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 X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CAF2C48BD6 for ; Wed, 26 Jun 2019 19:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0055321726 for ; Wed, 26 Jun 2019 19:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561576963; bh=VtNAJvPAlN7MdrrgP7iDPLLlHySWmZPh02eLT8C8OTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=VlohT8+zes3rP5YBHAAs/n3fzsMjW04e3dHRq7+eeP4S6/t1iJ9toUR7sJBfdgFHO vZbwUmP771/XNdfVNkagoV8/GKBMLUHZExiUDuHaLKZQzlG37jZ5Pl4WJwAePT5ReD srgultMxAP+4O9THLpdw6EQR+7fXuokucQ6QQtxw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbfFZTWl (ORCPT ); Wed, 26 Jun 2019 15:22:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:50720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbfFZTWk (ORCPT ); Wed, 26 Jun 2019 15:22:40 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB0AB20663; Wed, 26 Jun 2019 19:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561576959; bh=VtNAJvPAlN7MdrrgP7iDPLLlHySWmZPh02eLT8C8OTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=x8YmlYDE47jCCCq0hOxKbUZmUuPD58o4abgh3o9iA4aP25U9NrIjpFUKom/d5om8I FXOrzZZtoucm5hyJF86iFs4b/vcijipZYFkM34wLkQEoBgj9rD31MKgOH6tC1tvX9z nkKAzDyAE7kFAeZD5XpTLPIXeSPqOdgp89H/ZtEc= Date: Wed, 26 Jun 2019 20:22:34 +0100 From: Jonathan Cameron To: Mircea Caprioru Cc: , , , , , , , Subject: Re: [PATCH V4 1/5] iio: adc: ad7124: Remove input number limitation Message-ID: <20190626202234.7c4cd0da@archlinux> In-Reply-To: <20190625081128.22190-1-mircea.caprioru@analog.com> References: <20190625081128.22190-1-mircea.caprioru@analog.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Jun 2019 11:11:24 +0300 Mircea Caprioru wrote: > The driver limits the user to use only 4/8 differential inputs, but this > device has the option to use pseudo-differential channels. This will > increase the number of channels to be equal with the number of inputs so 8 > channels for ad7124-4 and 16 for ad7124-8. > > This patch removes the check between channel nodes and num_inputs value. > > Signed-off-by: Mircea Caprioru Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > > Changelog v2: > - nothing changed here > > Changelog v3: > - nothing changed here > > Changelog v4: > - nothing changed here > > drivers/iio/adc/ad7124.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c > index 659ef37d5fe8..810234db9c0d 100644 > --- a/drivers/iio/adc/ad7124.c > +++ b/drivers/iio/adc/ad7124.c > @@ -462,13 +462,6 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev, > if (ret) > goto err; > > - if (ain[0] >= st->chip_info->num_inputs || > - ain[1] >= st->chip_info->num_inputs) { > - dev_err(indio_dev->dev.parent, > - "Input pin number out of range.\n"); > - ret = -EINVAL; > - goto err; > - } > st->channel_config[channel].ain = AD7124_CHANNEL_AINP(ain[0]) | > AD7124_CHANNEL_AINM(ain[1]); > st->channel_config[channel].bipolar =