From patchwork Fri Nov 9 07:37:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishad Kamdar X-Patchwork-Id: 10675415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2360414BD for ; Fri, 9 Nov 2018 07:37:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DB202E6D9 for ; Fri, 9 Nov 2018 07:37:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 012252E6F7; Fri, 9 Nov 2018 07:37:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3E362E6D9 for ; Fri, 9 Nov 2018 07:37:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728022AbeKIRQq (ORCPT ); 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-Google-Smtp-Source: AJdET5e4847IyrQCzTDChObQDm1w48qorPNr35gunbuxYlpp5GRrkwn4fZ4QSMkCkpF3d8dJEutnag== 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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",