Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp439424imu; Thu, 8 Nov 2018 23:39:25 -0800 (PST) X-Google-Smtp-Source: AJdET5fCCaBRRwOniDF3J2tXNECBBwPHSrMwnHn4XNuR5/oAYQWjwqldpFCRStoOzwlN/1gzicJE X-Received: by 2002:a65:6295:: with SMTP id f21-v6mr6579866pgv.167.1541749165753; Thu, 08 Nov 2018 23:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541749165; cv=none; d=google.com; s=arc-20160816; b=aay8UoFVRyO7+Ww/tYx36JKD/hE9GfQU0/751Ca+XG9/7jj7MQXguVy6eU8hXvWEI3 LBf0NsBNFGG7oYHAjtapIFzKnjI6KedY0r1r+Y/13zdm0wwX7CovBw1IQ2fN2OCB/P4b WnzvPUEL+XA9bqYxZ8KqbcLswaicNJOoJ6SsgqkG36fscaNGaVMgt4OHe90xOMSuPaBa sk5sJoQC/6NgyjQMIv80TLl7ouqjEdsJWuraxY7PYKwWXvvgOqGDPJ1OC13AlHnKmXGO RYBmf9Y1Sv1A1PtlFGl4TOPIVfWj42UTJCD2E/ZBTFZ3FOozLTFnOTf7Gsms6mn4RFK8 3JGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4+PAvBAE61dVOxvVN8/bfDlsvUQtrCUyU7kVnOn+CtI=; b=shr37PKG2hut0V7nLSkm9jiJSwkN+pGXJee5tnK+NkIGWVzwYsl5AP6UVYdMEedAhI QVG5uIQbVaipDROIWCedSehRrin/Zmvh/tmb4rSsPbZxuTUi43saTa/AoEv4dEcr1q7X nRKmou3LjaNjzAcZl5VqBWbPfXVBBLvaTOVvWNyaATS2s8TalSewib2Z9S9QYNUu7kmB 7yZuyokPqlooZQXqmHnsvNPK0bSd5ZW8nrg+fUnMvrMsfzH4B6bH3+DKlWcNVGDQO6iN zV2wJVBDpWp9KXEBkFUuFadNWJVHc2OtgfhCcWjGUXH+tSpfNPtfWAn1s2h/aY8EN01W f2EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=btTzOVlB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30-v6si7273848pla.56.2018.11.08.23.39.10; Thu, 08 Nov 2018 23:39:25 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=btTzOVlB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728230AbeKIRQq (ORCPT + 99 others); Fri, 9 Nov 2018 12:16:46 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39371 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727789AbeKIRQq (ORCPT ); Fri, 9 Nov 2018 12:16:46 -0500 Received: by mail-pf1-f195.google.com with SMTP id n11-v6so550055pfb.6; Thu, 08 Nov 2018 23:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4+PAvBAE61dVOxvVN8/bfDlsvUQtrCUyU7kVnOn+CtI=; b=btTzOVlB6dWnEac6xl4QIMsbbuXtkwLsUBtSl0JGCToezCRNRI5zEAkM7SCU9Big0+ t5m6EudaRN/6jil11sVMp0nWTKwnnoQWmSi3NdmTQtHvMzOjC+U55PXF7S8yMBimCvnv bhtFagK6+wdHWf9EfKuysu43fy3xLhX9UsbYw6ofxD7aCMUg0cyavjadeTIqd3aQWOcj jpBgjwCvFX3uSB6o3qzYEQSxJgP7uXUx//765+JOTpdr9flKsPL6++G2EDoTJPknuW8D sZc3tzA7qUvA68f29Kg/NAWPPlXEcFA4GU+q/DdgyNP3cLBq1e8nvBOliy4RpeVQjdMe PAcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4+PAvBAE61dVOxvVN8/bfDlsvUQtrCUyU7kVnOn+CtI=; b=ESctIyOrDN4cATI0w382Dd9WZGwBkgndqUo25N0wS87ROy51IUk12ZSahOsBy8jZ5+ 36nklyxNNAoAURkztMnIeZbNseTDK0vWrZROKJDWrxCAJhysByLeov+HyPng4hWfs3/K 1gIKDc8ePatp0pRIdglMTXqgx5Et9sajSsVJCW+ihQuaqpyqL9xU7WH7rGk+Qeulat8D Ji6GQJIDY7vdkfcY7tesULP3ftoPVkfH+AjkgC00QKx3koKyg1zp/OSfDbsuywARiyg1 RCyWmxK9itInWbjvBxEZfV6akC4Nddt7qdUbhKEQVi2mDPYn56QqDifsytqTLu1SEt/F LWpQ== X-Gm-Message-State: AGRZ1gKEZolSDTxlTLP+byJKDrp/O7yc56+GyvBhV4Na4VTFNyrMlx9A 6pn0fxLyizfzXeHVpQLkdkw= X-Received: by 2002:a63:6302:: with SMTP id x2mr6503038pgb.183.1541749046936; Thu, 08 Nov 2018 23:37:26 -0800 (PST) Received: from nishad ([106.210.186.71]) by smtp.gmail.com with ESMTPSA id w2-v6sm6714112pfn.89.2018.11.08.23.37.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 23:37:26 -0800 (PST) Date: Fri, 9 Nov 2018 13:07:18 +0530 From: Nishad Kamdar To: Lars-Peter Clausen Cc: Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/4] staging: iio: ad7816: Set RD/WR pin and CONVST pin as outputs. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The RD/WR pin and CONVST pin are logical inputs to the AD78xx chip as per the datasheet. Hence convert them to outputs. Signed-off-by: Nishad Kamdar --- drivers/staging/iio/adc/ad7816.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c index 3cda5cd09365..a2fead85cd46 100644 --- a/drivers/staging/iio/adc/ad7816.c +++ b/drivers/staging/iio/adc/ad7816.c @@ -369,14 +369,15 @@ static int ad7816_probe(struct spi_device *spi_dev) chip->oti_data[i] = 203; chip->id = spi_get_device_id(spi_dev)->driver_data; - chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); + chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_OUT_HIGH); if (IS_ERR(chip->rdwr_pin)) { ret = PTR_ERR(chip->rdwr_pin); dev_err(&spi_dev->dev, "Failed to request rdwr GPIO: %d\n", ret); return ret; } - chip->convert_pin = devm_gpiod_get(&spi_dev->dev, "convert", GPIOD_IN); + chip->convert_pin = devm_gpiod_get(&spi_dev->dev, "convert", + GPIOD_OUT_HIGH); if (IS_ERR(chip->convert_pin)) { ret = PTR_ERR(chip->convert_pin); dev_err(&spi_dev->dev, "Failed to request convert GPIO: %d\n", -- 2.17.1