Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp587754ybe; Wed, 11 Sep 2019 01:23:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjIP2m2QQgA2FvcUxt4XGYVLBSejDp5Hpqdbydxz/vMdkfYp/ipPaYvFvBCNo9oRvf9qm9 X-Received: by 2002:a50:908c:: with SMTP id c12mr36073001eda.45.1568190237493; Wed, 11 Sep 2019 01:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568190237; cv=none; d=google.com; s=arc-20160816; b=jPnQ2sniGZwiAS3McadipvpOdrhmJ0xWqL8Ws106AfsVaWHVrBUPejsMbV8V38IMOF s0Q1aiUnFjgGsM/2yvpF1qIx1uDMKlE0LeOMKi/Hxggay6aUK5tJWQT2P5FOnS2Uun3Q LkdrQUEv7xw+sDIneYZcW0ZE5/Ung0z6XsOSoTz1PvT5Mc9QRWYIv/NeCIwkztNU5jYk +/GETOV7ZeiygIYPo4EdAomq3fNAQbXrb876YMc1Y7GrS6MlAbdDn1flMwcWenp7qFzb Y0+vJ29D/JBh+JeP4zg+0HntKgV5BvAxGHYDcHC2K/J8BwFR6T6v7qKqdFSDetuBLH1y eKpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=6hgB10uBVZK0rQIzi+iHhmekBmMluywkDWdYmBF2pbA=; b=D1s81a3ZHzNJWF7p2DHtMP2S9JwAfzZOoojo5QNVnjqhQUK+QIU9AD6snOufH9UM9K 58nNuHNW/e81gvBAhLOuSbphAjxh+4CKmtLfGUUtg9N5wi03cbmToraeUWznLpbsbEnD U2KTfNquf4ZkK6Fw0g/szlt/GVIJknqaRgXzDFzAEd6Vc3ZILeoB1+QXetWnGyRtuhqa 1KJjoEmRn3F5EiG3iR93fqXM6mGoXVIT+SN9ynbktVnW7EYn1LXRx8NgM9fX6L6uIB7D K4uSJY9Y3xiAfCV2bA4vmedkSCBT6hMHk8LMOBS0mySS5rMChVNUETiuVdCZduyBLJ4j gSlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="GSn9RC/k"; 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 o12si10189454edr.193.2019.09.11.01.23.33; Wed, 11 Sep 2019 01:23:57 -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="GSn9RC/k"; 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 S1727330AbfIKIUi (ORCPT + 99 others); Wed, 11 Sep 2019 04:20:38 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:47896 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbfIKIUi (ORCPT ); Wed, 11 Sep 2019 04:20:38 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8B8KXQD081400; Wed, 11 Sep 2019 03:20:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568190033; bh=6hgB10uBVZK0rQIzi+iHhmekBmMluywkDWdYmBF2pbA=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=GSn9RC/kiv63g6ebEZZiH40+Yc+zjCiYNkgc90yX1HB6fjg5bdgmIGHND+vHYBsW/ JMfJcVRRcez0EiFoo8dlaSi8zAbcOc2pbTEThHV5mZIf+tGCXA0/rHFOFEE6AIoxjq K1K6Ia992JEtGEidJ+83RyJqLfsuk1JiQEUiZPAE= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8B8KXBC062348 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Sep 2019 03:20:33 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 11 Sep 2019 03:20:33 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) 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, 11 Sep 2019 03:20:33 -0500 Received: from [10.250.98.129] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8B8KVsY087312; Wed, 11 Sep 2019 03:20:32 -0500 Subject: Re: [RESEND,v2 2/2] leds: tlc591xx: Use the OF version of the LED registration function To: Jacek Anaszewski , , CC: , , References: <20190910133814.10275-1-jjhiblot@ti.com> <20190910133814.10275-3-jjhiblot@ti.com> <69b5adc1-08fd-a0bd-b5b7-3943d8027253@gmail.com> From: Jean-Jacques Hiblot Message-ID: <75d93001-9403-4ac4-948f-889b9ca4fa1b@ti.com> Date: Wed, 11 Sep 2019 10:20:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <69b5adc1-08fd-a0bd-b5b7-3943d8027253@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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 On 10/09/2019 22:08, Jacek Anaszewski wrote: > Hi Jean, > > Thank you the patch. > > On 9/10/19 3:38 PM, Jean-Jacques Hiblot wrote: >> The driver parses the device-tree to identify which LED should be handled. >> Since the information about the device node is known at this time, we can >> provide the LED core with it. It may be useful later. >> >> Signed-off-by: Jean-Jacques Hiblot >> Reviewed-by: Tomi Valkeinen >> Acked-by: Pavel Machek >> --- >> drivers/leds/leds-tlc591xx.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c >> index 3d5a4b92f016..10764a62cb71 100644 >> --- a/drivers/leds/leds-tlc591xx.c >> +++ b/drivers/leds/leds-tlc591xx.c >> @@ -207,7 +207,7 @@ tlc591xx_probe(struct i2c_client *client, >> led->led_no = reg; >> led->ldev.brightness_set_blocking = tlc591xx_brightness_set; >> led->ldev.max_brightness = LED_FULL; >> - err = devm_led_classdev_register(dev, &led->ldev); >> + err = devm_of_led_classdev_register(dev, child, &led->ldev); > devm_of_led_classdev_register() has been replaced with > devm_led_classdev_register_ext() recently. Do you have some specific > reason for passing OF node to the LED registration function? Not anymore at this point. I used the OF because the other patchset I posted (leds: Add control of the voltage/current regulator to the LED core) uses the of_node to find a regulator in the node of the LED. Since the regulator stuff is going to need some rework, we can drop this patch. Thanks JJ > Currently this is beneficial only for generic LED name composition > mechanism basing on 'function' and 'color' DT properties so if you > want you can convert the driver to that. Please compare such recent > conversions in linux-leds.git for-next branch [0][1]. > >> if (err < 0) { >> dev_err(dev, "couldn't register LED %s\n", >> led->ldev.name); >> > [0] > https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=a50ff28348934913c46feb7945571329e46c70b3 > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=4dcbc8f8c59f4b618d651f5ba884ee5bf562c8de >