Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1603010imm; Thu, 18 Oct 2018 00:41:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV62WlQlysotMzjOh+/v0vK4GaR9gZkxX8ticvufL1wz7YOajQHOE1E2sPPQcscMN7QDVAMlm X-Received: by 2002:a63:df03:: with SMTP id u3-v6mr8649805pgg.362.1539848492178; Thu, 18 Oct 2018 00:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539848492; cv=none; d=google.com; s=arc-20160816; b=tRprob0mj7DOmDtYUpV9/rcZV5JH4kDR8eTpJDdz8L7uUS/Cj+/7mdhDDsartz67XL nnRFZt5qckwP9MdOxlqXEo8Y3wdCHcasEcEnVcS7fjaUbu1JFSeyT6SY7bXkndP1Nhx5 eDFvCdJ+BsPnO26r2Z3xNmRjU3eeFa0HLmdvD1+WLFD+kqnJ1BBaYFaGoaWk+51FyZE0 F8XA8QpCfOAhrGx7/bnbtNPUJGvev79AhwWK1DsBh+X83tD9Pu2BoXio/y6tvsRtDpTv iKHBZD/MzA12+ssqF9efMD6GBci9FZTYKTq8+V5IEyqVP8rv4U7F2r6+L6KR2oiMLpbn Mfxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=G7tls1vMtOowlCtXjwDKGc1+LLoQ3769F5wAFJXEVKE=; b=KAgG/j2PYmZBijCAN1BxykQQZCdt0jAzPGq884/YaaX1RZfWxKGZ7L/OxEshJFIEpo w/MXmLw1fDcEIG6BxM38EYcEEr2WfBMeg/v+gvRlloyYTyn7Vrbb7JfGiRAnwEDbjVwa MIVHRQcleji/w7sAdmziF89XcFC6UbarTjkbwJwmCFAfyK/mbZ+8bV+lo8Wu8cfo93/r kHb0t4w87We/z0q86oDKv5kOBmV1JWvLG4MPTA6/khtb0KyrZLnZPDFcisACRDGSuBGO FN+6HTBx436P/9PFEJHSB7zy2vMzKInaO50bX3i4oKRjcdFNmMAdyh1MEuqa/cm9M5gA hsTw== ARC-Authentication-Results: i=1; mx.google.com; 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 l185-v6si19902032pgl.270.2018.10.18.00.41.16; Thu, 18 Oct 2018 00:41:32 -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; 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 S1727519AbeJRPkU (ORCPT + 99 others); Thu, 18 Oct 2018 11:40:20 -0400 Received: from www381.your-server.de ([78.46.137.84]:56172 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727395AbeJRPkT (ORCPT ); Thu, 18 Oct 2018 11:40:19 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gD2uy-0001JM-86; Thu, 18 Oct 2018 09:40:28 +0200 Received: from eisbaer.ursus-maritimus.org ([78.47.220.141] helo=[127.0.0.1]) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gD2ux-0005u0-Su; Thu, 18 Oct 2018 09:40:28 +0200 Subject: Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface To: Phil Reid , Nishad Kamdar 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, outreachy-kernel@googlegroups.com References: <20181017144716.GA11485@nishad> From: Lars-Peter Clausen Message-ID: Date: Thu, 18 Oct 2018 09:40:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.100.1/25047/Thu Oct 18 06:56:19 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/2018 09:28 AM, Phil Reid wrote: [...] >> +    chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); >> +    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; >>       } >> -    gpio_direction_input(chip->rdwr_pin); > > The RD/WR pin is an input to the AD78xx. So this doesn't make sense being > GPIOD_IN. One thing at a time. This patch is a straight forward conversion to the GPIO descriptor interface. It keeps the existing semantics of the driver as they are. Now these semantics are obviously wrong and should be fixed but that should be a separate patch from changing the interface.