From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbdBHToG (ORCPT ); Wed, 8 Feb 2017 14:44:06 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35498 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbdBHTnr (ORCPT ); Wed, 8 Feb 2017 14:43:47 -0500 Subject: Re: [PATCH] leds: pca9532: Extend pca9532 device tree support To: Felix Brack , riku.voipio@iki.fi, rpurdie@rpsys.net, pavel@ucw.cz, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org References: Cc: f.brack@eets.ch From: Jacek Anaszewski X-Enigmail-Draft-Status: N1110 Message-ID: <725c338e-af4c-1332-6c27-462c2dc1b97f@gmail.com> Date: Wed, 8 Feb 2017 20:42:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felix, On 02/08/2017 05:12 PM, Felix Brack wrote: > Hello Jacek, > > On 07.02.2017 21:45, Jacek Anaszewski wrote: >> Hi Felix, >> >> Thanks for the patch. >> >> On 02/07/2017 07:11 PM, Felix Brack wrote: >>> This patch extends the device tree support for the pca9532 allowing LEDs to blink, dim or even being unchanged, i.e. not being turned off during driver initialization. >> >> Isn't it possible to apply desired settings with existing LED subsystem >> brightness file, and delay_on/off files exposed by timer trigger? >> >> Best regards, >> Jacek Anaszewski >> > > This might be a misunderstanding. My patch is not meant to replace > anything for driving the LEDs once the kernel is fully loaded. The LED > subsystem offers quite a lot of possibilities to do this. > > My patch mainly deals with the 'default' state of the LEDs immediately > when the driver gets loaded. > Here is an example: I have a system with a LED named 'RUN' which is > turned on steady by U-Boot (indicating "system booting"). When the > PCA9532 driver loads this LED gets turned off due to initialization. > However I would like it remain lit until later a script will make that > 'RUN' LED blink (indicating "system running"). This script will of > course use the existing LED subsystem to do so. To keep the 'RUN' LED > lit I need the DT property 'default-state' being set to 'PCA9532_KEEP'. It looks like all you need is default-state property. I'd rather avoid exposing prescaler and pwm registers in DT. -- Best regards, Jacek Anaszewski