Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1648232pxv; Sat, 10 Jul 2021 10:34:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFRn62vwnYXcZb9CxGkiBt2V5JU07jPg1tXcwPJTKuAof5+gtZeS6h3xqYAGtdh+EMqwDf X-Received: by 2002:a05:6402:2814:: with SMTP id h20mr50132097ede.29.1625938463581; Sat, 10 Jul 2021 10:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625938463; cv=none; d=google.com; s=arc-20160816; b=gwk4A8C8w5dk53uV2z2+6GWortEvugTQFfHcZgJGxJVxbM3peNG5vDqIWcDHq31Hdu xXnW0uhHxLoRI8Mmh6YmlNceOr3wVJ3rHZyFkEknMaDmtUCpScKF9mUJMaw5ageFVqQj MQKqIFOiQK3aLUF5jXJ8tGuo/1zhwGHYAqHF9+Xr+tN2aaIHwfNjMP1nascp4BftEIvs bZX3MGCptFSZ6tj4eTuvDnNDEXR6ZxKF85yHKGArUrNErX5quPZ8dKPt21jULtMOd23n pW+5oRkNI2FvAmV7bMROZVe0nHN/dX66/5992r5oWK+q3Wx+lsORzlhj+AOYcTPZLNCy F9Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=1mqKIZVQxP47/A+qzMx10xb8rLD3lJWCwXzfa7+b9FY=; b=yrkgysT3jN3xcMb33vnLeqcdTd+sykZYQe12vFBNSpzRzHLGVEdG5l31gACbR+XK6I psfkqaUxgFfcLvykxYwIpfdD6ZHTi7w9LVs0UPr/8liVCMcBXdHxdcSjm1oueTZUm1b6 JjvRul0D7z71Oo/0VAsQxHcDuN9F6fAxF1whL3+ICXBs4pmwlEPCpMPoSOPD3PN21ajZ bwYYYxxH4+DRld9q8LJUopQJuwApWVTnFPfMPsDp9mxpubbcXBUefA2OCUGGoPDlVMHB 2gI7/FJafDg1XcDuZcwUGcB6yAyEPVlanJG0eJwPtE7+xpR/LrQbKTcciVy+8zMUQp/U dzaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y9si11819529eju.362.2021.07.10.10.34.00; Sat, 10 Jul 2021 10:34:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229867AbhGJRfl convert rfc822-to-8bit (ORCPT + 99 others); Sat, 10 Jul 2021 13:35:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:47124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbhGJRfl (ORCPT ); Sat, 10 Jul 2021 13:35:41 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 46D5B61279; Sat, 10 Jul 2021 17:32:52 +0000 (UTC) Date: Sat, 10 Jul 2021 18:35:25 +0100 From: Jonathan Cameron To: Antti =?UTF-8?B?S2Vyw6RuZW4=?= Cc: linux-iio@vger.kernel.org, Hannu Hartikainen , Lars-Peter Clausen , Michael Hennerich , Nuno Sa , linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH v2] iio: adis: set GPIO reset pin direction Message-ID: <20210710183525.0684bd90@jic23-huawei> In-Reply-To: <20210708095425.13295-1-detegr@rbx.email> References: <60e5ac8c.1c69fb81.c69f0.abab@mx.google.com> <20210708095425.13295-1-detegr@rbx.email> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Jul 2021 12:54:29 +0300 Antti Keränen wrote: > Set reset pin direction to output as the reset pin needs to be an active > low output pin. > > Co-developed-by: Hannu Hartikainen > Signed-off-by: Hannu Hartikainen > Signed-off-by: Antti Keränen Hi Antti, For future reference (in IIO anyway as not all maintainers agree on this!) please don't send a v2 in reply to v1. It gets lots if anyone is using a threaded email client as it's buried deep. If I'd not been following the discussion I'd probably have missed this. Seems correct to me, but will leave on list a few more days as rc1 isn't out yet so I don't have a good based to start collecting fixes on a the moment. Jonathan > --- > Removed unnecessary toggling of the pin as requested by Lars-Peter. I > missed out on the conversation, but I agree this is better. > > drivers/iio/imu/adis.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c > index 319b64b2fd88..f8b7837d8b8f 100644 > --- a/drivers/iio/imu/adis.c > +++ b/drivers/iio/imu/adis.c > @@ -415,12 +415,11 @@ int __adis_initial_startup(struct adis *adis) > int ret; > > /* check if the device has rst pin low */ > - gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_ASIS); > + gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_OUT_HIGH); > if (IS_ERR(gpio)) > return PTR_ERR(gpio); > > if (gpio) { > - gpiod_set_value_cansleep(gpio, 1); > msleep(10); > /* bring device out of reset */ > gpiod_set_value_cansleep(gpio, 0);