Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3504679rdb; Wed, 13 Sep 2023 14:16:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEd9TxWVLQoL5A09mvtGjY0bLknNImScXpIkEC9KgpPleL5NzOnYEcWe8hWUnGtgggidHRL X-Received: by 2002:a05:6a20:8424:b0:148:f952:552b with SMTP id c36-20020a056a20842400b00148f952552bmr4439442pzd.51.1694639795749; Wed, 13 Sep 2023 14:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694639795; cv=none; d=google.com; s=arc-20160816; b=AuGIgBv2I8PUbbVU6btWwqbnWXqfEuKbpGHGjIYSPjbpDjP0yzNQnceLs5iR6jnOop gbpYfUUIVtDPXQEd3+5/I7umdvSt14FMaM0bIOUg7KmhCDTJbP5GoWsjvpMrFpmsZjxT XyNcih9IYIWmo5eK2rxAv7rs7MsP8UKIGheXwRa6DDnmLOJYT83nUnJdHnUujkOPHztL mKN0vSfYnURnXd1YiMpOlm2H12HIMVukyj+1qkUR45m0hgYrMz0GhTFJoRWHfEMJyxo3 qd6kAed6JXxWM9/7NW1XRxNoGJSA8LZrHn8Ae+kTegn5HdGPuWfmCfYXUOgzzJEy7WKj 146A== 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=Su1HKHhLigyzqYlZO3Q6GiJPuDvWadoF+8eJgSHSJSM=; fh=0/0jZoCtb5TylpfLexex/IlD4nX3kp9Hm1fZbj+Lg9g=; b=q0LwiJbS6hAKyY/gY+xmXSLyXUY+c+AZPTEh34VcW649kw0LG0P/V5WqORp6RctF9j I9wv8rDqb4xC/OxsLzPktIyQrtG15ApkPWo9nBgyWuzLsdSnvCWJgTNOffxo+G1tpDoG RwqFh6XMWUt4Li/GFUWEFfe9i26P7RtLEFtO+a1WVOd5kCKzjwA/Izgn6LFr9YR+/seP DFA3oHoca7uuKCqPeWdTpK/qXoHtEuUEVdGwm59iH2d6dtwBCGWhdx2+bFr4+cz3mA+m 6sjZ/2fmfJfMVQzVG5st8BI4ig+CXZWNXzjlvH7BswBrJaQWyf36ixPwC8WLX+zAxQI8 kc2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aiRSgXPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id oa9-20020a17090b1bc900b00261326aa56esi175445pjb.5.2023.09.13.14.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 14:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aiRSgXPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1378780B4206; Wed, 13 Sep 2023 13:12:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231603AbjIMUM6 (ORCPT + 99 others); Wed, 13 Sep 2023 16:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231918AbjIMUM5 (ORCPT ); Wed, 13 Sep 2023 16:12:57 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E9DF1BC3 for ; Wed, 13 Sep 2023 13:12:53 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-579de633419so2370197b3.3 for ; Wed, 13 Sep 2023 13:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694635972; x=1695240772; 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=Su1HKHhLigyzqYlZO3Q6GiJPuDvWadoF+8eJgSHSJSM=; b=aiRSgXPbdPszjUbrmOvfo8VAbkCooNj2DlaPadFcfWqONmI1e1Ks9j2Zmtg9KMhvVx PX/x5k/D0b1WEwZtEzWZRkPA8IrfbYHsqP+tjC85HjqExhu7XheGk8CdHWuLCAz3ZOOM VCuoKtlcFasz019GO6zGs8sPXIZkq+03b5o4kMViuZUBPfWD1EkVMI5jbh/AGXOoQe5Y +rHm/yIuaKSCA/OMPD1AyTCabMcwJEvRXFYuODEV110l2EF96r0v5ZHKr67DsB0HExr7 FK463fHavC8jhL1xEhQSum117HDUvYlfT7mfteSZTabEAvtcsAgJS/4vcWp6RjQJUIQO KsSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694635972; x=1695240772; 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=Su1HKHhLigyzqYlZO3Q6GiJPuDvWadoF+8eJgSHSJSM=; b=fwak2HnhXTNXabD836hsZ7zprbijjR1YhWdASiKSL1FiNPHCvgUFa5066UqGvmWqeU 0y6O1YYgvsrKCgZ1dHEQaTSAGrTEvAX01JwAQ2hZYU9scD3aRlipBqBowbfxiWc43obM WEjBEpHf/Tf2R5CkIOpwO8ZwnRK2/K088aQkQK1zGUpT58q3YRan5VlSxqAabSitev+p hBXLsFWXpME/qSbH+oxvHq9fgFZ1kVbr4QWuWVREM2mclbUfyCXHruLOIijq7wQMadR9 NMsGfyNeZvOhtaLF7qsG25WEgmpl8IEYwPbkLlC0kvdDI+QUlk/q8owolQ44z4iDvAVR dqHQ== X-Gm-Message-State: AOJu0YwknyNwQjDrMS18AfwFUtZlFGFw/3xAdnRnvNludJkw4hyptl8J +0BSlTgGXUdIIdSXUAsv4IO7czzc2fULkPdjAenAZQ== X-Received: by 2002:a25:d246:0:b0:d81:6a54:48f0 with SMTP id j67-20020a25d246000000b00d816a5448f0mr2205331ybg.22.1694635972595; Wed, 13 Sep 2023 13:12:52 -0700 (PDT) MIME-Version: 1.0 References: <20230913115001.23183-1-brgl@bgdev.pl> <20230913115001.23183-3-brgl@bgdev.pl> In-Reply-To: From: Linus Walleij Date: Wed, 13 Sep 2023 22:12:40 +0200 Message-ID: Subject: Re: [PATCH 2/5] mtd: rawnand: ingenic: use gpiod_set_active_high() To: Andy Shevchenko Cc: Bartosz Golaszewski , Andy Shevchenko , Ulf Hansson , Paul Cercueil , Harvey Hunt , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Daniel Scally , Hans de Goede , Mark Gross , Heiner Kallweit , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 13:12:59 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email On Wed, Sep 13, 2023 at 10:05=E2=80=AFPM Andy Shevchenko wrote: > On Wed, Sep 13, 2023 at 2:50=E2=80=AFPM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > Use the new, less cumbersome interface for setting the GPIO as > > active-high that doesn't require first checking the current state. > > ... > > > * here for older DTs so we can re-use the generic nand_gpio_wa= itrdy() > > * helper, and be consistent with what other drivers do. > > */ > > - if (of_machine_is_compatible("qi,lb60") && > > - gpiod_is_active_low(nand->busy_gpio)) > > - gpiod_toggle_active_low(nand->busy_gpio); > > + if (of_machine_is_compatible("qi,lb60")) > > + gpiod_set_active_high(nand->busy_gpio); > > Why not moving this quirk to gpiolib-of.c? That's a better idea here I think, it's clearly a quirk for a buggy device tree. Yours, Linus Walleij