Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp505909rwn; Thu, 15 Sep 2022 02:03:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4jBK5ir9VvrYiyza1mPAfeRh6R9HhtLAAEJH6DrlwYvvyWSivUgFGxp2C+ocVp7x5PMo4W X-Received: by 2002:a63:d20b:0:b0:439:1c48:2209 with SMTP id a11-20020a63d20b000000b004391c482209mr14560168pgg.93.1663232600008; Thu, 15 Sep 2022 02:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663232600; cv=none; d=google.com; s=arc-20160816; b=gFfU321F7kahmvTw+Ditog9x5GW6lk46HcgEk4yqZkD5c5qWtHdxdQFnNgv8tQkjuD jRRH2YSA5yluSnJveRQ0kiqeP6mLc3BYsOMm83m5ZNINDd386CAc0dCqUBRkBczH3LqA 52zkS+NSASKnkaMR77ewnSPvQUo0fOo4PGsvciYVDtnbMbGOreiglFwpDgmae/dIwW9S KRjMGHcfMlEQrtk85kVsiPiC2+ORVnoObb0XPeYYV4cRX0FDnDMlKZ0gB3mvQICys+wd a+X+xLJHxcNEb9lPg4PnRsk6Vhn35xokZCFMAD03gofdsmkfBcHqiUsXUmdK9YfZq01s Njwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pVEAPr9uFJXoigY4S3Caia0V9hvOwsnD7u1cGE+06fg=; b=cv8KvKbWqt47GHofybNjSbI1JYTxUtZqv24z+3t5axYcJ6nVZw0IYvJ1kpJQGnN26z EsKVGg5d9GwO/L+V06PJjOUdZ4TKAoQKc5bjwUvVkgY8fxKAnfe3Zy5uJqiGaA6EL7NL EZ8fVu/uhIum7lBPAjlJHl7shmy1HKjOEsztwdr3pZnXfWqJqcoE3XyNOCOBXuIaAu2M b2sMgrIXH6g6qjcSEcFiw3UpFsXcJYfiZ4SK4f9Dt+n9CpEg+SIo6M7X83CPZIr15w3+ PM5/3YKbgr0glhkK0WlsjLXSl2+Xz0RkshzVz7FRftNa83mZ0ezDd0DHn4JCNfW4fcj4 6SuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lQ3J36OO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r185-20020a632bc2000000b004386d0f483bsi18803849pgr.730.2022.09.15.02.03.04; Thu, 15 Sep 2022 02:03:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lQ3J36OO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbiIOIv1 (ORCPT + 99 others); Thu, 15 Sep 2022 04:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229987AbiIOIvR (ORCPT ); Thu, 15 Sep 2022 04:51:17 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DBB58C03C for ; Thu, 15 Sep 2022 01:51:16 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id v16so40471124ejr.10 for ; Thu, 15 Sep 2022 01:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=pVEAPr9uFJXoigY4S3Caia0V9hvOwsnD7u1cGE+06fg=; b=lQ3J36OOZC+3AWHtJgFIWkMKS2XenwMASaLdlbMcfGiHgwBZPp4D7FdJA+OItxRkDb Js/Q03BFOS1N3FBMZogWUbgVzYhdy0UremJzkm3RxoeVIKUJkg2XthrxPq8oquNl3MdN 0o8wYJ+w6/u8wZK9GhZeyvUkd3l+PklON2jOefy+wvlfK2xkABNacMpczhCkYQIrJkQD labgVa0aoMtnvT62KbzBqwzSu4FkNyOOnVXnqYMYe7vkqZsfz9uysFTEbeZuqmK2EpwO L6oBZ6RqC+bpKpYyRS6whdkA0bWnOUfLZ1pP1S4wpmj0HXEW9ogvtmRaXtV5ZUgqFrey rKSA== 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; bh=pVEAPr9uFJXoigY4S3Caia0V9hvOwsnD7u1cGE+06fg=; b=D98y2znrr6jNGBGgM82RLGExxL+LHy2OzitWXsc/QocQzXI/SN/eJ/uLYTD0GLBAXT GAcSciNUUceUegzAEshDUPYiVwpEicSLLdnbmcIyo+faRhMrlMB9Q9/mvIykCZPA+POR uhh3ni8cLfAND8ixpcpaww0t4IybPNpqEkZhgrBimaK0OfLcmEjk0lE03BibfM5JHQMH J4LueeSP/FrUy2EU5BN2IDYdOF1P7rCijuXc8sCcf20PmZne4UD1QjskcTo6hK3q77Wb ra14+vyCE1Dpny8KwbllXs13WK5jSTuF1CSuFpTjouiaWJmBatu+F4gIWIKZm7RJstxb 9Jsw== X-Gm-Message-State: ACrzQf2Zeiy+ydY63piNqY8g8igRk+lJq3Tfv+kdmRxXzPSFgyZ3nJov S+O2D2KVA1ktHvZ3seya4OwKqEfekihVyorwFKlUUw== X-Received: by 2002:a17:907:7f19:b0:780:375d:61ec with SMTP id qf25-20020a1709077f1900b00780375d61ecmr4696000ejc.203.1663231874698; Thu, 15 Sep 2022 01:51:14 -0700 (PDT) MIME-Version: 1.0 References: <20220906204301.3736813-1-dmitry.torokhov@gmail.com> <20220906204301.3736813-2-dmitry.torokhov@gmail.com> <20220906211628.6u4hbpn4shjcvqel@pali> <20220906214114.vj3v32dzwxz6uqik@pali> <20220906220901.p2c44we7i4c35uvx@pali> In-Reply-To: From: Linus Walleij Date: Thu, 15 Sep 2022 10:51:02 +0200 Message-ID: Subject: Re: [PATCH 2/2] PCI: mvebu: switch to using gpiod API To: Kent Gibson Cc: Bartosz Golaszewski , Dmitry Torokhov , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Shawn Guo , Lorenzo Pieralisi , Thomas Petazzoni , Bjorn Helgaas , Rob Herring , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 15, 2022 at 4:23 AM Kent Gibson wrote: > After sleeping on this, I'm even more in disagreement with renaming > value to state. OK let's not do that then. > OTOH, I totally agree with the addition of GPIOD_ACTIVE/INACTIVE to be > used for the logical cases, and even a script to apply it globally. > Ideally that script would change both the calls to the logical functions > to use ACTIVE/INACTIVE, and the physical to HIGH/LOW. OK we have consensus on this. > Introducing enums for those, and changing the function signatures to > use those rather than int makes sense to me too. Either they can be enum or defined to bool true/false. Not really sure what is best. But intuitively enum "feels better" for me. > Though I'm not sure > why that has to wait until after all users are changed to the new macros. > Would that generate lint warnings? I rather want it all to happen at once. One preparatory commit adding the new types and one sed script to refactor the whole lot. Not gradual switchover. The reason is purely administrative: we have too many refactorings lagging behind, mainly the GPIO descriptors that have been lagging behind for what is it? 5 years? 10? GPIO irqchips also dragged out for way too long. We can't keep doing things gradually like this, it takes too much time and effort. I don't want any more "in-transition-indefinitely" stuff in the GPIO subsystem if I can avoid it. Therefore I would advice to switch it all over at the end of a merge window and be done with it. Yours, Linus Walleij