From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbdLLS7O (ORCPT ); Tue, 12 Dec 2017 13:59:14 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:30794 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbdLLS6c (ORCPT ); Tue, 12 Dec 2017 13:58:32 -0500 From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v3 5/6] leds: lp8860: Add DT parsing to retrieve the trigger node Date: Tue, 12 Dec 2017 12:58:08 -0600 Message-ID: <20171212185809.23880-7-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171212185809.23880-1-dmurphy@ti.com> References: <20171212185809.23880-1-dmurphy@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the ability to parse the DT and set the default trigger mode for the LED. Signed-off-by: Dan Murphy --- v3 - no changes - https://patchwork.kernel.org/patch/10093751/ v2 - no changes drivers/leds/leds-lp8860.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index bc432764c99d..309a73a0c2dd 100644 --- a/drivers/leds/leds-lp8860.c +++ b/drivers/leds/leds-lp8860.c @@ -372,6 +372,10 @@ static int lp8860_probe(struct i2c_client *client, return -ENOMEM; for_each_available_child_of_node(np, child_node) { + led->led_dev.default_trigger = of_get_property(child_node, + "linux,default-trigger", + NULL); + ret = of_property_read_string(child_node, "label", &name); if (!ret) snprintf(led->label, sizeof(led->label), "%s:%s", -- 2.15.0.124.g7668cbc60