From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbdJTHRU (ORCPT ); Fri, 20 Oct 2017 03:17:20 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:50748 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751818AbdJTHRQ (ORCPT ); Fri, 20 Oct 2017 03:17:16 -0400 X-Google-Smtp-Source: ABhQp+TUiGR1qjF1QXm+NRs42n9KzEOzY+EKRolb97qlNm8LqG6TWJZxf8BXr0mvULNjO8RvKluSTXjAQ9wIZZnRj3Q= MIME-Version: 1.0 In-Reply-To: <20171020033727.21557-2-andrew@aj.id.au> References: <20171020033727.21557-1-andrew@aj.id.au> <20171020033727.21557-2-andrew@aj.id.au> From: Linus Walleij Date: Fri, 20 Oct 2017 09:17:15 +0200 Message-ID: Subject: Re: [RFC PATCH 1/5] gpio: gpiolib: Add core support for maintaining GPIO values on reset To: Andrew Jeffery Cc: "linux-gpio@vger.kernel.org" , Jonathan Corbet , Joel Stanley , Ryan Chen , Rob Herring , Frank Rowand , Charles Keepax , Laxman Dewangan , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , patches@opensource.cirrus.com, "devicetree@vger.kernel.org" , OpenBMC Maillist , linux-aspeed@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 20, 2017 at 5:37 AM, Andrew Jeffery wrote: > GPIO state reset tolerance is implemented in gpiolib through the > addition of a new pinconf parameter. With that, some renaming of helpers > is done to clarify the scope of the already existing > gpiochip_line_is_persistent(), as it's now ambiguous as to whether that > means on suspend, reset or both. Isn't it most reasonable to say persistance covers both cases, reset and/or sleep? This seems a bit like overdefined. So can we say that is this flag is set, the hardware and driver should do its best to preserve the value across any system disruptions. We can change the wording of course, patches welcome for that. But do we really need to distinguish the cases of disruption and whether we cover up for them or not? I would say we can deal with that the day we have a system with two register bits (or similar) where you can select to preserve across sleep, reset, one or the other, AND there is also a usecase such that a user wants to preserve the value across reset but not suspend or vice versa. I suspect that will not happen. Yours, Linus Walleij