From patchwork Thu Sep 19 22:20:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 2913831 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C51CBFF05 for ; Thu, 19 Sep 2013 22:21:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5239D202D1 for ; Thu, 19 Sep 2013 22:21:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FEE4202AB for ; Thu, 19 Sep 2013 22:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753374Ab3ISWVE (ORCPT ); Thu, 19 Sep 2013 18:21:04 -0400 Received: from mail-ee0-f51.google.com ([74.125.83.51]:40699 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752183Ab3ISWVD (ORCPT ); Thu, 19 Sep 2013 18:21:03 -0400 Received: by mail-ee0-f51.google.com with SMTP id c1so4490119eek.10 for ; Thu, 19 Sep 2013 15:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=xUu23vWtwduuhBbTE1dEnLDyYSQj0hbkJG/EHqGz/Yc=; b=MYrwYGC9kIkKB3sTV2uStw0luIX8rFl6lCXuMT30h0E/f3+FsrC0IH6HVuiz5+BuLf omGqo7w+FGB61a3B+gNeXOvgeozH2wV3udl6ddcZtfc4/hMu1KchglKdKeoaejxGHnkn BiwXmfSzeIWSHrbn3whrV41Qjsv4fnNtCReWCpoZRn7C5kWijONLCEv/SYV9GhyFjmp8 wi+XEh2OgZ/970WWeI+jgdv5rHQ5AU3AXeGhVnNkNjktKsX4OKkxmJGKCI8u85Ab+8tU 8noYCmOuZ5tOyiOkc6h+5ldoVaSTJPmvWPcjeg+fj9KQGEIB4jVNs0kkzSsf5VFHbDdB iaKA== X-Received: by 10.14.8.72 with SMTP id 48mr5199624eeq.25.1379629261848; Thu, 19 Sep 2013 15:21:01 -0700 (PDT) Received: from pali-elitebook.localnet ([2001:718:1e03:a01::1ca]) by mx.google.com with ESMTPSA id i1sm14551205eeg.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 15:21:01 -0700 (PDT) From: Pali =?utf-8?q?Roh=C3=A1r?= To: Tony Lindgren Subject: Re: [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config Date: Fri, 20 Sep 2013 00:20:58 +0200 User-Agent: KMail/1.13.7 (Linux/3.11.0-1+synaptics-generic; KDE/4.11.1; x86_64; ; ) Cc: Russell King , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org References: <1379541145-25934-1-git-send-email-pali.rohar@gmail.com> <201309192301.58761@pali> <20130919212922.GA27501@atomide.com> In-Reply-To: <20130919212922.GA27501@atomide.com> MIME-Version: 1.0 Message-Id: <201309200020.58671@pali> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, T_TVD_MIME_EPI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thursday 19 September 2013 23:29:22 Tony Lindgren wrote: > * Pali Rohár [130919 14:10]: > > On Thursday 19 September 2013 00:26:43 Tony Lindgren wrote: > > > * Pali Rohár [130918 15:02]: > > > > Without max_current data in board file lp5523 driver > > > > does not change current. > > > > > > Hmm is this a regression or are there other reasons to > > > merge this during the -rc cycle? > > > > I think this is regression, > > drivers/leds/leds-lp55xx-common.c code refuse to change > > led_current sysfs attribute if value is higher than > > max_current specified in board file. And because in board > > file max_current is not specified it is by default zero as > > global variable. So changing led_current is not possible > > because any positive value is more than zero. First I saw > > this behaviour in 3.10, but I forgot to send this patch. > > OK thanks, can you please update the patch description with > that so I can merge it for the -rc cycle? Ideally of course > with the breaking commit too. > > Regards, > > Tony I do not know which commit broke it. There was some change in lp driver which caused that driver not worked with testing applications. Now it should be fixed. So I resending my patch with updated description. RX-51: Add missing max_current to rx51_lp5523_led_config File drivers/leds/leds-lp55xx-common.c refuse to change led_current sysfs attribute if value is higher than max_current specified in board file. By default global C variables are zero, so changing always failed. This patch adding missing max_current and setting it to max value 255. Signed-off-by: Pali Rohár --- arch/arm/mach-omap2/board-rx51-peripherals.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 9326890..d0f857c 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -180,38 +180,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = { .name = "lp5523:kb1", .chan_nr = 0, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:kb2", .chan_nr = 1, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:kb3", .chan_nr = 2, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:kb4", .chan_nr = 3, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:b", .chan_nr = 4, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:g", .chan_nr = 5, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:r", .chan_nr = 6, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:kb5", .chan_nr = 7, .led_current = 50, + .max_current = 255, }, { .name = "lp5523:kb6", .chan_nr = 8, .led_current = 50, + .max_current = 255, } };