From patchwork Tue Dec 5 20:43:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 120753 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp2637028edb; Tue, 5 Dec 2017 12:44:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMb13cxG88MokrFWSoPUUVblMUU8JfUe6Skgus3mzaIsYEPGRTl9sWPDP7XPfm9mzkldWknM X-Received: by 10.101.81.73 with SMTP id g9mr18939634pgq.137.1512506690839; Tue, 05 Dec 2017 12:44:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512506690; cv=none; d=google.com; s=arc-20160816; b=LeOOKWITtgokVvi/wx2PZDvgRM5aPKBrMJVek2lT0QS4E/B+7Cxx1Gj29+aqlf3GZs TpWep+RKPJLpf7brnWlBRVFJ2R/gChalorIvS229Zttzlq2a4Pxw7D1kvdbzaxI6hLa2 ZqfIXK0cbJcw0t3VVw9f6v/J8c2klL94VxVBY+BCC11yFEjjYw0Ne5yXyf4+e+cTicYa 2RN6uPsBECTxWTlJuLT7MFwXSkqYEr72WEwZHMq0V/gZnxX9jIMOxXc6xrMKqaL8DmKA rRJtQYlI4QCM2MECH982Y4F3F/8CbjGzIII+NVzqGjb7cEDV7O9S9XD7K76wfgrGBuYa HRIg== 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=Ejb8GEMbIaI4axuZD7X0sZu/MYEoj5P73TRxlqcEDkQ=; b=DDKHCSZLnBpGLsjxyscZLAmNh8sO4Qu0u75hOhDqX5BKIXB9EWpx8bbtr1IRvXpl+h gXv0vltn+Q45+E3TFLCREM754UK7QjRLhipKpFEL50bTk3jYn6brPKWj3Ha2oyWxJiJ9 smf5/D85iEGaFMbHFmnuXgvEMytT63Xonrp9bWAxi9E7EcMZSf1PPO+bAF2VO8Q5KKP+ Sw23gAclGQvc8wtgfFggjkwZD9A/W7W8jK/8X9F+5xAkunoleIwdUIiKvd2UBf3ZwAWQ 8KatxvOUJ7FTTBztQesSgSHKjlA8uoDaLHoiS4gL0RHD3BuzTMFpUf2C/H8D5WSnjoxr gAnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Sy+j+Drp; 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 p75si660437pfi.396.2017.12.05.12.44.50; Tue, 05 Dec 2017 12:44:50 -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=Sy+j+Drp; 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 S1752391AbdLEUor (ORCPT + 28 others); Tue, 5 Dec 2017 15:44:47 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:22828 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbdLEUnt (ORCPT ); Tue, 5 Dec 2017 15:43:49 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id vB5KhX9m013427; Tue, 5 Dec 2017 14:43:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1512506614; bh=JYK9e+sznGPA0LHtSxvK6/zuTcR7JD+bzJ8kN5+yAq0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Sy+j+DrpnVVavIhkMA9Rf5sPR9vZaQqnE+wbVU66fNU3n4u7tCLYJOP9gs6lkhkPm 0dzcp45kTf+CI1j0z+Ty5ItnKxN9rpTkIWuXPWniP9wVvVR6UWHoOE/cEIyr+FsmPd c7oYFfGQdLDriW7Jz3sGzfMBH6LcHxDT7Sjihgek= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vB5KhXta012522; Tue, 5 Dec 2017 14:43:33 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Tue, 5 Dec 2017 14:43:33 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Tue, 5 Dec 2017 14:43:33 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id vB5KhXoT003807; Tue, 5 Dec 2017 14:43:33 -0600 Received: from localhost (a0272616local-lt.dhcp.ti.com [172.22.93.77]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vB5KhX325081; Tue, 5 Dec 2017 14:43:33 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v2 5/6] leds: lp8860: Add DT parsing to retrieve the trigger node Date: Tue, 5 Dec 2017 14:43:26 -0600 Message-ID: <20171205204327.12111-6-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171205204327.12111-1-dmurphy@ti.com> References: <20171205204327.12111-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 --- 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 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",