Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3126922pxk; Mon, 21 Sep 2020 06:03:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3coJZNtl76uFw0IUBICYMiS52azwOK2zR9EhFm0HTgy1Y51AqVCS2pzdM36c7JY/R+qNf X-Received: by 2002:a17:906:3791:: with SMTP id n17mr48879691ejc.216.1600693431258; Mon, 21 Sep 2020 06:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600693431; cv=none; d=google.com; s=arc-20160816; b=bq3AZxJai2lXDgzcbq/0C+xdcRC1QoNAcyE1XQWEq7Dnwm1YZa2+LrEb1VAPIJy6hT DXfrGdb+glkGaRkyes5c132q50oRs6nteiJvBUpKx1doqjLyBlmGBeFK7ZWHjwCA8dgW oSfrV727HKWIF1EuAVIFIKZp/QLBm3xPOqwk5ysrJBJ470zp1ubG405F/iiiyPDdmF0V SJr5pI/5+1aJOn1SnBABk8N+2MXG23KkERTwO6oHBkAxrob1HvncvoVOp5Gb4bVTSnUv O8hl+JaehEnMgrh4Z/Ic4SPjdlU7aDXmM9lQVOCbQxlRwDGZcvZ88ehj9xo9sDpLsgwU QNJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Dxf/KP3dojlt4FsmbMwnnw0AoTcSw6k66Fk992w6Wtg=; b=XoLKog2fcAkqu0BHThEEIxhlaUt/uTVuJgXp7iwEzT1jlMmA+LSoURC5k2ICKo0YBX XBQaK7Hjt2YeImdkN/HKmn9en9sl1ehQXPrsHJ21hyvI83E4pZKHMUHgmQ6gfPadRB2O XYH8NDgOM4t93/fgJhNzvg3pwvHTTLddnAr1E3C5QJcXk2b8sLNI8u7sAswuzXjGm4yd URUjSXdBBin8qHnuD3lMk8UIPmbiCoWGmblcXFCn9fuB14gNw0Undt1I2Yq700yGF1w1 0S1oC+B4xZOqQpfD90kk+aQtkNdfl561bFVdeF5m8gHAXhM/hwLUsXaoeVST/YbpoOHV nYsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yd22si10646847ejb.546.2020.09.21.06.03.26; Mon, 21 Sep 2020 06:03:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726913AbgIUNCM convert rfc822-to-8bit (ORCPT + 99 others); Mon, 21 Sep 2020 09:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbgIUNCL (ORCPT ); Mon, 21 Sep 2020 09:02:11 -0400 Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C053C061755; Mon, 21 Sep 2020 06:02:11 -0700 (PDT) Received: from localhost (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id B5654140942; Mon, 21 Sep 2020 15:02:08 +0200 (CEST) Date: Mon, 21 Sep 2020 15:02:08 +0200 From: Marek Behun To: Simon Guinot Cc: linux-leds@vger.kernel.org, Pavel Machek , Dan Murphy , =?UTF-8?B?T25kxZllag==?= Jirman , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Simon Guinot , Vincent Donnefort , Thomas Petazzoni , Linus Walleij Subject: Re: [PATCH leds v1 10/10] leds: ns2: refactor and use struct led_init_data Message-ID: <20200921150208.6a296bc7@nic.cz> In-Reply-To: <20200921125343.GA4828@kw.sim.vm.gnt> References: <20200916231650.11484-1-marek.behun@nic.cz> <20200916231650.11484-11-marek.behun@nic.cz> <20200918130206.GE29951@kw.sim.vm.gnt> <20200918191405.516b51ff@nic.cz> <20200921125343.GA4828@kw.sim.vm.gnt> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Sep 2020 14:53:43 +0200 Simon Guinot wrote: > On Fri, Sep 18, 2020 at 07:14:05PM +0200, Marek Behun wrote: > > On Fri, 18 Sep 2020 15:02:06 +0200 > > Simon Guinot wrote: > > > > > On Thu, Sep 17, 2020 at 01:16:50AM +0200, Marek BehĂșn wrote: > > > > > > Hi Marek, > > > > > > > By using struct led_init_data when registering we do not need to parse > > > > `label` DT property nor `linux,default-trigger` property. > > > > > > > > Also, move forward from platform data to device tree only: > > > > since commit c7896490dd1a ("leds: ns2: Absorb platform data") the > > > > platform data structure is absorbed into the driver, because nothing > > > > else in the source tree used it. Since nobody complained and all usage > > > > > > Well, I probably should have... > > > > > > I am using this driver on the Seagate Superbee NAS devices. This devices > > > are based on a x86 SoC. Since I have been unable to get from the ODM the > > > LED information written in the ACPI tables, then platform data are used > > > to pass the LED description to the driver. > > > > > > The support of this boards is not available mainline yet but it is still > > > on my todo list. So that's why I am complaining right now :) If it is > > > not too much trouble I'd like to keep platform data support in this > > > driver. > > > > > > Thanks in advance. > > > > > > Simon > > > > > > > Simon, what if we refactored the driver to use fwnode API instead of OF > > API? Then if it is impossible for you to write DTS for that device, > > instead of platform data you could implement your device via swnode > > fwnodes. :) > > Yes. That would be perfect. > > Simon BTW if you have access to device schematics I could try to write DTS, with schematics and the current board source file it should not be that hard. But I can't test it, since I don't have the board. Marek