From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbcGOHlB (ORCPT ); Fri, 15 Jul 2016 03:41:01 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35958 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbcGOHk4 (ORCPT ); Fri, 15 Jul 2016 03:40:56 -0400 Date: Fri, 15 Jul 2016 09:40:52 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Pavel Machek Cc: sre@kernel.org, kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, samu.p.onkalo@nokia.com, milo.kim@ti.com, toshik@chromium.org, j.anaszewski@samsung.com, cooloney@gmail.com Subject: Re: outdated documentation for lp5523 LED driver? Message-ID: <20160715074052.GE29844@pali> References: <20160715073214.GC13429@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160715073214.GC13429@amd> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 15 July 2016 09:32:14 Pavel Machek wrote: > Hi! > > Documentation says that load/leds are only visible in the load mode, > but that does not seem to be true (kernel 4.4.0 on N900). > > # 1) Legacy interface - enginex_mode, enginex_load and enginex_leds > # Control interface for the engines: > # x is 1 .. 3 > # enginex_mode : disabled, load, run > # enginex_load : microcode load (visible only in load mode) > # enginex_leds : led mux control (visible only in load mode) > > pavel@n900:/sys/class/leds/lp5523:r/device$ ls -al engine* > -rw-r--r-- 1 root root 4096 Jul 6 22:47 engine1_leds > --w------- 1 root root 4096 Jul 6 22:47 engine1_load > -rw-r--r-- 1 root root 4096 Jul 6 23:41 engine1_mode > -rw-r--r-- 1 root root 4096 Jul 6 22:47 engine2_leds > --w------- 1 root root 4096 Jul 6 22:47 engine2_load > -rw-r--r-- 1 root root 4096 Jul 6 23:41 engine2_mode > -rw-r--r-- 1 root root 4096 Jul 6 22:47 engine3_leds > --w------- 1 root root 4096 Jul 6 22:47 engine3_load > -rw-r--r-- 1 root root 4096 Jul 6 22:47 engine3_mode > pavel@n900:/sys/class/leds/lp5523:r/device$ grep . engine*mode > engine1_mode:run > engine2_mode:load > engine3_mode:run > pavel@n900:/sys/class/leds/lp5523:r/device$ On 2.6.28 kernel is present only legacy interface and for this version is above documentation correct. When engine is in "run" or "disabled", then sysfs nodes _load and _leds are invisible. So I suspect that bug is in current kernel code and documentation is correct... So I would propose to fix kernel code to reflect documentation... > I got both the legacy and the firmware interface to work... but the > firmware interface only seems to work once for me. > > How new and old interface are expected to interact with each other is > not clear to me. In my opinion both interfaces could be used. They provide same states load/run but via different sysfs files. > What should be done there? > > Best regards, > Pavel > -- Pali Rohár pali.rohar@gmail.com