Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1258016ima; Sun, 21 Oct 2018 07:53:15 -0700 (PDT) X-Google-Smtp-Source: AJdET5fGWrTGvnBWtvhuBSiFrgukQRMi2t9C4eu7JKeLQC/mBHKkTXMvj+mxdWwzslC4pRhC4nL/ X-Received: by 2002:a65:57cd:: with SMTP id q13-v6mr2100277pgr.229.1540133595178; Sun, 21 Oct 2018 07:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540133595; cv=none; d=google.com; s=arc-20160816; b=AMVFFhbHGnGFgg5Nk6BjxfA97EsSu9zZ4K7w5hYOQNH+aXlcQOod0XpoRj7kWryCKn bQiw0GTYvtne7JQQ3TBlPA0x6X4iRhS+iA3g4ETuztHrSRpuOAf2RBo/WdYjRXslgZnT GBdjMD33CU7g+4y4l9KdcrqFnML6f8twpU8kqgvdZxqJVfNZsNcR3HXXhmhrubhhv8hC U9dbBkZk/oLnCpS5nDw74pkKCbFh5EEDvW8qoXz/e+IcLW18vO4lhJg4sktCm7perzA7 ebo1MDR5e3mg+WaSJGy0liYg78RddEmJwbrLLWny8ClbgVnstLOVdQKzBUa03MpK+8bc VdxA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9Nr7+YUd6CwMZkYivNq1QnL0j6MxRRktSE8MfeanCwY=; b=cWzh8REztT325mGbQgf9MaujdFnCejcOGNw0WEyVrSfVazN/OR4zIsQVFd5Xdjh/O/ unyoQckANpwUWcJK6G84iQStmr+Qznzj0+B3ADzpgdMGLaWwKLp53zdkHFY4B6ONYoMV 2JOa9xdUut+vXN+x3yhcHRrn59DDwgdcuvGna4rmYo5MUE3kSiEhS+ls8nlxmOZBE3zv /3zemXmVFvL9a8uGPHtC3LTp7XrA9AFiMN7s0M8Q+c3cZDs/fTWhroro2rodsvlwHpAF hlqpUfBtzeM0yhSCwov7F7QXZi1lnrZPpc1faOD5EsR3GetCPYczvLouDNd4UH00QPoc 3s3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=shuDviQ3; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3-v6si9229101plj.337.2018.10.21.07.53.00; Sun, 21 Oct 2018 07:53:15 -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=@kernel.org header.s=default header.b=shuDviQ3; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbeJUXGn (ORCPT + 99 others); Sun, 21 Oct 2018 19:06:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:57036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727336AbeJUXGn (ORCPT ); Sun, 21 Oct 2018 19:06:43 -0400 Received: from archlinux (unknown [176.12.107.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1361820836; Sun, 21 Oct 2018 14:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540133528; bh=tTVAoDJlB+jPcb2yIxC6nZjUyFjzdL0aUvqrFJmE61o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=shuDviQ3TZNcAwA0+AO9335okGWiixEaZk0uTZM/m582PZF1axlmPQcPsI5vPQUuV HUBv4qe+GF6iTGGU+PadruE5ufYCfvZXzYLb0i2ZWA2KhlVZSqEOXrCr8Dim39NOks sPpJiGdLrtgdVdbh/VKba3s0SWuPNGuXbuC9Kslw= Date: Sun, 21 Oct 2018 15:52:02 +0100 From: Jonathan Cameron To: Lars-Peter Clausen Cc: Phil Reid , Nishad Kamdar , Michael Hennerich , 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 Subject: Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface Message-ID: <20181021155202.5fe5a49f@archlinux> In-Reply-To: References: <20181017144716.GA11485@nishad> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Oct 2018 09:40:00 +0200 Lars-Peter Clausen wrote: > On 10/18/2018 09:28 AM, Phil Reid wrote: > [...] > >> +=C2=A0=C2=A0=C2=A0 chip->rdwr_pin =3D devm_gpiod_get(&spi_dev->dev, "= rdwr", GPIOD_IN); > >> +=C2=A0=C2=A0=C2=A0 if (IS_ERR(chip->rdwr_pin)) { > >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D PTR_ERR(chip->rdwr= _pin); > >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(&spi_dev->dev, "Fa= iled to request rdwr GPIO: %d\n", > >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re= t); > >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ret; > >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > >> -=C2=A0=C2=A0=C2=A0 gpio_direction_input(chip->rdwr_pin); =20 > >=20 > > The RD/WR pin is an input to the AD78xx. So this doesn't make sense bei= ng > > GPIOD_IN. =20 >=20 > One thing at a time. This patch is a straight forward conversion to the G= PIO > descriptor interface. It keeps the existing semantics of the driver as th= ey are. >=20 > Now these semantics are obviously wrong and should be fixed but that shou= ld > be a separate patch from changing the interface. Agreed. Useful to raise these issues however, and I've added a note to the patch to bring this to anyone's attention should they be interesting. Thanks, Jonathan