Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933703AbcDLM0V (ORCPT ); Tue, 12 Apr 2016 08:26:21 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:36802 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932635AbcDLM0T (ORCPT ); Tue, 12 Apr 2016 08:26:19 -0400 Date: Tue, 12 Apr 2016 14:26:15 +0200 From: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= To: Pavel Machek Cc: Jonathan Woithe , Darren Hart , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fujitsu-laptop: Support radio LED Message-ID: <20160412122615.GB2583@eudyptula.hq.kempniu.pl> References: <1458127687-25366-1-git-send-email-kernel@kempniu.pl> <20160322112738.GA26924@xo-6d-61-c0.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160322112738.GA26924@xo-6d-61-c0.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1659 Lines: 43 Pavel, Either your clock is really off or it took you 3 weeks to get this message out ;) Just letting you know. > > + > > +static enum led_brightness radio_led_get(struct led_classdev *cdev); > > +static void radio_led_set(struct led_classdev *cdev, > > + enum led_brightness brightness); > > + > > +static struct led_classdev radio_led = { > > + .name = "fujitsu::radio_led", > > + .brightness_get = radio_led_get, > > + .brightness_set = radio_led_set > > +}; > > Is the naming consistent with other drivers? I am not entirely clear what you are referring to. If it is the double colon, that seems to be the convention used throughout the platform-driver-x86 tree. If it is the LED's name ("radio_led"), I failed to find a similarly purposed LED in the platform-driver-x86 tree with a name I could reuse. I decided to use the _led suffix to differentiate this LED from the "lamps" already implemented by fujitsu-laptop. > Should there be default trigger so that it works out of the box? I have covered this issue in the lengthy comment attached to this patch: > One last remark is that I think this LED would best be driven by an > inverted airplane mode LED trigger (as proposed by João Paulo Rechi > Vita). As the code for that trigger is not yet merged, I refrained from > setting the default_trigger field in struct led_classdev radio_led. > Perhaps it's a candidate for a follow-up patch in the future. I haven't found a way to make this work the intended way out of the box, not with the currently available set of LED triggers. That being said, I would be happy if someone proved me wrong. -- Best regards, Michał Kępień