Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1720139ybi; Thu, 20 Jun 2019 02:35:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVHakiILSC5XuutP/LeAT8/7d+OKR4ahNH/s6BfsOUtCqqkPYgGAT+Ip2+byZZ78aPrduy X-Received: by 2002:a17:90a:36a9:: with SMTP id t38mr2140608pjb.19.1561023345066; Thu, 20 Jun 2019 02:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561023345; cv=none; d=google.com; s=arc-20160816; b=gBli8myslkX7GbX5eC12ZHuei+59KBRnaU5A9pCx3Ouy/U86zaswZ4CtiuG6YeJ5xD N1N3UFmqqtsYSqNLF+n7ltg6gT9BTfw/v/RjFcJADFHdnWNXFfMXY9zLQVNIM7wGTCdx JbxydIQs9NA8zs6xjmFGCFayeO0zA4JhnbQlVb1iOAKeQbxS83+3QXZdOfZItSnIPFMD 7U6KqcQ5Vj/uDhUCroahdH2Kmp+d+jWR0tSE35EBKkHv44FA9cNLVlGWhG0XO82tXR5Z yJYs5rY1pS99VHxXhai0+2W0NpDtpMLcagchNAXIQMu1/at2tKB0ZF6/Ne3KBPMJ9FyD 335w== 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=xfsTXSpzqEy8IgE6I+HD+tNdvaRRsZD42hCu3MacPbfwObYi+6Zb3AezuK63xdPSTy gvEQs0cIY4LPxqRN5lBtS1+4lrlhfWru/vnr+0VJ0CCsJjr6L5j0oGvlwE2cVKqagnz0 9kxynkNMGxdPl7Eh/2SmnAyPhqrHrCdgnPmRFNk84lOGc4lmTCwWFXIPZypKneEkxAna Ey2twt+W+GZMy6L7qbxe0EAcwYhx995KtOZiTX6EAmJts6DxCUhiilE15jYGvVk+y9eO 2SEEDlg/5wWPKNnfKhnFDHeRfEsuHThOC0ALF2DXXqZO4Fkd1EaZgGqC7DYKA+EzN82q 3+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-onmicrosoft-com header.b=SZk8M3Qw; 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 x123si19048699pfx.157.2019.06.20.02.35.28; Thu, 20 Jun 2019 02:35:45 -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=SZk8M3Qw; 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 S1726404AbfFTJfY (ORCPT + 99 others); Thu, 20 Jun 2019 05:35:24 -0400 Received: from mail-eopbgr770071.outbound.protection.outlook.com ([40.107.77.71]:9094 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725925AbfFTJfX (ORCPT ); Thu, 20 Jun 2019 05:35:23 -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=SZk8M3QwB/vXX00qWoqk5iX2bUQdTl06qIpitoezhJIr3hlbhNpjTG0USrVGNpofM9XioGaYU+FaDF70BWpX1HJScXVFGvuK3Gwm/kIowovisCjrJs2d6r6QfLUGsLfh5JdbCxQ2K1Dzh4NitPfnCGXSdl1Y0kDXVExWxKDvQAg= Received: from BL0PR03CA0008.namprd03.prod.outlook.com (2603:10b6:208:2d::21) by MWHPR03MB3136.namprd03.prod.outlook.com (2603:10b6:301:3c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.13; Thu, 20 Jun 2019 09:35:20 +0000 Received: from SN1NAM02FT040.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::205) by BL0PR03CA0008.outlook.office365.com (2603:10b6:208:2d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14 via Frontend Transport; Thu, 20 Jun 2019 09:35:20 +0000 Authentication-Results: spf=pass (sender IP is 137.71.25.57) 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.57 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.57; helo=nwd2mta2.analog.com; Received: from nwd2mta2.analog.com (137.71.25.57) by SN1NAM02FT040.mail.protection.outlook.com (10.152.72.195) 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:35:19 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id x5K9ZI0m011368 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 20 Jun 2019 02:35:18 -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:35:17 -0400 From: Mircea Caprioru To: CC: , , , , , , , , Mircea Caprioru Subject: [RESEND PATCH 1/4] iio: adc: ad7124: Remove input number limitation Date: Thu, 20 Jun 2019 12:34:49 +0300 Message-ID: <20190620093452.12891-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.57;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(376002)(39860400002)(136003)(396003)(2980300002)(37524003)(199004)(189003)(50466002)(70206006)(356004)(5660300002)(186003)(478600001)(47776003)(246002)(7696005)(16586007)(77096007)(1076003)(316002)(2351001)(336012)(8936002)(48376002)(26005)(4326008)(486006)(44832011)(126002)(2906002)(6666004)(51416003)(476003)(426003)(107886003)(54906003)(50226002)(106002)(86362001)(6916009)(305945005)(36756003)(70586007)(72206003)(2616005)(7636002)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR03MB3136;H:nwd2mta2.analog.com;FPR:;SPF:Pass;LANG:en;PTR:nwd2mail11.analog.com;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d04fc1e7-2ec0-478e-ef7e-08d6f5629c36 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(4709080)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:MWHPR03MB3136; X-MS-TrafficTypeDiagnostic: MWHPR03MB3136: 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: xs/+cMWSsbRBHi+CvljPkJPq5iybrBKOomRIUiV7x8b9DCREi/TlJSIFSP4MpkmYJkKzVlb0A0KoxvV/bQeG97qqPUZvrqG858Mqnw03iTCbmFMBhexWiSoomQE6sj+ZBurZixDAIq6/17efa4ADv471l5FEWKpJ+QjYj2zqUuGtpqSwg4Ra8r7DL0ATpRcLZ74rasKos/yUk2lxzA9kyCy4SwuvVpktnynWnyC32vrnEZQygPh2C/+Ajkqei6JeiPW0KFIOPrCluauWFOnr0NTgAqpaWf19BeRV4QpupgnnUy0Nm0yG6jSPLzZMpTtWIWTKnPZyQNC2h30ADDC5gOS+vFlTuq9A3tR6W54CC7cd38waH6FFWiBwfop1Oax+oEiOzmLDKb6OpW/JfM5JADXYhoS14EHCb6iKlocRpZg= X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2019 09:35:19.2627 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d04fc1e7-2ec0-478e-ef7e-08d6f5629c36 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.57];Helo=[nwd2mta2.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB3136 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