Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1184031rdb; Fri, 1 Dec 2023 09:02:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrP/DvalPcBYpwZdTYSI02RYNOvBZS74Y7Z48waifZs+78nH/s40/3TDkfXY0oCcFbaWHt X-Received: by 2002:a05:6808:f8d:b0:3ac:a522:5461 with SMTP id o13-20020a0568080f8d00b003aca5225461mr3837436oiw.36.1701450174358; Fri, 01 Dec 2023 09:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701450174; cv=none; d=google.com; s=arc-20160816; b=IhxrARBO8DqvmEuKWc84D1TtVbHP8gc/TgcVJJAkFXHihbGDEcjAN+D8luUL0l3QgH KkSJmiS1/9o3Zj6wRhJMmzlY0wyDUigYhVImqATmSrHL6tYgFMB08kd15TsMtgCnAGdR FXOKbjlVm1pU/LlBJm3cwfMm41nq22ym8Loy+k8NMLFMt7oP9oh5Gh4XWz1EOdJhoNjs Jd59+x179lxcx3Jsyta+PFtTADYUKW/s37XD98SbpiWx/wG8Adwn5HpuXPQM9D73jJy+ yr96FZj35b2yrpL3oCPUP0J8Jrm1jqz0ccX+0+Sh7Rp/DscY5iB5GOnekPW6fbVgEkfI 9oCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DWTh4se+UruTw1n6D9cikBRfGAJlzspbt4OfaTxkr5o=; fh=3cKdrIsSF8HYFd4GCdgwwqxlbOAdqOYFbsnJlPguBY8=; b=x/BpfqBJNe3C4PUgB1MfIKoj6DfzKjEa1m4qwL8DOc15cRyS7avIQuGrX6LVHo1fQR 7SAfETyP6MU01i7lgU4Qt8KWaMomUN/l31+tvpW1fLfVAltfO72N5sOXBr6IxTnWTjzQ jDS0a0pWnOFX+LdhDW6qkQM1bvA+2vFvI6HfQTTHCh/egDoE7C3LU/ioL+A9tlu8zUt1 C3Nyt7PPCNB9gcfThXGDUH6GCMtKMOrdIBLhW5EJy03G1f+2vk8QOeVcP++ocnHqeuYn zFlmfGpENfSwXcEXY4tHm8qw498vdMF67K7x2vWlV2PmIHtlaSU0vp11RhL42sRw5Kso 8HaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=m4zBEm0Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id w26-20020a056808091a00b003a9de4f611asi1339966oih.259.2023.12.01.09.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 09:02:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=m4zBEm0Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 29BB68374BB0; Fri, 1 Dec 2023 09:02:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378624AbjLARCF (ORCPT + 99 others); Fri, 1 Dec 2023 12:02:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378634AbjLARCE (ORCPT ); Fri, 1 Dec 2023 12:02:04 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0702198 for ; Fri, 1 Dec 2023 09:02:08 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2c9bbb30c34so29782441fa.1 for ; Fri, 01 Dec 2023 09:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1701450127; x=1702054927; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DWTh4se+UruTw1n6D9cikBRfGAJlzspbt4OfaTxkr5o=; b=m4zBEm0Q7+2iCo3wggfcXtWIUfDN7FFqjNVpC614RWEXUURjyE5cNwZ2ulSzsPnIqp pnsluCY4yyKJr8Lm0dIG1zhmVd4aB/LYoB4guoG+v0+S2pjiv+5z90l8R4ipmtvXOLDf /5O486evXfYNyWKc/3mU3WmiPOSknN7UqdlJTJ2yyE+bgpxOXc7ArTI3Ezy2k8RNFCvi EOhWEVyKZIr68nsMedeIDCb+f/6m5ObdARn+liYUBq5qA8jnyKzaKP457R0fwyQhaVre 3KZVjqoGTtHSu0f87KUEvGU6REufwaMDeD5ctPSKrjhNGzouXKwsZTwnXRA3jnYajwhD H8Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701450127; x=1702054927; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DWTh4se+UruTw1n6D9cikBRfGAJlzspbt4OfaTxkr5o=; b=jMw3BMBXq7k+e/+oE/7xXj7QmfHruIPu4CpF/5fnauuzh2M9HF+F0ONdRofUCvQkel B9kln6VX/pzYcdho/m8ZaGEIoyy8DVLOG02dIR5XyEBoD5AIHet1UHhJtbivvRl8jgl7 u4SuMcO/9iAUGb6xUfNHsOR4c9FFJNfBdrFY27C9ha7n9Nu4Qer1E2WNayW45KY8nZIN DIed6wrInfLo0sAf6NT3V9wfxJ5zNRGWAE5j903V6z5k5KKaGXQdQxwzqseas2iYgIQw QXn1DUHmKtXDgKGoYHHx/n/cov9HqBikNtnO6TFB2Mq8YD9W55U3lTkuBvY6yHgnawaO lPTQ== X-Gm-Message-State: AOJu0YzWggdiRhAnfAgPdLhj6g+KHbXXx9L9JG/geNmZK7Gr85nDe1E1 IROTnLzRmMaDbaJyGt2dHiP3q5EzEEZoe/pOcHsZPw== X-Received: by 2002:a2e:95d4:0:b0:2c9:d874:4b75 with SMTP id y20-20020a2e95d4000000b002c9d8744b75mr860509ljh.101.1701450127003; Fri, 01 Dec 2023 09:02:07 -0800 (PST) MIME-Version: 1.0 References: <20231121-dev-iio-backend-v1-0-6a3d542eba35@analog.com> <20231121-dev-iio-backend-v1-4-6a3d542eba35@analog.com> In-Reply-To: From: David Lechner Date: Fri, 1 Dec 2023 11:01:55 -0600 Message-ID: Subject: Re: [PATCH 04/12] iio: adc: ad9467: fix reset gpio handling To: =?UTF-8?B?TnVubyBTw6E=?= Cc: nuno.sa@analog.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Olivier MOYSAN , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Frank Rowand , Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 01 Dec 2023 09:02:22 -0800 (PST) On Fri, Dec 1, 2023 at 2:47=E2=80=AFAM Nuno S=C3=A1 = wrote: > > On Thu, 2023-11-30 at 15:41 -0600, David Lechner wrote: > > On Tue, Nov 21, 2023 at 4:17=E2=80=AFAM Nuno Sa via B4 Relay > > wrote: > > > > > > From: Nuno Sa > > > > > > The reset gpio was being requested with GPIOD_OUT_LOW which means, no= t > > > asserted. Then it was being asserted but never de-asserted which mean= s > > > the devices was left in reset. Fix it by de-asserting the gpio. > > > > It could be helpful to update the devicetree bindings to state the > > expected active-high or active-low setting for this gpio so it is > > clear which state means asserted. > > > > You could state that the chip is active low but I don't see that change t= hat > important for now. Not sure if this is clear and maybe that's why your co= mment. > GPIOD_OUT_HIGH has nothing to do with active high or low. It just means, = "get me the > pin in the asserted state". > I would assume that this bug happened in the first place because someone forgot GPIOD_OUT_LOW in the devicetree when they were developing the driver. So this is why I suggested that updating the devicetree binding docs so that future users are less likely to make the same mistake. Currently, the bindings don't even have reset-gpios in the examples.