From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A3D2C54E76 for ; Mon, 20 Nov 2023 12:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dRoFBTwzcEEaa9xMaQs5knOvTmHBXzJ96bzq63b137E=; b=yoS3O3UOrNrF6v gkdfyAA/luqbout6jsMv6EW5Tj5GFZ5kQLRXmMXFBFjtYspe8OA1okvD0gFxjIHpw4+B5G/DTBZ4Z St6kEUPnS9LtodXs8KoeQZXjSiwV/I9ufUMlSrtQECk/FXMBIx43y+C7haxVYHC1kIsNwFyWyk1n4 2Iacz1czXZOoDupnYqKHPy1c9VMePzsL8A6MbIICxehL98Ys+vVGv3jjsZVhfBGK22sv1pMeV26tc CXesBP3vJWresWF0rUOgUyIXGLdR4Gxtr/UntF+CSZbUbYQhpbGWYeRlo/lZU8Fupr0mrbTydUwk9 O9OjnwIzM4FiGMBR2VtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r53WS-00C0n4-26; Mon, 20 Nov 2023 12:37:04 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r53WO-00C0lQ-29 for linux-arm-kernel@lists.infradead.org; Mon, 20 Nov 2023 12:37:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700483820; x=1732019820; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Jrl1NcKeDGclI6yuHqty3MsTSpEiHxqZFGSov5T9IeQ=; b=NqjqN1dfpqubSSFouPtCxTUhd+xtsbiA2FCJtZ+XUhjO2pSKeAML2aVn PJYo4TtgKHd9D+uYuE0E4+UHHrsGyEA+8qXK91x2C5w9vz/NhJxrOy7X6 eo6n1/WHgVnuK/GEgz415hAcs0wQt2zp9QDVbRLxX8HvTqOoNYKQBdxEI X9f1RV5jl4YGUf2iLBiiKkTVdqsGHCYHxeZFR9KX4k6bUGf9kW/7dNOfY BkxJqTeJH4aUYAOGerScUchVyEZG/BAwnZyOA4f8VTfuRCXW5T0ukvQbg ad/99rO2lrh69jsWqP6o21vmt7Yr6g6zKCWW51qifNRDyrPWhVTK+JDbt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="381998629" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="381998629" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 04:36:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="716193513" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="716193513" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 04:36:53 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r53WE-0000000FY0A-2TPQ; Mon, 20 Nov 2023 14:36:50 +0200 Date: Mon, 20 Nov 2023 14:36:50 +0200 From: Andy Shevchenko To: Stefan Wahren Cc: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Pavel Machek , "open list:GPIO SUBSYSTEM" , Lee Jones , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org Subject: Re: [PATCH V2 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails Message-ID: References: <20231118124252.14838-1-wahrenst@gmx.net> <20231118124252.14838-2-wahrenst@gmx.net> <9a9486bb-e737-4384-a581-76880b709758@gmx.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9a9486bb-e737-4384-a581-76880b709758@gmx.net> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231120_043700_781742_0436BFC9 X-CRM114-Status: GOOD ( 20.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 20, 2023 at 01:02:55PM +0100, Stefan Wahren wrote: > Am 20.11.23 um 12:47 schrieb Andy Shevchenko: > > On Sat, Nov 18, 2023 at 01:42:51PM +0100, Stefan Wahren wrote: > > > In case leds-gpio fails to get the GPIO from the DT (e.g. the GPIO is > > > already requested) the driver doesn't provide any helpful error log: > > > > > > leds-gpio: probe of leds failed with error -16 > > > > > > So add a new error log in case devm_fwnode_gpiod_get() fails. ... > > > led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS, > > > NULL); > > > if (IS_ERR(led.gpiod)) { > > > + dev_err_probe(dev, PTR_ERR(led.gpiod), "Failed to get gpio '%pfw'\n", > > > + child); > > > fwnode_handle_put(child); > > > return ERR_CAST(led.gpiod); > > > } > > Thinking more about it. GPIO library already issues bunch of messages. > > > > "using DT ... for ... GPIO lookup" > > "using lookup tables for GPIO lookup" > > "No GPIO consumer ... found" > are these errors or debug messages? Indeed they are on debug level. > I cannot remember that i saw any of them on info level in my case of an > already allocated pin (see patch 2). > > I'm open to place the log within gpiolib, if this a better place. I'm not sure, let's hear GPIO maintainers for that. > > Isn't it enough? -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel