Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1706792ybi; Thu, 20 Jun 2019 02:20:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbwofJ/4PEbgg72S3xIwY5LlcVyqxc2WcN5xmy8pYU/3TKH2JWmYsHqfaQLRE6y2sJa5/6 X-Received: by 2002:a62:764d:: with SMTP id r74mr109152629pfc.110.1561022448886; Thu, 20 Jun 2019 02:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561022448; cv=none; d=google.com; s=arc-20160816; b=Ma18CIcaIRI7qfQDp0L5Vasq1WuqHCj85UlwIuqlSGmYszfwkrcqDx9DI0rP5eA8b2 ozOIOab7Z+XCvfVBJMC9HYlAOdb86vSHLBj/PIdJT/eVb2frNtQIFmae8v6xbLToNrCd I9xFovILbgCfAiWQlfQV9st/a7Kz5vWRjJPA9WDueoY+nrkUkWMmUy/ah1qoQQbz0icU ietzeUOQTveYyYK+UKQFrZOhdjFS9sWDtYu0p6ii+XE3WCvidDYZedJtxeJCt7djj9ij n6WAM5KgMQEQ7qVjf0MACnhBFBdPxooSGSWN155/zzrUIz1IkE6kgtgMXHSZN6SAMAK6 Al2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=O0PVaOH+gsirioJtKnMwB8zuZ8zQabuEKQHuNYKFLpU=; b=Ppw+cy8CXGQFyScFTdE39GCHOXJuoMx23/xNDGP2gsR4t87cLXGbyYZoLqUHR7gAOb S9h/SXpIGYl8AsinSjd3XLe21pbG02Fd7q+HDcburprtNDjWa6yLBD7cdt2jgoQRVjTn ae2ruwB7ZyMcWX14r7VFFO5cmZpTVGhKY+mbdBHR+zY0TO+B4dRXSHjJcevyr4iXQV8h Yt4KGXXSDLMlB+Qtbhk0peqHZuhXBrz9FKh3Sm7yrd8kZ76UjYhUsR0ZNxoX5gmFp6cA En3+eSIBWKcqkY/X/h19sCIL2aBtPEecnyOUeBIS4ARycH7ZZt5UcgGRaXlpv2+lzWvG nGgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-onmicrosoft-com header.b=DdPRlZfy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si17260907pll.417.2019.06.20.02.20.33; Thu, 20 Jun 2019 02:20:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-onmicrosoft-com header.b=DdPRlZfy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbfFTJTg (ORCPT + 99 others); Thu, 20 Jun 2019 05:19:36 -0400 Received: from mail-eopbgr790089.outbound.protection.outlook.com ([40.107.79.89]:6932 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725875AbfFTJTg (ORCPT ); Thu, 20 Jun 2019 05:19:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.onmicrosoft.com; s=selector1-analog-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O0PVaOH+gsirioJtKnMwB8zuZ8zQabuEKQHuNYKFLpU=; b=DdPRlZfybLLzn5oPFsWW7+abuMLEoWJjez+gLBAoGy86sqvVUfWLHFcO8lXd97RJidbrQ2JPdSitWOYz7zwuckuFMFVjGJ9SeMSzu4POLqMI4vudU82nmqwkt0wI85TtQEfaHt0sVCJcQZlRNSdfORRTslAjAfYSUm5iwQfW7mE= Received: from DM6PR03CA0016.namprd03.prod.outlook.com (2603:10b6:5:40::29) by BL2PR03MB545.namprd03.prod.outlook.com (2a01:111:e400:c23::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.15; Thu, 20 Jun 2019 09:19:33 +0000 Received: from BL2NAM02FT033.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::200) by DM6PR03CA0016.outlook.office365.com (2603:10b6:5:40::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.12 via Frontend Transport; Thu, 20 Jun 2019 09:19:33 +0000 Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=analog.com; metafoo.de; dkim=none (message not signed) header.d=none;metafoo.de; dmarc=bestguesspass action=none header.from=analog.com; Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.55 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.55; helo=nwd2mta1.analog.com; Received: from nwd2mta1.analog.com (137.71.25.55) by BL2NAM02FT033.mail.protection.outlook.com (10.152.77.163) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1987.11 via Frontend Transport; Thu, 20 Jun 2019 09:19:30 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id x5K9JTJP023127 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 20 Jun 2019 02:19:29 -0700 Received: from mircea-Latitude-E6540.ad.analog.com (10.48.65.115) by NWD2HUBCAS7.ad.analog.com (10.64.69.107) with Microsoft SMTP Server id 14.3.408.0; Thu, 20 Jun 2019 05:19:28 -0400 From: Mircea Caprioru To: CC: , , , , , , Mircea Caprioru Subject: [PATCH 1/4] iio: adc: ad7124: Remove input number limitation Date: Thu, 20 Jun 2019 12:19:05 +0300 Message-ID: <20190620091908.12041-1-mircea.caprioru@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRoutedOnPrem: True X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.55;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(39860400002)(376002)(396003)(346002)(2980300002)(37524003)(199004)(189003)(186003)(51416003)(7696005)(356004)(6666004)(86362001)(107886003)(2906002)(54906003)(2351001)(316002)(16586007)(70586007)(36756003)(70206006)(106002)(77096007)(305945005)(7636002)(26005)(1076003)(8676002)(47776003)(5660300002)(8936002)(6916009)(246002)(2616005)(486006)(126002)(476003)(44832011)(426003)(336012)(478600001)(50226002)(50466002)(4326008)(72206003)(48376002);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2PR03MB545;H:nwd2mta1.analog.com;FPR:;SPF:Pass;LANG:en;PTR:nwd2mail10.analog.com;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59fbc025-4868-4482-cbbe-08d6f56067a1 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(4709080)(1401327)(2017052603328);SRVR:BL2PR03MB545; X-MS-TrafficTypeDiagnostic: BL2PR03MB545: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0074BBE012 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: TO0++dZOhFwhu+ItEA7cJiNemOcxHEdpMxRqB5srBZ4LP2SQNHvzrurbO9M2lRYHewIPhr7B9HYe3e4CfW4UeNEIxX3cRo9asNfglSe+SfWJg01elQOxSVGxELr/gE6dDcTEpq6dHjV26MZzxoa01dHsoHioegrJcIStK5o4gMHzWSeT7Ha46kz1EM1o7myZL/FBdh1+Q/gVVCB4xoYwTQy9AQFgzQh6RSq0N6PK24iRTzZ0ZWV7Vnh1mgvEe8qqx37vbSVGsQKqALga+saU61dvkKfoZphWZ6elbdAenZkhFZXbuyATy9soeivHqWJqQd8rsVWn5AVV6wzDBgCNAzXLWpQAcb0ikrKxAdqLbCMlVPlsT3iRAXhjsl/RceqdsEvkv/pzjRyIVNGPQsZBCdDaORH/WrC5YfYq8XeX8sE= X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2019 09:19:30.5236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59fbc025-4868-4482-cbbe-08d6f56067a1 X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB545 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 = -- 2.17.1