From patchwork Tue Oct 8 20:47:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 175558 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6206349ill; Tue, 8 Oct 2019 13:48:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVyhMqYg6ixt9Ia4txWMO+U6J67DCpLYyxwGfy3WqU4Yh3K93nmaahO5L3bU/iEetsHx5I X-Received: by 2002:a17:906:6897:: with SMTP id n23mr2218258ejr.222.1570567706625; Tue, 08 Oct 2019 13:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570567706; cv=none; d=google.com; s=arc-20160816; b=L7sr5hSwhGMZ5jM4XrgN88juFdcEJcxu4B5onnh0Lg23gWnefL0H2k5YuWYYPanEG+ sPLIXX/VIdfK3Vn6CMkRu1pR3kAJ9IZND+tZ3ynUsVgSSNJop1gkjqgnObgP6Mn92wne kLoR9z/1zOXm/LFDkUU9QQzK9ysdRf8FowyhuntboBy0KnhLYcpfMl3MCZMJpDI3l3kM TLpJlB0O0TRGcTSpWyxNCSvgIz0GMJ+CC0Jv7vQRc0r7A4NYv16pbry7q2CL1GfbnrIi kuOYUl0qbemfPI6y6lmuTY5ebmgbKKlWKh1mr2B+QxLmVPppkuU/DC22zhoGV0XHX5ir 5YNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RIZPdNpg2SdM20WeHFZIe6JMySom0l5iF39chY3wOfA=; b=DjIsTWUYLLY2gWDOd2MzFylVJTpzzjIJ9ikl38lZyPcVBh+WPiGTVK8PvcypH7f1sS JqoeX5ipyQmtS37mPVpeBbx4dGjV59pxb4WHvhn8R+LQJSX/cB5qWT07yNobW+HYbBMM 4b4svsvvGjH8fdVxIXOpxWFIerdk2pe2ScFX+mixiHitxHyPyoE3Xxcy5ry1mZJzRT1e bhoYHpsV4qKUygIbaJSUiisXtpTNxlv+vSJ77GdhBmxBXO5A4+3c6uRWW5zwBvUFVDQ8 fd9VKlkboQuMMb8RNaH0CZlJVDX/P6+iviHupDnKrxBmoqPI94KJuMTH7H87aCzTPoep VdLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uUTt0VTR; 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 f7si11344ejt.155.2019.10.08.13.48.26; Tue, 08 Oct 2019 13:48:26 -0700 (PDT) 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=uUTt0VTR; 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 S1731165AbfJHUsZ (ORCPT + 26 others); Tue, 8 Oct 2019 16:48:25 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:43484 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730720AbfJHUsX (ORCPT ); Tue, 8 Oct 2019 16:48:23 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x98KmJkr114884; Tue, 8 Oct 2019 15:48:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570567699; bh=RIZPdNpg2SdM20WeHFZIe6JMySom0l5iF39chY3wOfA=; h=From:To:CC:Subject:Date; b=uUTt0VTR8oGBsLBmETsFyURpPQGu+fvjqfNKWaJdMqR9lyFmFCF1LVaCdFSrAUHl7 HPk26fdc/PzG07G4MXX294lD6hu2GVyXIL6ouqHitwvHl9uq9p51xWKTVEMc+pW6PE m3NrlFeKA/BGuULDkfgzUG4oIAMVXJ+eC2yWUrdQ= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x98KmIx2110702; Tue, 8 Oct 2019 15:48:19 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) 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.1713.5; Tue, 8 Oct 2019 15:48:16 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 8 Oct 2019 15:48:18 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x98KmIFh073086; Tue, 8 Oct 2019 15:48:18 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v11 00/16] Multicolor Framework v11 Date: Tue, 8 Oct 2019 15:47:44 -0500 Message-ID: <20191008204800.19870-1-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e 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 Hello This is v11 of the multicolor framework patchset. This patchet has been tested on LP5523, LP5521, and the LP5012,24 and 36 evms connected to a beagle bone black. For the LP5523/5521 I have tested with both MC and non-MC DT as well as an intermixed DT with color and white LEDs. Changes made based on this series: https://lore.kernel.org/patchwork/project/lkml/list/?series=412400 MC framework: - Added inline functions for when CONFIG_LEDS_CLASS_MULTI_COLOR is not set - Added the output number to the color conversion struct - Fixed devm_* structure function - Fixed permissions for MC files. Also the document. LP50xx: - Added range checking for banked LEDs LP55xx: - Removed grouped_channels and channel_color arrays in favor of the new color coversion structure. - Changed the intensity function to perform all the writing to the device within the childs intensity fn so now the intensity and brightness functions have a similar design but function different. Dan Murphy (16): dt: bindings: Add multicolor class dt bindings documention dt-bindings: leds: Add multicolor ID to the color ID list leds: Add multicolor ID to the color ID list leds: multicolor: Introduce a multicolor class definition dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers leds: lp50xx: Add the LP50XX family of the RGB LED driver dt: bindings: lp55xx: Be consistent in the document with LED acronym dt: bindings: lp55xx: Update binding for Multicolor Framework ARM: dts: n900: Add reg property to the LP5523 channel node ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 channel node ARM: dts: ste-href: Add reg property to the LP5521 channel nodes leds: lp55xx: Add multicolor framework support to lp55xx leds: lp5523: Update the lp5523 code to add intensity function leds: lp5521: Add multicolor framework intensity support leds: lp55xx: Fix checkpatch file permissions issues leds: lp5523: Fix checkpatch issues in the code .../ABI/testing/sysfs-class-led-multicolor | 35 + .../bindings/leds/leds-class-multicolor.txt | 98 +++ .../devicetree/bindings/leds/leds-lp50xx.txt | 148 ++++ .../devicetree/bindings/leds/leds-lp55xx.txt | 155 +++- Documentation/leds/index.rst | 1 + Documentation/leds/leds-class-multicolor.rst | 96 +++ arch/arm/boot/dts/imx6dl-yapp4-common.dtsi | 14 +- arch/arm/boot/dts/omap3-n900.dts | 29 +- arch/arm/boot/dts/ste-href.dtsi | 22 +- drivers/leds/Kconfig | 22 + drivers/leds/Makefile | 2 + drivers/leds/led-class-multicolor.c | 271 ++++++ drivers/leds/led-core.c | 1 + drivers/leds/leds-lp50xx.c | 799 ++++++++++++++++++ drivers/leds/leds-lp5521.c | 20 + drivers/leds/leds-lp5523.c | 39 +- drivers/leds/leds-lp55xx-common.c | 198 ++++- drivers/leds/leds-lp55xx-common.h | 11 + include/dt-bindings/leds/common.h | 3 +- include/linux/led-class-multicolor.h | 143 ++++ include/linux/platform_data/leds-lp55xx.h | 5 + 21 files changed, 2019 insertions(+), 93 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor create mode 100644 Documentation/devicetree/bindings/leds/leds-class-multicolor.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-lp50xx.txt create mode 100644 Documentation/leds/leds-class-multicolor.rst create mode 100644 drivers/leds/led-class-multicolor.c create mode 100644 drivers/leds/leds-lp50xx.c create mode 100644 include/linux/led-class-multicolor.h -- 2.22.0.214.g8dca754b1e