Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 413D5C636D3 for ; Wed, 1 Feb 2023 00:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbjBAAuY (ORCPT ); Tue, 31 Jan 2023 19:50:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbjBAAuX (ORCPT ); Tue, 31 Jan 2023 19:50:23 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03659125A3; Tue, 31 Jan 2023 16:50:22 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id bk15so46764787ejb.9; Tue, 31 Jan 2023 16:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=14Rz9IsCEo6lrI4LScZe0yDYpkBPJjzhIJ93HjF95ds=; b=SU9a656eCx8kjuXWl96KuMwptfpNjgImHGqWLpPbShy0obUH7AvXYddMYGhYJMTigA q/kaVok0qgP5QeSm6UPJKr+PwZb8L4DyKKcUU2fkacw9bPcb9JuwlpdNtQW0T0185zCT VhH0KPBg1B8y8656SffYsYm6D8y+/kmH9DVZKroN1Ty/BqFSD35DrvZtF9qHHogzrKbk reFnZnh/wbYXXP9febcx7Y+cSFH9q7loj2VhBHLqnnZqGihQJNNUb/SB7CfqxaRx282v 6JiIRUJ7oU3u2H8cqkb/aYnh1t8KF62uADD9qZ2eqvxPCttS7gdl18LO5RwOdtEHhmw3 EFaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=14Rz9IsCEo6lrI4LScZe0yDYpkBPJjzhIJ93HjF95ds=; b=bH1ZOuZAZ5Heglf8Fo8Xn/OxQDLD6pYG9FOziT9nrxW37ccFGxiLoyVnmAn6L4zNrx QQpp/dwC2kLpa/BGBwylOVrA19GLNhnOAchJe/kxCuvSeI5shR/FzfqC2q32597z48lx iYrEc8yXxl4LrxMafXBrZORumU5y4O6aygLKK1y8aSX5iQklXXq7NIGEzWyi9Pix6+bq aTelK/DlleZpNh5OWsa7bKtQmPdBNJ15XjxIXEQBo/Gc/fgHde6iI7DCLFwDbxAji22F g+PWZMhp4qetllpQWAh793FPHpSOh/YZxNU8ZOilkHMMDoJuqNWO7Q831T/z8DLQWJDT 574A== X-Gm-Message-State: AO0yUKX/6mSsoR7NYPId0A8yH8V/IkBLDmw1BVedDr6sdMEAbGcw7k7s rJSykLIPgRoEwFU4cD/XtQfDHB6u/18JegVd1r8= X-Google-Smtp-Source: AK7set+iUvTF3Kdsy7EXm5jI2HjyrWe3w7eLfqf2U1oyWlSnAV6M6aU77qS+7+am4ZW5UHYryom+uxtgJ8A6wCx2PpU= X-Received: by 2002:a17:906:139b:b0:88c:1d3d:6fab with SMTP id f27-20020a170906139b00b0088c1d3d6fabmr91900ejc.299.1675212620101; Tue, 31 Jan 2023 16:50:20 -0800 (PST) MIME-Version: 1.0 References: <20230126162323.2986682-1-arnd@kernel.org> In-Reply-To: From: Dmitry Torokhov Date: Tue, 31 Jan 2023 16:50:07 -0800 Message-ID: Subject: Re: [PATCH] [v2] at86rf230: convert to gpio descriptors To: Arnd Bergmann Cc: Alexander Aring , Stefan Schmidt , Arnd Bergmann , Miquel Raynal , Andy Shevchenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 31, 2023 at 3:52 PM Dmitry Torokhov wrote: > > Hi Arnd, > > On Thu, Jan 26, 2023 at 8:32 AM Arnd Bergmann wrote: > > > > /* Reset */ > > - if (gpio_is_valid(rstn)) { > > + if (rstn) { > > udelay(1); > > - gpio_set_value_cansleep(rstn, 0); > > + gpiod_set_value_cansleep(rstn, 0); > > udelay(1); > > - gpio_set_value_cansleep(rstn, 1); > > + gpiod_set_value_cansleep(rstn, 1); > > For gpiod conversions, if we are not willing to chase whether existing > DTSes specify polarities > properly and create workarounds in case they are wrong, we should use > gpiod_set_raw_value*() > (my preference would be to do the work and not use "raw" variants). > > In this particular case, arch/arm/boot/dts/vf610-zii-dev-rev-c.dts > defines reset line as active low, > so you are leaving the device in reset state. > > Please review your other conversion patches. We also can not change the names of requested GPIOs from "reset-gpio" to "rstn-gpios" and expect this to work. Stefan, please consider reverting this and applying a couple of patches I will send out shortly. Thanks. -- Dmitry