From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756654AbcHXVQ7 (ORCPT ); Wed, 24 Aug 2016 17:16:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58301 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754560AbcHXVQ4 (ORCPT ); Wed, 24 Aug 2016 17:16:56 -0400 Date: Wed, 24 Aug 2016 17:04:08 -0400 From: Greg KH To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Richard Purdie , Jacek Anaszewski , Felipe Balbi , Peter Chen , "linux-usb@vger.kernel.org" , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Jonathan Corbet , Ezequiel Garcia , Matthias Brugger , Boris Brezillon , Geert Uytterhoeven , Stephan Linz , "open list:DOCUMENTATION" , open list , "open list:LED SUBSYSTEM" Subject: Re: [PATCH V3] leds: trigger: Introduce an USB port trigger Message-ID: <20160824210408.GB4305@kroah.com> References: <20160823220404.9887-1-zajec5@gmail.com> <20160824092129.GA23180@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 11:26:27AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 11:21, Greg KH wrote: > > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > >> From: Rafał Miłecki > >> > >> This commit adds a new trigger responsible for turning on LED when USB > >> device gets connected to the specified USB port. This can can useful for > >> various home routers that have USB port(s) and a proper LED telling user > >> a device is connected. > >> > >> The trigger gets its documentation file but basically it just requires > >> specifying USB port in a Linux format (e.g. echo 1-1 > new_port). > >> > >> During work on this trigger there was a plan to add DT bindings for it, > >> but there wasn't an agreement on the format yet. This can be worked on > >> later, a sysfs interface is needed anyway for platforms not using DT. > >> > >> Signed-off-by: Rafał Miłecki > >> --- > >> V2: Trying to add DT support, idea postponed as it will take more time > >> to discuss the bindings. > >> V3: Fix typos in commit and Documentation (thanks Jacek!) > >> Use "ports" sysfs file for adding and removing USB ports (thx Jacek) > >> Check if there is USB device connected after adding new USB port > >> Fix memory leak or two > >> > >> Felipe: I'd like to ask for your Ack before having this patch pushed. > >> --- > >> Documentation/leds/ledtrig-usbport.txt | 49 +++++++ > >> drivers/leds/trigger/Kconfig | 8 ++ > >> drivers/leds/trigger/Makefile | 1 + > >> drivers/leds/trigger/ledtrig-usbport.c | 253 +++++++++++++++++++++++++++++++++ > >> 4 files changed, 311 insertions(+) > >> create mode 100644 Documentation/leds/ledtrig-usbport.txt > >> create mode 100644 drivers/leds/trigger/ledtrig-usbport.c > > > > You are adding sysfs files without adding a Documentation/ABI/ entry, > > please never do that. > > This is the way all LED triggers are documented, I just blindly > assumed it's OK. Could you be a bit more helpful and help me to > understand further steps? Should I drop > Documentation/leds/ledtrig-usbport.txt and add proper entry in > Documentation/ABI/testing? Or should I keep both files? What about > current sysfs of other triggers? Should they be moved/documented in > ABI? In the end, all should be moved into Documentation/ABI/ But for you, might as well start documenting them in there for any new ones so you don't have to just move them later. thanks, greg k-h