From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacek Anaszewski Subject: Re: [PATCH] leds: leds-pca963x: add nxp,leds-suspend property Date: Wed, 05 Oct 2016 15:11:32 +0200 Message-ID: <65b2fdc5-549d-555c-fefe-70d856ea4ca5@samsung.com> References: <1475634572-18274-1-git-send-email-matt@ranostay.consulting> <0ba8033f-d0b3-8b2f-8ff4-fa47dcf50ba1@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-reply-to: Sender: linux-leds-owner@vger.kernel.org To: Matt Ranostay Cc: Rob Herring , Linux LED Subsystem , "devicetree@vger.kernel.org" , Matt Ranostay , Richard Purdie List-Id: devicetree@vger.kernel.org On 10/05/2016 02:22 PM, Rob Herring wrote: > On Wed, Oct 5, 2016 at 3:09 AM, Jacek Anaszewski > wrote: >> Hi Matt, >> >> On 10/05/2016 04:29 AM, Matt Ranostay wrote: >>> >>> Allow the LED subsystem to blank the LEDS on suspend. >>> >>> Cc: Richard Purdie >>> Cc: Jacek Anaszewski >>> Signed-off-by: Matt Ranostay >>> --- >>> Documentation/devicetree/bindings/leds/pca963x.txt | 1 + >>> drivers/leds/leds-pca963x.c | 9 +++++++++ >>> include/linux/platform_data/leds-pca963x.h | 6 ++++++ >>> 3 files changed, 16 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/leds/pca963x.txt >>> b/Documentation/devicetree/bindings/leds/pca963x.txt >>> index dafbe9931c2b..61b1f037ebd0 100644 >>> --- a/Documentation/devicetree/bindings/leds/pca963x.txt >>> +++ b/Documentation/devicetree/bindings/leds/pca963x.txt >>> @@ -7,6 +7,7 @@ Optional properties: >>> - nxp,totem-pole : use totem pole (push-pull) instead of open-drain >>> (pca9632 defaults >>> to open-drain, newer chips to totem pole) >>> - nxp,hw-blink : use hardware blinking instead of software blinking >>> +- nxp,leds-suspend : turn off LEDS on system suspend >> >> >> How about making this property generic and adding it to the common LED >> bindings? >> >> Cc Rob. > > Fine with me though seems like keeping on would be less common. Maybe > "keep-in-suspend". Also, if this is a user decision, then it should be > a sysfs attr and shouldn't be in DT. Matt, did you have any specific reason for making it configurable? I like the idea of adding generic sysfs attribute for that, which would allow for customizing behaviour for a LED used as torch. I believe that in most use cases the user doesn't want that the LED used as torch went off on suspend. -- Best regards, Jacek Anaszewski