Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp943908ybi; Wed, 17 Jul 2019 07:17:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfuxfKL6F515nOUIFglGfuFtmOM2SzSTdXfrU14QBQeDuVziSbZktj+v+pSlijBdsoXC9D X-Received: by 2002:a17:90a:fa12:: with SMTP id cm18mr44080841pjb.137.1563373041561; Wed, 17 Jul 2019 07:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563373041; cv=none; d=google.com; s=arc-20160816; b=vegQBVC52GfCtSaGlZKcuS3xtDoBm7FvPOP6Xqr/Y8uME6Ip4/qFHs4e6maghTvjrr ThCFaYPXZMrGDnToAvCOgZJhWxVeY73oaI/AFwdQodIXLuBw+1s0M4dCdyK2YRlVOt5b iULyj1eC/HLLF4N6WIwlI0a+ApqzHTCXn0ljdvxO5esDAwSPxhAoatvdvtfjgO4TywFS D260+5ka4QjiWjkyL1inOK5ZB0wIVP9VU6LkuFwMLBHnu4o+SBuuFz1McmhMCuMD5nKt xFoEDQqHAOf+MMoMgXOMH1WiCmevneC7jE8ps9D2nPBTmHjNZ43NtuM5szhsfXPEItUg zuPQ== 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; bh=wmbVRRCj0IguumeyCLY5alwgve2QCszThM26fNaNT+Y=; b=T0J57asWnZH4ZjJGGdti/jVqB91nTMuYfyzlHWcyPhASvAvG4FCYCnurp8OI3LF1xX OXi4RfC3SEZwdQ9NXvzRpQecYdHZsIWcbSVm1e5HYcY4l+SSC4o/6AIFrKCd7gsM3sMc yubIn0lzAcTlUpXuJ4kvpj79DB1882IlyrT8KUIP0Bqly8jaStLMtmgRBvsoewxF9tRE CnYVpFZmFIqvZu0IpQeZFlZzpPOqkcwwmEbb+mIew39e6HvB8zdJzLAPZVgIKPVpynAM FNsZ1suSaCxpJsWp7e2Pb0WGKD35iTSubcjFxJmb6EZqDaF1viAYWpYe8JdKrwGCzcQK /aZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FL+rfY1t; 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 m7si23315066pgj.15.2019.07.17.07.17.05; Wed, 17 Jul 2019 07:17:21 -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=FL+rfY1t; 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 S1727690AbfGQOP3 (ORCPT + 99 others); Wed, 17 Jul 2019 10:15:29 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:49622 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbfGQOP3 (ORCPT ); Wed, 17 Jul 2019 10:15:29 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x6HEFJVe036361; Wed, 17 Jul 2019 09:15:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1563372919; bh=wmbVRRCj0IguumeyCLY5alwgve2QCszThM26fNaNT+Y=; h=From:To:CC:Subject:Date; b=FL+rfY1tSw0CRmepUeFIGKWqbgEIkpZ8eJccIH74o24uxCCleH9Zj51c4aCuwdP2Q uFDEUT4yOz8UC6L7x43DFU1HhdEs4ABUw2ArnBm3Qj2hcgltu8QBmD3z7wfQekmEiE GmAp5CHpQv0munbNjwly3GORfeXCHvNCtHsaBsIk= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x6HEFJTe075585 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Jul 2019 09:15:19 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 17 Jul 2019 09:15:18 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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.1713.5 via Frontend Transport; Wed, 17 Jul 2019 09:15: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 x6HEFISC094769; Wed, 17 Jul 2019 09:15:18 -0500 From: Jean-Jacques Hiblot To: , , , , , , CC: , , , , , Jean-Jacques Hiblot Subject: [PATCH v4 0/4] Add a generic driver for LED-based backlight Date: Wed, 17 Jul 2019 16:15:10 +0200 Message-ID: <20190717141514.21171-1-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain 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 This series aims to add a led-backlight driver, similar to pwm-backlight, but using a LED class device underneath. A few years ago (2015), Tomi Valkeinen posted a series implementing a backlight driver on top of a LED device: https://patchwork.kernel.org/patch/7293991/ https://patchwork.kernel.org/patch/7294001/ https://patchwork.kernel.org/patch/7293981/ The discussion stopped because Tomi lacked the time to work on it. changes in v4: - fix dev_err() messages and commit logs following the advices of Pavel - cosmetic changes (indents, getting rid of "? 1 : 0" in led_match_led_node()) changes in v3: - dt binding: don't limit the brightness range to 0-255. Use the range of the underlying LEDs. as a side-effect, all LEDs must now have the same range - driver: Adapt to dt binding update. - driver: rework probe() for clarity and remove the remaining goto. changes in v2: - handle more than one LED. - don't make the backlight device a child of the LED controller. - make brightness-levels and default-brightness-level optional - removed the option to use a GPIO enable. - removed the option to use a regulator. It should be handled by the LED core - don't make any change to the LED core (not needed anymore) Jean-Jacques Hiblot (2): leds: Add managed API to get a LED from a device driver dt-bindings: backlight: Add led-backlight binding Tomi Valkeinen (2): leds: Add of_led_get() and led_put() backlight: add led-backlight driver .../bindings/leds/backlight/led-backlight.txt | 28 ++ drivers/leds/led-class.c | 92 ++++++ drivers/video/backlight/Kconfig | 7 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/led_bl.c | 268 ++++++++++++++++++ include/linux/leds.h | 6 + 6 files changed, 402 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/led-backlight.txt create mode 100644 drivers/video/backlight/led_bl.c -- 2.17.1