From patchwork Thu Nov 17 22:24:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9435379 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC98B60469 for ; Thu, 17 Nov 2016 22:25:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDFF929703 for ; Thu, 17 Nov 2016 22:25:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2EAB29706; Thu, 17 Nov 2016 22:25:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73E1529703 for ; Thu, 17 Nov 2016 22:25:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752820AbcKQWY6 (ORCPT ); Thu, 17 Nov 2016 17:24:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60138 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752808AbcKQWY4 (ORCPT ); Thu, 17 Nov 2016 17:24:56 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B25C8FCEB; Thu, 17 Nov 2016 22:24:55 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-5-116.ams2.redhat.com [10.36.5.116]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAHMOgPY019487; Thu, 17 Nov 2016 17:24:53 -0500 From: Hans de Goede To: Darren Hart , Matthew Garrett , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Henrique de Moraes Holschuh , Richard Purdie , Jacek Anaszewski Cc: ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-leds@vger.kernel.org, Hans de Goede Subject: [PATCH v5 5/6] platform: x86: dell-laptop: Set keyboard backlight led device default trigger Date: Thu, 17 Nov 2016 23:24:40 +0100 Message-Id: <20161117222441.31464-5-hdegoede@redhat.com> In-Reply-To: <20161117222441.31464-1-hdegoede@redhat.com> References: <20161117222441.31464-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 17 Nov 2016 22:24:55 +0000 (UTC) Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Set kbd_led.default_trigger to "kbd-backlight", this will allow user space to be notified of brightness changes through ledtrig_kbd_backlight(). Note this also sets the LED_TRIGGER_READ_ONLY flag since the brightness is hardwired to be controlled by the kbd-backlight hotkey. Signed-off-by: Hans de Goede --- Changes in v5: -This is a new patch in v5 of this patch-set --- drivers/platform/x86/dell-laptop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 14392a0..6c0f047 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -1937,9 +1937,11 @@ static int kbd_led_level_set(struct led_classdev *led_cdev, static struct led_classdev kbd_led = { .name = "dell::kbd_backlight", + .flags = LED_TRIGGER_READ_ONLY, .brightness_set_blocking = kbd_led_level_set, .brightness_get = kbd_led_level_get, .groups = kbd_led_groups, + .default_trigger = "kbd-backlight", }; static int __init kbd_led_init(struct device *dev)