From patchwork Mon Dec 18 20:23:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 122319 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3178560edb; Mon, 18 Dec 2017 12:24:01 -0800 (PST) X-Google-Smtp-Source: ACJfBosqbR/dyjkXbCcJmJOuptbLvKJ60UK4v7UNOssIuvleWAC7F/Ne41F98MpTFIVE7mbeHTYA X-Received: by 10.84.135.162 with SMTP id 31mr856315plj.23.1513628641744; Mon, 18 Dec 2017 12:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513628641; cv=none; d=google.com; s=arc-20160816; b=jihMiYRejjUkqDR8/XjKTSJFJ7MvW+0klspxI9F5LVYJYOzNydLzqiYDw7sfqFRwKa VV7XcewgmxEXNrqDk/BaME8sXyhm5VmFfPK0TayVq0ZeL9bZbuvqTGQdg9rrrl23w5Jt NtdB+xHDTgiQzFZfMmrj/JlpV36L2cpWuB7JZArEbaPK+js5ipbaqot0NLEmA7LziIwE mc8d3RZeKIfJ4K0onorPklpPPAeQOlEgri9v4dr8ETnUWm/NvDpzjubwHXpNM0xzEuyk LLCMM4Gi840YqETGtmLzyYc4amay1h0QH5PmZHOqN/aIUW8upyNgBDhPanGRa24rMeC3 8u2A== 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=S6MVofwLg8Hcv8E30HL8dZQB4+/7J12aDIcqVul+1Lg=; b=DLeuGp/LVmt3AcP2sEQU8JekqcoSsi838ozJwfRpKElFtpFY9aMePOhVZf56YEFlQO dmUr4wB08L7bMu+DNZPwk46SzwOHcQcNURqhK94Cx4+B6jh6J4AprLhJJvJJHOvxanW9 9Cv7SIVXygyP2i7yQbEmcqwV1nPzZdn4mVKtJkjtMONaLrjIUVeCSKxyGZD6x/U8Z3gZ QRy1JozvtqRCTY2gfJBq3NkPjAI3QVyawEXl7szZwo0SBewGnMf7/Hw0xzKuRIylNF4A mC4ALx64pdSxhNeS4BX/x0UYfUohHvHQql8kW6VNolFwe0ZrVyhijmVur6akzJ44aP+e ZGNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=u0gu2JvG; 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 u4si10041812plj.411.2017.12.18.12.24.01; Mon, 18 Dec 2017 12:24:01 -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=u0gu2JvG; 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 S1760478AbdLRUX6 (ORCPT + 28 others); Mon, 18 Dec 2017 15:23:58 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:44564 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759095AbdLRUXg (ORCPT ); Mon, 18 Dec 2017 15:23:36 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBIKNHmh003017; Mon, 18 Dec 2017 14:23:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513628597; bh=6auSA5rlCmePHXyMxFGpFTcQ32YaByNs1/aFUxE14Hs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=u0gu2JvG0QjdlJSTa/0jb0GKzVYTcGokHLZh1EkF3NeG/O43X4UVAzbAMgYdyz850 Iz60ltlNjscWgYsuUQEE/SMu3jsIG+pnmHnXJ/fe+h4plAKtzHP6Cg5zEz1X2kaqev Dw6HpeYXyDN4Aa7Qac9fn9+YIYNQy0jqxAHGCMrU= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNHg9002353; Mon, 18 Dec 2017 14:23:17 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 18 Dec 2017 14:23:17 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 18 Dec 2017 14:23:17 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNHm8017765; Mon, 18 Dec 2017 14:23:17 -0600 Received: from localhost (a0272616local-lt.dhcp.ti.com [172.22.68.73]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vBIKNGx19299; Mon, 18 Dec 2017 14:23:16 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v5 5/6] leds: lp8860: Add DT parsing to retrieve the trigger node Date: Mon, 18 Dec 2017 14:23:06 -0600 Message-ID: <20171218202307.4913-5-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171218202307.4913-1-dmurphy@ti.com> References: <20171218202307.4913-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 --- v5 - No changes v4 - No changes 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 46578fbc36be..bb1d7bbc928c 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",