From patchwork Mon Dec 18 20:23:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 122317 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3178314edb; Mon, 18 Dec 2017 12:23:46 -0800 (PST) X-Google-Smtp-Source: ACJfBotwcM/G77VGtHAZE6CSvw/7UqJn+1tSqawClAyiK3OaCxHkJSSWMesu1IY+V8K4t8LzD9w5 X-Received: by 10.159.218.152 with SMTP id w24mr872833plp.43.1513628626498; Mon, 18 Dec 2017 12:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513628626; cv=none; d=google.com; s=arc-20160816; b=UxKsfw4hLudibLpNItOV2lh8fpL7r9IqDjvh2hL1YBtPi+Z8USTB1xZvi5pV6IMm3i xoW+SyIoIPBWEJfYi+Ml2JaU4pnxGAgj5uCgvND3UzKqjxg918Ynf0UXKCaxMaOf9fPM F/dZ/pOo3a8l/d6xxK9GYfN+n/VN3wE0FG0kXlOA8EwiEUabS/9soJNLsOqe3i/onuBA A+RPyI9kSrCCLCeW9NUC+E/xF1nZ37XBlpu6+AhnVTTVm+VwHYwlb19al2tEtT3xLvdn XVHsiJ40ugQ/n9QnupOCU2UKLMM5NpvjgYk4WK9j4ERZHIBxaUCEH/kG1JQBpoeVkUIO jakA== 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=SQOWcowZNPEEgcAsaLhNVLacpoozSEolgLkSzDYJdQI=; b=Vp7dr027wBA+5uPC0Wa6UmKYCYkR6nUiPoFqahn0LLpWHCijKM/JLqHaROu/GTHuPS jnocGaAIFr0JVqMnbNSJjFxQ3Jbe/HbdtmmVBCK1/3P1fnJ+BJcm8HFuiNVIp2B4ImyC Ka4l+Zvpl5oPgsUDf0M6szDQ/nvRTETl5zVTMNA1WgMWyfPswGLlXBsV8+/PHE4REEcR xd4gZnbhmiBQKtCIqS5WLk6jlBTGNyLQxnypuRT8YOoc+YgsGIcIGiehgih7X4mugNFr YNletp0MDH9eawq0s6vYem0XgJeqnlFAnlkTtJUL2njcO8ZX6rpUjx/JBUIfGygYz8OG 5oNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=cQY+NWQ6; 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 a3si8630069pgv.360.2017.12.18.12.23.46; Mon, 18 Dec 2017 12:23:46 -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=cQY+NWQ6; 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 S1760414AbdLRUXm (ORCPT + 28 others); Mon, 18 Dec 2017 15:23:42 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:44562 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758408AbdLRUXg (ORCPT ); Mon, 18 Dec 2017 15:23:36 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBIKNGQP003013; Mon, 18 Dec 2017 14:23:16 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513628596; bh=VVckDxgYw5c7iv0sjQOl/llxXklNfVQ8Oi83rBVXYE4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cQY+NWQ6odKzXVRvHxRB0GmXb+UBSf5SvDlnAU45ASnGQu2uFoLWFkorc3bZZ01BO j/kpPy8I9ZJPoB6kd0CFxacoFbtD8mZPq4Poo8r/kILZq0ZXFDTlQlNk7Nf6uZbilk r4UjmaAHctLdH6LEuoFwzrBNH3tlyi1BJ1u6t9LY= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNGpI020174; Mon, 18 Dec 2017 14:23:16 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE108.ent.ti.com (10.64.6.29) 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:16 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE105.ent.ti.com (10.64.6.26) 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: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 vBIKNGMn015762; Mon, 18 Dec 2017 14:23:16 -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 vBIKNFx19288; Mon, 18 Dec 2017 14:23:15 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v5 3/6] leds: lp8860: Update the dt parsing for LED labeling Date: Mon, 18 Dec 2017 14:23:04 -0600 Message-ID: <20171218202307.4913-3-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 Update the DT parsing for the label node so that the label is retrieved from the device child as opposed to being part of the parent. This will align this driver with the LED binding documentation Documentation/devicetree/bindings/leds/common.txt Signed-off-by: Dan Murphy --- v5 - no changes v4 - Fix checkpatch warning for code indentation - https://patchwork.kernel.org/patch/10108157/ v3 - Changed the label generation to pull the name from the i2c device id as opposed to pulling the id from the parent dt node since that will just be led-controller - https://patchwork.kernel.org/patch/10093753/ v2 - no changes drivers/leds/leds-lp8860.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) -- 2.15.0.124.g7668cbc60 diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index 3e70775a2d54..46578fbc36be 100644 --- a/drivers/leds/leds-lp8860.c +++ b/drivers/leds/leds-lp8860.c @@ -22,6 +22,7 @@ #include #include #include +#include #define LP8860_DISP_CL1_BRT_MSB 0x00 #define LP8860_DISP_CL1_BRT_LSB 0x01 @@ -86,8 +87,6 @@ #define LP8860_CLEAR_FAULTS 0x01 -#define LP8860_DISP_LED_NAME "display_cluster" - /** * struct lp8860_led - * @lock - Lock for reading/writing the device @@ -107,7 +106,7 @@ struct lp8860_led { struct regmap *eeprom_regmap; struct gpio_desc *enable_gpio; struct regulator *regulator; - const char *label; + char label[LED_MAX_NAME_SIZE]; }; struct lp8860_eeprom_reg { @@ -365,19 +364,21 @@ static int lp8860_probe(struct i2c_client *client, int ret; struct lp8860_led *led; struct device_node *np = client->dev.of_node; + struct device_node *child_node; + const char *name; led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); if (!led) return -ENOMEM; - led->label = LP8860_DISP_LED_NAME; - - if (client->dev.of_node) { - ret = of_property_read_string(np, "label", &led->label); - if (ret) { - dev_err(&client->dev, "Missing label in dt\n"); - return -EINVAL; - } + for_each_available_child_of_node(np, child_node) { + ret = of_property_read_string(child_node, "label", &name); + if (!ret) + snprintf(led->label, sizeof(led->label), "%s:%s", + id->name, name); + else + snprintf(led->label, sizeof(led->label), + "%s::display_cluster", id->name); } led->enable_gpio = devm_gpiod_get_optional(&client->dev, From patchwork Mon Dec 18 20:23:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 122320 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3178739edb; Mon, 18 Dec 2017 12:24:12 -0800 (PST) X-Google-Smtp-Source: ACJfBovCrMxydCkz6m8ToEZb53DgDf81TZqFX0Cmy0eQAze3viDvb3Yy3Knfed0cWJHDAi+IcpVs X-Received: by 10.84.247.2 with SMTP id n2mr866353pll.268.1513628652437; Mon, 18 Dec 2017 12:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513628652; cv=none; d=google.com; s=arc-20160816; b=ByUpaeRuMlMCHHm6XJwe7xeLCgeNl5gTeaZ9zej2RgtuWY7Fr8Q5E+iCn79EpDSm0l 8nm7O/dRhYi1x8YRj3ZmnR/U1eYjRgquoV72gSeNwdM3E2E+YDq5mEVAdnxpuYase6ZA +vW/8nnpZ0V1ctrA09si5EcS+C8LNfC6UwsKn8dXyIghSqzmXKGlkOW9Bp2sq0uyw3R0 4Sj2JKZm+GD+lakabgIrexJn3WpLDMjND/n6kZTf8eSDS59vCShzwvYgc8vyngCadjJ5 +8wUE4w8kaejEzbwNXxrOomwHjpSs5fGan+SbFuXXHe6KTId99R1ClPE4vymVq//xGqM E6EQ== 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=mnQQ9Zkezt/9sN2/crSwRWDnw6nd4ugGVQ1SsgUzNx4=; b=vGlGKuyjUqyBdr9937CDyeqdg+uVXlXEoUp8rA9sdBYe+EU+QjhbCcnDS1Clx4N2kh UOcl04WbU5+Tx9Z5qSAJH5ZW677nQqgdTIcR9bvnLXKkWgj/kQcgDm+4yTtylaUYob5x 3ZRBavg0io/RGRI21Z73OAilQ8J91fMSRx6o+WY34uoUvIIQviWH1oTdNc6JxJXOzP71 6MMNUaHqhTK+geyOvgOm+tO+803ITdk9m2NEKIoJ854m4RWOKMI4t0f34FFRk6mWT0ln ZBENhi9a864Ww1QksQvl15PvWS7gM9wQBXKuY5+6p/dFKJciP5TmGvfuPO1JnRNJs6KP tyog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vOW38Rpw; 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.12; Mon, 18 Dec 2017 12:24:12 -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=vOW38Rpw; 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 S1760459AbdLRUXx (ORCPT + 28 others); Mon, 18 Dec 2017 15:23:53 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:38754 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752970AbdLRUXg (ORCPT ); Mon, 18 Dec 2017 15:23:36 -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 vBIKNHRG029629; 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=AjPWXvSWwUo6IJbEjax0cR3iRWzajsPUynvFu5GSsV0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vOW38Rpw+NOwOFUPlJ1d7PplImP16tSvdLq12aWIyNQ2cNodcwSWX0w/1UAgbTq4v bheZS6BbfbhCtVQfZyA6t14fEy187MaGASevzi/IRhmLSg29g9CjhTl48X4zAlH7ZO gct6QaBdaXyeaIOr45M+7GjMly7pnlCrq3rkQiYw= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNHMv002347; Mon, 18 Dec 2017 14:23:17 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE114.ent.ti.com (157.170.170.25) 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:16 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE115.ent.ti.com (157.170.170.26) 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:16 -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 vBIKNGhE017755; Mon, 18 Dec 2017 14:23:16 -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 vBIKNGx19294; Mon, 18 Dec 2017 14:23:16 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v5 4/6] dt: bindings: lp8860: Add trigger binding to the lp8860 Date: Mon, 18 Dec 2017 14:23:05 -0600 Message-ID: <20171218202307.4913-4-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 a default trigger optional node to the child node. This will allow the driver to set the trigger for a backlight. Signed-off-by: Dan Murphy --- v5 - No changes v4 - No changes v3 - Removed optional and rebased - https://patchwork.kernel.org/patch/10093755/ v2 - Moved binding changes to first patch in the series. Documentation/devicetree/bindings/leds/leds-lp8860.txt | 3 +++ 1 file changed, 3 insertions(+) -- 2.15.0.124.g7668cbc60 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/leds/leds-lp8860.txt b/Documentation/devicetree/bindings/leds/leds-lp8860.txt index 77ddd22c20dc..5f0e892ad759 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp8860.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp8860.txt @@ -21,6 +21,8 @@ Required child properties: Optional child properties: - label : see Documentation/devicetree/bindings/leds/common.txt + - linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt Example: @@ -35,6 +37,7 @@ led-controller@2d { led@0 { reg = <0>; label = "white:backlight"; + linux,default-trigger = "backlight"; }; } 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",