Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp539637rwn; Thu, 15 Sep 2022 02:43:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4qEhrAzqeMdyEQykBAK+IyLdJxqMu+yj77cPyvArooqkqIDzC5gegaklPFFhJZWsnUU4qf X-Received: by 2002:a17:907:7dab:b0:77f:d4cf:db1d with SMTP id oz43-20020a1709077dab00b0077fd4cfdb1dmr9154829ejc.158.1663234996938; Thu, 15 Sep 2022 02:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663234996; cv=none; d=google.com; s=arc-20160816; b=oGT6PF2e6Zdq2eAkXADw+N8N41XIrcUwbF70vrScd59xfLne0RuBTe4jVNNxfBxAgK CQMJH5DqA3FIT8OxM9+SyGdYAjq4q8r4cBz9QrXagPY60YIgPzQIYbEEyfTg2Wf2vhHm nirB8sh/3u067vq8ZC8vyjoC1ksuPnFoRWP6eEEgqt3KDq/jCdrqq4d1/AVJ0vrfRPAp ykHXZQWHybCNzgoKdCNTNg/RQBAqsHGx0lY2pN64Nv7IHvTQCfK9bvjqYGXWyLMX1vXV 5PF02o86PcMdTo/4NowZUqgvZ+BUtu7rQMDSYC5q71sxR9hzjun+gJHvsGUoMbw67J4M G3FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LSuUjN23nOfC/jh6HADsC6Jpj10f77UtFVq8cZc91gY=; b=b9f3ab4B7IjWbI12arYqpBp/+1LYvaqKFrvNB41ZtTCO3pZgAF6rpe5CnmUrLu1EA0 CZvjngh5HlnevM5wcElUXDeuZvDi4Cya8H+ojvtS3PlrwBMymZOQuhYbLbixyEvhPyoi q3afaywywJiZdkl9tWvbwWbgdxrlopfdsR2jXiurWvaB5Xkl3m+be4G7Quxn4TR1Vczv O1vrmGFL33bfSLyoXLKdjvV37B1vcUOHmBYVoQxGO3c7iYwqeld6lbz6YjIREK3MMQVg EEb78QrBghV5FWe55k+uBNuxmlGj+BcJ0JHEIS8nJRSR+J+DzNC9TY0JLxvE2Me2gV4H 2yCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="nFuQ7S/k"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020aa7c1c3000000b004517955b673si9422821edp.124.2022.09.15.02.42.51; Thu, 15 Sep 2022 02:43:16 -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=@gmail.com header.s=20210112 header.b="nFuQ7S/k"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiIOJag (ORCPT + 99 others); Thu, 15 Sep 2022 05:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiIOJae (ORCPT ); Thu, 15 Sep 2022 05:30:34 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B04C12A88; Thu, 15 Sep 2022 02:30:32 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id q9so7670419pgq.8; Thu, 15 Sep 2022 02:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=LSuUjN23nOfC/jh6HADsC6Jpj10f77UtFVq8cZc91gY=; b=nFuQ7S/kLLD7RN+w5dvH+VYpygYmWNDwqiN1DARe3jLt0V41PSqikB0z16ejEA1TvF dv5ZZIid8Qkyqedsvk5G60fqwlWEmOD6OsBVuNg63/+79Vo17t9hFK/vcai7lGiNdrDm 3QXzZKDzKzQNFWwryyu1HLBRy8FPChbeiIAX8wgy+z+TFtRQh8NMbwf3qiC8kBXo6LBR NcIc0SJt4BaqHg+yP7MT1wnpNbDYUChgKgC9KNcEOKejpS5K/BICR8zUctRah61ABQ2F LL1FLdOnN68TRP6es+UXjv3XYEFNRJHUFYvyv7ZhSVhKyRG3zTAPH8P62NN97oVM11FT 9Kvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=LSuUjN23nOfC/jh6HADsC6Jpj10f77UtFVq8cZc91gY=; b=T93npBg1GI+cS4OThBm1pZHFOyf8qtR6XVet6iwcP/E76t1+zLNnFHwXgiNHEihkv2 cglbvZt3vUNE73w2svrgg2zUJNxzoJS+F02/aK1HH2+HQlGbtW9Z7egaEj5ic/MvHCmJ jQ23gv1pc9ZPR1WVDCf/cREsFJPSbnZpYRljzbgE41zcvXg8DRhVmwcYweZeXvC4azLC GBhMgB+Dy03gWbnAg77HB6QN2iPJhg7nm+8w+h8Lovd33rgSkWpZyx7ijkmyr8jhpkrS 6ndCQwf3njEHYEWbN1/whGz3LWMvNFj1Tqy1hjsE+t75bPNz3YE+Hh8Pe7jkjK0s4VPT nV8w== X-Gm-Message-State: ACgBeo3TDfYq782Lhmiw0WYeHvdrnD82cNYv62UIEBbZKjFJBrY6P8f+ JALEmjr47BmNrAW3VeuATqg= X-Received: by 2002:a63:698a:0:b0:41c:8dfb:29cb with SMTP id e132-20020a63698a000000b0041c8dfb29cbmr35309895pgc.170.1663234231668; Thu, 15 Sep 2022 02:30:31 -0700 (PDT) Received: from sol (110-174-58-111.static.tpgi.com.au. [110.174.58.111]) by smtp.gmail.com with ESMTPSA id h5-20020a170902f70500b0017555cef23asm12238859plo.232.2022.09.15.02.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 02:30:31 -0700 (PDT) Date: Thu, 15 Sep 2022 17:30:24 +0800 From: Kent Gibson To: Linus Walleij Cc: Bartosz Golaszewski , Dmitry Torokhov , Pali =?iso-8859-1?Q?Roh=E1r?= , Shawn Guo , Lorenzo Pieralisi , Thomas Petazzoni , Bjorn Helgaas , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: mvebu: switch to using gpiod API Message-ID: References: <20220906211628.6u4hbpn4shjcvqel@pali> <20220906214114.vj3v32dzwxz6uqik@pali> <20220906220901.p2c44we7i4c35uvx@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,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 10:51:02AM +0200, Linus Walleij wrote: > 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. > Enums work for me - especially if the goal is to differentiate logical from physical - there should be a distinct enum for each. > > 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. > Agreed - do it all at once. My question was specific to the change of the function signatures to using enums - what is to prevent us doing that before running the sed script, and have the script switch usage over to the enums? Cheers, Kent.