From patchwork Fri Sep 20 17:41:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174152 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2785343ill; Fri, 20 Sep 2019 10:39:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqycM54gG82BEQLonk0AvC7fVko0M8f4I3hOt7cZbhgK3NaWcNKUebTkr5a4VVlQ2QRkZV82 X-Received: by 2002:aa7:c5c1:: with SMTP id h1mr23024531eds.10.1569001140727; Fri, 20 Sep 2019 10:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569001140; cv=none; d=google.com; s=arc-20160816; b=M7WRrh45pIPox+LgxEjW8oQr4UupOf/t2XsETa5JZCeL/C5W9Vra/VnItQzp2F51Om /sBnmyUhZH1Mr0rNloDFwN5MD6kwTWdZeS5UGyEjdrvCAefDTXQ9siBTXyFuvZ15eWif csOl+ycMNI0Lea9lMCY4V2JevEARyQiQoVAXqMoezyByF06llyyfJM1pErxtBxeN5YvH RYJqcBaXT+RW4qAkgZI+flmgWPKD44UtmAosptY4XCH/TyYh8ijN6hd3GmXuzAcQVnHU G3rlaJwKdSruiJhefbN24yZ8CTyAtxjKRrC7tuPJTqKBKRXcjoIVX4mJ1qlhufG9ZpPZ BLFA== 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=WmQo8kEFq//i7IWrs59n0bNmz9XqwB+1jjfjGqIiooY=; b=bejQzFLKmdUE++Bl32bNV15Q6fRw71Txks9jn7ZU5KQbmKMgorO3HRpW+ju3+INOnY xSfeh+BVgkWhBnIz9y9fHNfV0RIob4aakMemWkHOXizgKWWyPqrtYo6XfXPZ0ZpQktrZ oXb1OkuYeC2vwPsfN7UhdPF0DiMgctjlcvaBt5qYUP5IprPg7PGodFkIVl0VZ61dxYnq /yljOPQ1P8jYoOLGLm4KjVc7kUocFoF5IlnpIRMZViyppEnYcoboAtpVzRsSRRzwqxGq uaU2AKD9KU2VZ7QNmm/NOGk146zLBUUwmQ4RLDpticl2HTjuc8OAk05NMZZc5aw55V7Y gC4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ht1k1ec+; 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 p15si1819397eda.294.2019.09.20.10.39.00; Fri, 20 Sep 2019 10:39:00 -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=ht1k1ec+; 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 S2393639AbfITRi6 (ORCPT + 26 others); Fri, 20 Sep 2019 13:38:58 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:60786 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392269AbfITRia (ORCPT ); Fri, 20 Sep 2019 13:38:30 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KHcQkp019944; Fri, 20 Sep 2019 12:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569001106; bh=WmQo8kEFq//i7IWrs59n0bNmz9XqwB+1jjfjGqIiooY=; h=From:To:CC:Subject:Date; b=ht1k1ec+GhexCpCwoE76mdeq/tqxQhYL6kNW5zwF6uIWJIRlPudLMadU21r14hWBI YtzbALdwo3Rjg1pyBi83XlZcnNkjhNg0/xhGfU9CMOSoRWksBHpCuSsUNvEEIcdcmh IMoVWR9uCQ5M817kX4pQpa/plhvMQkm8L/QW5BmE= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8KHcQxm013162 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Sep 2019 12:38:26 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) 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; Fri, 20 Sep 2019 12:38:21 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) 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; Fri, 20 Sep 2019 12:38:22 -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 x8KHcQdD107406; Fri, 20 Sep 2019 12:38:26 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v8 0/9] Multicolor FW v8 update Date: Fri, 20 Sep 2019 12:41:30 -0500 Message-ID: <20190920174139.30079-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 Per request I removed the ops structure. But there is a potential need for some device drivers to have a call back that sets the intesity of the LED color without modifying the hardware register. The hardware registers are only updated when the brightness_set is called. The need arises with the LP50xx chip series where the chip has 2 control knobs to modify the output current to the LED. In most cases drivers only have a single brightness register for a given iOUT pin. But the LP50xx has a brightness register that controls cluster brightness and individual registers to control the monochrome LED intensity. The set_color_brightness call back has been simplified in the LP50xx device driver so that it can cache the LED intensity in it's stack for a specific color as opposed to having to call back into the MC FW for the current intensity which made the driver complex. Once the set_brightness is called the driver can set the brightness and then set the LED intensity registers if the driver has that ability. Dan Dan Murphy (9): leds: multicolor: Add sysfs interface definition documention: leds: Add multicolor class documentation 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 leds: Update the lp55xx to use the multi color framework .../ABI/testing/sysfs-class-led-multicolor | 43 + .../bindings/leds/leds-class-multicolor.txt | 95 +++ .../devicetree/bindings/leds/leds-lp50xx.txt | 148 ++++ Documentation/leds/index.rst | 1 + Documentation/leds/leds-class-multicolor.rst | 91 ++ drivers/leds/Kconfig | 17 + drivers/leds/Makefile | 2 + drivers/leds/led-class-multicolor.c | 316 +++++++ drivers/leds/led-core.c | 1 + drivers/leds/leds-lp50xx.c | 785 ++++++++++++++++++ drivers/leds/leds-lp5523.c | 13 + drivers/leds/leds-lp55xx-common.c | 131 ++- drivers/leds/leds-lp55xx-common.h | 9 + include/dt-bindings/leds/common.h | 3 +- include/linux/led-class-multicolor.h | 76 ++ include/linux/platform_data/leds-lp55xx.h | 6 + 16 files changed, 1714 insertions(+), 23 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