From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393AbdHaV2o (ORCPT ); Thu, 31 Aug 2017 17:28:44 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:38081 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbdHaV2m (ORCPT ); Thu, 31 Aug 2017 17:28:42 -0400 X-Google-Smtp-Source: ADKCNb6n3/a73eEzOpoC7QFvgmTZlj9S4PE/AIL0ZU0XQNtNwPJTyFHrAuiBBXSsm/Q498aBXlURCg== Date: Thu, 31 Aug 2017 16:28:40 -0500 From: Rob Herring To: Andrew Jeffery Cc: linux-leds@vger.kernel.org, rpurdie@rpsys.net, jacek.anaszewski@gmail.com, pavel@ucw.cz, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, joel@jms.id.au, openbmc@lists.ozlabs.org Subject: Re: [PATCH v2 1/2] dt-bindings: leds: gpio: Add optional retain-state-shutdown property Message-ID: <20170831212840.ecr2p4nra52xvzrz@rob-hp-laptop> References: <20170828001711.19662-1-andrew@aj.id.au> <20170828001711.19662-2-andrew@aj.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170828001711.19662-2-andrew@aj.id.au> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 28, 2017 at 09:47:10AM +0930, Andrew Jeffery wrote: > On Baseboard Management Controller (BMC) systems it's sometimes > necessary for a LED to retain its state across a BMC reset (which is > independent of the host system state). Add a devicetree property to > describe this behaviour. The property would typically be used in > conjunction with 'default-state = "keep"'. A bit quick on the applying of this... I don't understand how this works. The BMC usecase is interesting but that's fairly irrelevant to the binding. How do you know the GPIO state thru a reset? You're doing a core reset, but not reseting the GPIO controller? When you use 'default-state = "keep"' but not this property? Seems like the same thing to me. Presumably the bootloader would just distinguish between a warm and cold reset to decide whether to re-init the state. Finally, if we do have this property, why is it GPIO specific. You could just as easily have a LED controller IC and want to do the same thing. Rob