Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2187182rwn; Fri, 16 Sep 2022 06:59:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7wzkD5XoWLkxSNzU4G1wcS+0nMrsqzPfSz/KPQ3h9qqiGgGRokiyIiEnfgAJs9gfpuHoJF X-Received: by 2002:a05:6402:34cb:b0:451:61c9:a316 with SMTP id w11-20020a05640234cb00b0045161c9a316mr4244092edc.268.1663336774918; Fri, 16 Sep 2022 06:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663336774; cv=none; d=google.com; s=arc-20160816; b=U3J1JBDhm/3W0ZPjiCm1fmU2Lr7mxufjcV8pKftne/6vvW7NcCW84/V1mb1kzTfykB Hty1RbDQpK2eEhydB1NHicimsf9tDn/S5ZFxAR3UA8+8foLPD7eIqRRZlQwdWhgw0Bmt Opz+JxZ/AFffU/aFqqx+gEB+newUandQA9Wzr4/FDnMOAoYgr6tauXP7pRx4INR2jolW aN5MlUqgP/J+wH7ax8YGAYFENwfX5PSIxeF5wARWGSmU5D18WdUDCSubnPgcYPjzyzRN CnGOoMMuzOcXauNq4E4sDWtxZ4AuTyURXbI1ijm7kztbu9GdvDOYelsEfH77TdRowlUh zajQ== 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=2dnMhylsNrNsNLItMEnZ43T1oVmtAZreKgxBvaT/9eo=; b=mrqOF+pk356HSJYsqTho/IExhsTuFUeawFaaIwSBu+yW03tmZwpG/e8MID/y3aB3CG mF9UwBWZI0ikUE11rXqMOyBihl2aDS7ngQS58oXeiLJfn70bN+autt/8IkFU8KXpxLvZ FlZA3rcOqY2I7Kkm3uz7aZ4btT5IzUTBMr5VeuafpEYujt92o0/0FlQoQzo6Vypam5tN FAQf2qt0dTDWUyZgtr+e1LBfp/rZDY2yK7t590opKYWzV1+i6FNl/rq06u7qwJlnGxkS +TJTy1zueFJ+P52pZJseo4rC5Z5R8HHQDtoIfWk/5RnyHkRvA0s0ytFpSGTKQQery965 5GMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WpegKpyF; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a056402194b00b00451f43411a3si2119316edz.255.2022.09.16.06.59.08; Fri, 16 Sep 2022 06:59:34 -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=@kernel.org header.s=k20201202 header.b=WpegKpyF; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbiIPNrq (ORCPT + 99 others); Fri, 16 Sep 2022 09:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230000AbiIPNro (ORCPT ); Fri, 16 Sep 2022 09:47:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B0D2AC269; Fri, 16 Sep 2022 06:47:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AB9CDB82712; Fri, 16 Sep 2022 13:47:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B818C4347C; Fri, 16 Sep 2022 13:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663336058; bh=2dnMhylsNrNsNLItMEnZ43T1oVmtAZreKgxBvaT/9eo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WpegKpyFx502rj7lii0952PB7E29T2o6SKpt5+eOm17Rex6a67317SXQC9dyUngWu 1iklOJTELRNuojJa0ZYt3v8qDTpUUiPkpgTlemBFdSGsvR7XVU+0VDYahNz5Eg46hX SFQ2U/YPRZBwkgPgwXZVc9wp+zX0gbxh1H+jChxIeTscJcBbD9VtB0YFinoMUuB/LE ihBOFCRKNX7oxRnPQZud6r3263tFIWrbhadXRL2BN748PfNOwVNZ3JzE0gue4vl/Lj GOZIo2gglPQVFWQ6GH0GSKSUGvGtS15DQ3PfH8Wk1yv8n6jhGFhj5MKsZs5/McMa0m UUPCRQA0z4P6g== Received: by mail-vs1-f44.google.com with SMTP id u189so22739525vsb.4; Fri, 16 Sep 2022 06:47:38 -0700 (PDT) X-Gm-Message-State: ACrzQf1YxQpEKFFM4FnjudexdQuBToTsH9UJZjda/yWCjC0O1Vq7miRq f0HHePEAG/Qui1TmujhpOcn11LIQZS1+3HUilg== X-Received: by 2002:a67:c097:0:b0:390:d097:df91 with SMTP id x23-20020a67c097000000b00390d097df91mr1987519vsi.85.1663336057260; Fri, 16 Sep 2022 06:47:37 -0700 (PDT) MIME-Version: 1.0 References: <20220914151145.73253-1-brgl@bgdev.pl> In-Reply-To: From: Rob Herring Date: Fri, 16 Sep 2022 08:47:26 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] gpiolib: TODO: add an item about GPIO safe-state To: Linus Walleij Cc: Bartosz Golaszewski , Kent Gibson , Andy Shevchenko , Drew Fustini , Marek Vasut , Geert Uytterhoeven , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, Sep 16, 2022 at 8:12 AM Linus Walleij wrote: > > On Fri, Sep 16, 2022 at 9:11 AM Bartosz Golaszewski wrote: > > > Of course we were not the first ones to think about it... > > :D > > > I'll read through it later. Was there any particular reason why this > > never made its way into the kernel? > > Inability to drive through a DT binding that was acceptable for the > DT binding maintainers. AFAICT, this came up briefly in 2015, then 2017, then 2019. (You're a year late this time.) A nice regular pattern to not get something upstream... > A good idea to get it passed I think would be to ask Rob (with some > examples) how he thinks it should look and finalize the bindings > before coding. My issue was more that by the time the kernel or even bootloader runs, quite a bit of time has passed given all the firmware that runs nowadays. Doesn't a safe state need to be set as early as possible? Like probably before anything using DT? A node per GPIO could end up being a lot of nodes and I can certainly see folks just initializing every GPIO. That would be a lot of bloat. As I see it we need 4 bits per line: direction, state(high/low), pull up/down/none. Finally, don't non-GPIO pins need the same thing? You don't want a default output driving what needs to be an input. Of course, a good h/w designer wouldn't design such a thing. Rob