From patchwork Mon Dec 18 20:23:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 122321 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3179270edb; Mon, 18 Dec 2017 12:24:45 -0800 (PST) X-Google-Smtp-Source: ACJfBosFN9kphYpL5XlUHKOBZuYC/CgFDer9+sSM895hvgzxojpZnubNy2OQIWKawTUOHZG/ha3F X-Received: by 10.98.80.208 with SMTP id g77mr824749pfj.201.1513628685470; Mon, 18 Dec 2017 12:24:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513628685; cv=none; d=google.com; s=arc-20160816; b=HyamLvPuNEwuHLcBIn8onwevDt4PMTy1A3QSP8DkG4X9pCWMKserRt3c4wA2thCSlq fAg9kNNqqXdYDQcaLb0Qwo3HdYcmWWSSFsvkqygyabFGrD7TqUuTYFOhMISlhHyS6SN5 z3hVpaU0IOrv7vBAr+SPZt8jsnYRvNX9JGryQmPSwbS24unBn8rFDPljl5pdmYLS2frB o4vfxv+Oaz6jULSrkRd/vJwPVSeTqsgGvDy/Z5kz3c31xsvKFAFHdoQq3nFE5df6qWgE G0LoG9k5s9Q9PCbun7QrcLGUCUqBCeCs+Wc72KIk3ljcjdDLS5q/LURrMQrn5XJNbxyU IMiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature:arc-authentication-results; bh=q0iip/Z2KF9QI8Fks+N9DRL4IpyV7BGNG512iUZiENE=; b=itLWt2gABt295mcWrFAHRG2NsOZQn1T1DIc1QnLY/1BJeBmSOTjmrYZfFl49S1UXbW 4RJUnW1ljupAQCuaSwwkE8P1OERZQRnQlEWGgdoE5+MCtHs6cy1Uk/uNHyrJPdJkk2oI sykw5FBMLOwdDNLm2tS9+WT3SJt7mGAmRY7F6TaHnpiyiirS/Y1Z3r8QOGeA5eBfyUEp uTBAxglPYwhbPDWj1pbsbA8ouW+ZBwY9il5fK/Y+Ue93tQxJmws6uu73sSy5f0lyoGYY N+ZjAh0HiXkB/qnhBNnhdiQ2FocVY9cvRV7mgxUD+cejrkix70jdmBy+XpAh4UHqnPlb k/sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=hSyy8Egn; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 t17si9708538plo.806.2017.12.18.12.24.45; Mon, 18 Dec 2017 12:24:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=hSyy8Egn; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933097AbdLRUYo (ORCPT + 6 others); Mon, 18 Dec 2017 15:24:44 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:30308 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760530AbdLRUYj (ORCPT ); Mon, 18 Dec 2017 15:24:39 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBIKNKLL019701; Mon, 18 Dec 2017 14:23:20 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513628600; bh=KwJq6TqxSj4pvn2OdmVc3rSe0/fEukx8vnLTOFEAxz8=; h=From:To:CC:Subject:Date; b=hSyy8EgnoSObOu3ufDTT8/5ssAcj+lgyq2uvAbNfq26TrS3e5NcjoRouwIM9DkW0q MFD/AZbIx4c9r/x0r+nGoOqL5k6xmR6+9k/v7jc5ZjLnJyt/5CFjl4170CQMIrd89N zj9KJIcDh+e4PFE3USeSNOWdXXAaKWPrVRnfpTA8= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNFoB020160; Mon, 18 Dec 2017 14:23:15 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE109.ent.ti.com (10.64.6.30) 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:15 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE112.ent.ti.com (10.64.6.33) 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:15 -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 vBIKNFU1015746; Mon, 18 Dec 2017 14:23:15 -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 vBIKNEx19276; Mon, 18 Dec 2017 14:23:14 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v5 1/6] dt: bindings: lp8860: Update bindings for lp8860 Date: Mon, 18 Dec 2017 14:23:02 -0600 Message-ID: <20171218202307.4913-1-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Update the lp8860 bindings to fix various issues found. Rename enable-gpio to enable-gpios, update the node name to the device name and indent the node example. Reviewed-by: Rob Herring Signed-off-by: Dan Murphy --- v5 - Update commit message to remove address and size cells - https://patchwork.kernel.org/patch/10108357/ v4 - No changes v3 - Indicatd enable-gpios is active high, moved address and size cells to child node patch and updated parent DT node name - https://patchwork.kernel.org/patch/10093745/ v2 - New patch Documentation/devicetree/bindings/leds/leds-lp8860.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.15.0.124.g7668cbc60 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/leds/leds-lp8860.txt b/Documentation/devicetree/bindings/leds/leds-lp8860.txt index aad38dd94d4b..b9d09acbaa73 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp8860.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp8860.txt @@ -6,22 +6,22 @@ current sinks that can be controlled by a PWM input signal, a SPI/I2C master, or both. Required properties: - - compatible: + - compatible : "ti,lp8860" - - reg - I2C slave address - - label - Used for naming LEDs + - reg : I2C slave address + - label : Used for naming LEDs Optional properties: - - enable-gpio - gpio pin to enable/disable the device. - - supply - "vled" - LED supply + - enable-gpios : gpio pin to enable (active high)/disable the device. + - vled-supply : LED supply Example: -leds: leds@6 { +led-controller@2d { compatible = "ti,lp8860"; reg = <0x2d>; label = "display_cluster"; - enable-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; vled-supply = <&vbatt>; } From patchwork Mon Dec 18 20:23:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 122316 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3178247edb; Mon, 18 Dec 2017 12:23:42 -0800 (PST) X-Google-Smtp-Source: ACJfBov5ewGgKFQ/8bGlbjgzMbVEtBxjjjAJFdq7wZBevp6sjQNeNo3Dy78GiZRsxOb6iYvOZPOr X-Received: by 10.98.19.92 with SMTP id b89mr864494pfj.124.1513628621888; Mon, 18 Dec 2017 12:23:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513628621; cv=none; d=google.com; s=arc-20160816; b=LwLbJnOhPfzaCwRB2omQVUdZ+LT1SC9GBrQPoOgpLtTmY1ITth0cQ5AN9ALsWx96pS JpubRVp6iD/8Gq7p1AQKx21j1P3J7Tz1f6LUi/s1Igx8LVMHOFZupDEEkG6cLeFqg1fY Pa3pTXW2KbS0zEy195kAUIzp225Ujht5b8UmZoAR9YfHK7ivEOBcEP3TsFBTKpfemKD0 LS3cpj2GoTPmUy8tnZ2+6wurFSGS4J8UhSeeFgj67JgY/kBPLLjeb7cAGzFspV+ErkN4 BLgjBDQYu5gdIyhcEuLWaE+MX1EP/BkXuTvBLZLUYk6k+JQa9dXm9OfwQvnboyohjZW9 x4zQ== 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=wwZuk5UQRRhneqvmC58u/3AhkrTAjKHGRJSl8FQ6XHY=; b=itHHh/Kw8cAiKue4BGOUakG+F7RPvUdXHbjtg/P1qlZXKkXyU4P5OSv27guhclnRq8 X7UIElWbf3sboUIQluOtX/7Rx61aYlhMdzM+uDu0YacJu7Sg4+/JK2uPeTddaQHk0qSM FKWYS5/I43Cq64HqgI0UAfdBm9W0DHadv+jWspykBrq8YDO7hwbCmqEdjFF4pYGkD3tA pMo4qHhbzahBdykNn7pK5S2N7sLzuCEKQLE76Ef+gvjUh5g8fWnflDiXXVNjzqu5Z6F2 PKlZ7bvLeZNJcEmSUJV8mY2Qhr5cz7PSnoszAiq/AjUW0UmGPh15f6b5ICNFsAdKAWFK n+JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QVHovCnd; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 n20si9941163pfk.155.2017.12.18.12.23.41; Mon, 18 Dec 2017 12:23:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QVHovCnd; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759862AbdLRUXh (ORCPT + 6 others); Mon, 18 Dec 2017 15:23:37 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:44561 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758129AbdLRUXg (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 vBIKNGjR003009; 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=/ZjbaIq0pV95eKwyvTchKvVtvOwJNB1pwvhVl1jZKxk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QVHovCndvHWu57lO4Nn+5zwE6cG76eKUBWJBuWv382ZCkwE2LFJu5mD5N27MkqjNj raojIHrmMaxI5S0wUwF13q0ztjkSxbR9SCSYnJjLwllkYYYvOgU45LsL+I9BNYxOvz bldKwl+vL0RBj5We91uDJLRzlMiokDgVlxKj/bck= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNFR0002338; Mon, 18 Dec 2017 14:23:15 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE115.ent.ti.com (10.64.6.36) 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:15 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE101.ent.ti.com (10.64.6.22) 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:15 -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 vBIKNFIE021735; Mon, 18 Dec 2017 14:23:15 -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 vBIKNFx19284; Mon, 18 Dec 2017 14:23:15 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v5 2/6] dt: bindings: lp8860: Update DT label binding Date: Mon, 18 Dec 2017 14:23:03 -0600 Message-ID: <20171218202307.4913-2-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Update the lp8860 label binding to the LED standard as documented in Documentation/devicetree/bindings/leds/common.txt Signed-off-by: Dan Murphy --- v5 - Renamed label to just white:backlight - https://patchwork.kernel.org/patch/10108361 Comment was made on patch 4 https://patchwork.kernel.org/patch/10108351/ v4 - No changes v3 - Added address and size cells, updated label with color and inserted spaces around the reg node - https://patchwork.kernel.org/patch/10093749/ v2 - Added reg to child node and made it required Documentation/devicetree/bindings/leds/leds-lp8860.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) -- 2.15.0.124.g7668cbc60 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/leds/leds-lp8860.txt b/Documentation/devicetree/bindings/leds/leds-lp8860.txt index b9d09acbaa73..77ddd22c20dc 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp8860.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp8860.txt @@ -9,20 +9,33 @@ Required properties: - compatible : "ti,lp8860" - reg : I2C slave address - - label : Used for naming LEDs + - #address-cells : 1 + - #size-cells : 0 Optional properties: - enable-gpios : gpio pin to enable (active high)/disable the device. - vled-supply : LED supply +Required child properties: + - reg : 0 + +Optional child properties: + - label : see Documentation/devicetree/bindings/leds/common.txt + Example: led-controller@2d { compatible = "ti,lp8860"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x2d>; - label = "display_cluster"; enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; vled-supply = <&vbatt>; + + led@0 { + reg = <0>; + label = "white:backlight"; + }; } For more product information please see the link below: From patchwork Mon Dec 18 20:23:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 122318 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3178334edb; Mon, 18 Dec 2017 12:23:47 -0800 (PST) X-Google-Smtp-Source: ACJfBouUTMNgwIs8ZaYCCSekdzaMHeYEu11kL9nHAKQobbyZyDtbXwQo2DcJxTQQmpobkNwGqtYx X-Received: by 10.99.52.74 with SMTP id b71mr737142pga.383.1513628627409; Mon, 18 Dec 2017 12:23:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513628627; cv=none; d=google.com; s=arc-20160816; b=t0xl2h+Ixq54f2ukKPV7zorzeiD3eBURApJhkfsrQaq+sYztdP0Uvjk2WpaTYhOUb6 UD6qw/Ww00BDyn93uUj4nOdL8iOfp+z8B1FHVKCI8jkuK2sYnKm4fDbBCMFWN0s/wCVS IJPhZuqVm9/RfKR84woaii6CxRd5cGSYq9w9ShhToatCRF5t5grycEaX59Nb+5NC5pn+ gsDSYpOFA/iiYRiuvM4eguJJVXrGsgW5ixyQt1PwxqrNxZ6hOFxMpHDZD7JcsAOOkMV2 kWVZPMfJOocz0ukPtbplCPjlT1Ixdyy8/fcbGEy9S1FeMxOLzEUUAZGBb448N4y68xD3 N29w== 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=pkTwG05yU5n30uR4mpekqnz6RReBY5tTFhhaTdXVkbM=; b=Sjswm2mW2I4IJjVACnVJcY5qrOWKDHGZfSS6g155mR/OGSvGT/8Xl9VeaG3UWfGL9i S1mNFQ1tXdn393AvzJj2KSjYe6pcBfri8MsBu6KROuoe+3rIi4fx/6jvleFx3QweL4Wl t/SPNmj+Vh9fluffMw9b7UEPnFaBEzAKBefX0dDgo1dnIt154fQajavnA8nBlAGfZ6Nz wxX/VuepbNDrqFMa4lD5GtzahklnncEnmdmzhhWTHiKVtbyR5HTAkS3P6dNFfSVo0K3t bF0FqSs9AijNNXmLlRa0c9soN77oQUGCmwm62n+1+UNgsp4MWRLrGN8b8iaBg6pVD9bc dJng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=A5btqa4W; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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.47; Mon, 18 Dec 2017 12:23:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=A5btqa4W; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760417AbdLRUXn (ORCPT + 6 others); Mon, 18 Dec 2017 15:23:43 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:44563 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758640AbdLRUXg (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 vBIKNI0T003021; Mon, 18 Dec 2017 14:23:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513628598; bh=CZo/butc9lKzSiRbDwreNS99MVV6V29uy7+Ws8JanXY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=A5btqa4WFcLXx5pJFPaSrgxiF1OKeARptPVpYGwtBoNT3NJfWM8wlDNxeTJATbnB5 ZShSBR6hTYxKhcPmx0wB3GQ8MOOwuWJCsQq4TjA2fcdwti214F7DUi6whT+ejPK1ES vdTfghWw2EhzKsOAG+bFERL9Rl5DVci1jK7U7Y48= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBIKNIgK002360; Mon, 18 Dec 2017 14:23:18 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE109.ent.ti.com (157.170.170.41) 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 dlep33.itg.ti.com (157.170.170.75) 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.1261.35 via Frontend Transport; Mon, 18 Dec 2017 14:23:18 -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 vBIKNHD8015769; 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 vBIKNHx19303; Mon, 18 Dec 2017 14:23:17 -0600 (CST) From: Dan Murphy To: , , , , CC: , , , Dan Murphy Subject: [PATCH v5 6/6] leds: lp8860: Various fixes to align with LED framework Date: Mon, 18 Dec 2017 14:23:07 -0600 Message-ID: <20171218202307.4913-6-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Update the driver to conform with the LED framework. Use devm_led_classdev_register Destroy mutex on exit Remove dependency on CONFIG_OF in the driver and move to the Kconfig Update the MODULE_LICENSE to GPL v2 Remove setting of MAX brightness as the LED framework does this. Signed-off-by: Dan Murphy --- v5 - No changes v4 - No changes v3 - no changes - https://patchwork.kernel.org/patch/10093747/ v2 - no changes drivers/leds/Kconfig | 2 +- drivers/leds/leds-lp8860.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) -- 2.15.0.124.g7668cbc60 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 318a28fd58fe..ac4d9d8bf96b 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -347,7 +347,7 @@ config LEDS_LP8788 config LEDS_LP8860 tristate "LED support for the TI LP8860 4 channel LED driver" - depends on LEDS_CLASS && I2C + depends on LEDS_CLASS && I2C && OF select REGMAP_I2C help If you say yes here you get support for the TI LP8860 4 channel diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index bb1d7bbc928c..c7716f774431 100644 --- a/drivers/leds/leds-lp8860.c +++ b/drivers/leds/leds-lp8860.c @@ -399,7 +399,6 @@ static int lp8860_probe(struct i2c_client *client, led->client = client; led->led_dev.name = led->label; - led->led_dev.max_brightness = LED_FULL; led->led_dev.brightness_set_blocking = lp8860_brightness_set; mutex_init(&led->lock); @@ -426,7 +425,7 @@ static int lp8860_probe(struct i2c_client *client, if (ret) return ret; - ret = led_classdev_register(&client->dev, &led->led_dev); + ret = devm_led_classdev_register(&client->dev, &led->led_dev); if (ret) { dev_err(&client->dev, "led register err: %d\n", ret); return ret; @@ -440,8 +439,6 @@ static int lp8860_remove(struct i2c_client *client) struct lp8860_led *led = i2c_get_clientdata(client); int ret; - led_classdev_unregister(&led->led_dev); - if (led->enable_gpio) gpiod_direction_output(led->enable_gpio, 0); @@ -452,6 +449,8 @@ static int lp8860_remove(struct i2c_client *client) "Failed to disable regulator\n"); } + mutex_destroy(&led->lock); + return 0; } @@ -461,18 +460,16 @@ static const struct i2c_device_id lp8860_id[] = { }; MODULE_DEVICE_TABLE(i2c, lp8860_id); -#ifdef CONFIG_OF static const struct of_device_id of_lp8860_leds_match[] = { { .compatible = "ti,lp8860", }, {}, }; MODULE_DEVICE_TABLE(of, of_lp8860_leds_match); -#endif static struct i2c_driver lp8860_driver = { .driver = { .name = "lp8860", - .of_match_table = of_match_ptr(of_lp8860_leds_match), + .of_match_table = of_lp8860_leds_match, }, .probe = lp8860_probe, .remove = lp8860_remove, @@ -482,4 +479,4 @@ module_i2c_driver(lp8860_driver); MODULE_DESCRIPTION("Texas Instruments LP8860 LED driver"); MODULE_AUTHOR("Dan Murphy "); -MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL v2");