From patchwork Mon Dec 4 21:20:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 120593 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp1379687edb; Mon, 4 Dec 2017 13:20:55 -0800 (PST) X-Google-Smtp-Source: AGs4zMZKSkLoho4sqGIuKeHGbPNO9lSrb/ogObDsl0BlYLlphWO1S6BE5LSOXf9pd8lv6ExQz6vc X-Received: by 10.98.13.133 with SMTP id 5mr20738707pfn.112.1512422455491; Mon, 04 Dec 2017 13:20:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512422455; cv=none; d=google.com; s=arc-20160816; b=xCzeh1Gm6RIXY5XX3T+qyvJmus/y+Ak23+mn8sfZq1yag3vYsJ/E/7TA5NFG5wlH9G cLBEIKm9Hy9S17L1pVNWHC9YYVc8Ink6ovA5R5NjAkfBgelmUhm6uDt41w/ucf/c8gnu 2ltZcOn62hZMrO7tajJ7lim1FAQzOX1heJoHNS4xDu/shAw+LSx43dtNlyvIOQkt0O90 9sJpumXLcid82iCsNPqEZu6kXUQq6FPs30WzC3K1n2gFpfv/ixHxW5qas8xpUzxiTxMA I8Y4cmhOnKtzxERhFpp8IFBUSecpaO5KqaENjs+cQazQPPbLHr7aykeMRx2b0cO7ZWf3 O1fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=RXhKZOpQa3JYNebGySCVoDJHLQrJPGZBfsy98+M7h8s=; b=QZ6HMj/B24Q8rH7UAf34OLwDJPt11xh9J9aUttMam3mXU+cM1zgnQ2r5HBwt9Lwfw/ bXqFn8BI1rh8OgEewkBXHBE7Fuhbv5nTfpCzjkzLEiusoWIQNhEGXKS+AuG6MZFic9EU gJls7IAvSesF/ANzTGpj2jjIaeSocwJegSz4GcWlj28vLjABqAtutnRgfigd7OsyC7hA FwRZLn/31D8HCmxKL2LVYseF6NIXk0Hz6w/0W5i4qtp7ORwCoJzSocwBoH8hf+5BQA9g ga72QH6ItdlUUWyb74sKC9OOfxBknlTMaHWNa7kKtCTnoDjOEpnqhK7WMVreMPKJwB2i Zh+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MLn6YGXB; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si8441558pgs.442.2017.12.04.13.20.55 for ; Mon, 04 Dec 2017 13:20:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MLn6YGXB; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752506AbdLDVUy (ORCPT ); Mon, 4 Dec 2017 16:20:54 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:41303 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752557AbdLDVUr (ORCPT ); Mon, 4 Dec 2017 16:20:47 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id vB4LKU14016051; Mon, 4 Dec 2017 15:20:30 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1512422430; bh=yetVlByj7KZJUGLrogqh+DKBW27pDJO6CJ29VyvoIjI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MLn6YGXBvD6IYlAcbQb8eBcoVraRH3/gQOuPsRdZpDGlCuluJOVen6BdKPQmgLIsx j21WdO6+XB/QgRJk1ByezS+x8yfOGGJ1KpGyDPFNSLkz9Kz3zSr/7xmOy0iGw4RRDg bcYLvEPe/58RjjbTcywOacn4Qs++GYni59rgc9Ao= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vB4LKUTW017147; Mon, 4 Dec 2017 15:20:30 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 4 Dec 2017 15:20:30 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 4 Dec 2017 15:20:30 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vB4LKUKr027158; Mon, 4 Dec 2017 15:20:30 -0600 Received: from localhost (a0272616local-lt.dhcp.ti.com [172.22.83.187]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vB4LKT323343; Mon, 4 Dec 2017 15:20:29 -0600 (CST) From: Dan Murphy To: , , , , CC: , , Dan Murphy Subject: [PATCH 4/5] leds: lp8860: Add DT parsing to retrieve the trigger node Date: Mon, 4 Dec 2017 15:20:25 -0600 Message-ID: <20171204212026.14214-5-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171204212026.14214-1-dmurphy@ti.com> References: <20171204212026.14214-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add the ability to parse the DT and set the default trigger mode for the LED. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp8860.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.15.0.124.g7668cbc60 diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index 13d6210cba85..4fed603ee728 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",