From patchwork Tue Dec 12 18:58:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 121627 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4501757qgn; Tue, 12 Dec 2017 10:59:18 -0800 (PST) X-Google-Smtp-Source: ACJfBovmndCxdlV/6zH21JRv7pYRvJapoiaA/t1T4d+zUgmWy/uwFfiYt56kD1yI5vux6WaUegeL X-Received: by 10.159.242.132 with SMTP id u4mr3227227plr.296.1513105158837; Tue, 12 Dec 2017 10:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513105158; cv=none; d=google.com; s=arc-20160816; b=Ql7FI/KPaak7hEC1osGWQZPokRGnVnfDY+LFJPcv3Q+6cBCg8s7zGbl55sYhjmEkYw mLmCntlICkk4qYas0rIUheRWdQAk+wLygkEtFYAPiN/5tDWPIla+GTkysEvw5SH/XPnV mpTwSxnv514CK6CRBOQawaj5ZC/BeJ/aMziShbILTyHdJR+lcoHVl4P0JBPIl0HJruKQ RmuMpTv2L2B23vw9a1EbWsau1ARjRVYwOYOpAMNDlw8z3hhJ1kxSkK8Ul8t64m+O39E1 MWw23vzl3B2F5CeL1nQCB1t6EFhlHZv3Wwh5rV2XImOwN+EfssmS5pRzU5U288Z1GGEK AF6g== 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=rzzD1mGYs6qS9YIRifkuxDuzqfDzACFQ5zD+YgJmw38=; b=v3c1MlKVhvtCxse1raXQS8PqmwNb/pVWfge4ZOwOl7uNJk/7OD3xlpTIKHxAsO6UNf V5Wvx+bQ6tJMeP+B9py90yv7N8IzrvsCcWFRYwX2DNMrMipSOiAkxE77ZaNXHV5pMELu V/Aoy/PZE+hxhT5GyFYOrObbBsyGFgJYIrK5MS2lPbGNV8R4HetjII9osnDK9vJlq//c dvdIwnoHqp2cPrlOa+kwAEUa1Li+2vSqvUCS54oduT/0x2ArHNDw9yXx5OfrMzo5T2o/ BmQgcAzuAAJIseNTdzHRFaYPoE+B/9vMCe43uwU0BJZZzhizyaOmHuk+oPA7JOp3clYy ebRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=bHUwFnDm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 p124si11902579pga.20.2017.12.12.10.59.18; Tue, 12 Dec 2017 10:59:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=bHUwFnDm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1752599AbdLLS7O (ORCPT + 11 others); 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 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBCIwG7E027865; Tue, 12 Dec 2017 12:58:16 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513105096; bh=5shLYsoEJWnXSPGXi3GOEUNZPHxS5s7tyQwCGa07Ay0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=bHUwFnDm7CJx4qDedYJOqkhXS364RMPXR3Aof6I3SNtAOuQHCUHNUQR4wBqFL0uCo jMzVTgWJtFEE6gO1UZ059kAMp4yWc5GioZt73nddKryo/ioaxgk23vSr526LZUX0NE 2RtU84hdyoBa+gfx3hFpcCDC1XApYyxbQOCA/iKc= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBCIwGud019058; Tue, 12 Dec 2017 12:58:16 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Tue, 12 Dec 2017 12:58:16 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Tue, 12 Dec 2017 12:58:16 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBCIwGsT001846; Tue, 12 Dec 2017 12:58:16 -0600 Received: from localhost (a0272616local-lt.dhcp.ti.com [172.22.69.253]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vBCIwFx25384; Tue, 12 Dec 2017 12:58:16 -0600 (CST) 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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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(+) -- 2.15.0.124.g7668cbc60 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",