From nobody Tue Nov 24 11:51:51 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.160.73.65 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795332766; b=B7X8P0mIX4hqsWZRoRdAIJP2Ul7q9OfY9hPh3yv+4wCYO8sOI4lQeCw1V0gvkLsZlVfe rUTpuyNlrxlDlbeAqpS+O/Eah+ITzM2Syf/xQZ17kEm+/Fhj4y/TOyoBwdegVvye+Y2uX 3TqipQT8wQrOPAIelT+RDSn/QslWK4jTz0oR2YhhKslXe87M3bVtrtw+DgvAnJlddIeCi Ym1E/ktYvSNOsqShgue5uDqAUXXKCmAAfJQhPOF9DuyY/HbXDmYIGm28uDzVqx1lVr4w3 UgPDlfowknd+eidcaZDzAOR8moEWL3a2hxvGrYKlWmX19cG+GpVTkKP38Ih5lytTT/Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795332766; h=DMARC-Filter:Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=Z/itzPyaySuUqIwDB1VMmsM811i+UtgNl+TS4HUXl3Q=; b=0NoyDZe/TfaWh3TB85fOe+4cii8tuN1ULz/j0a/dAKcKJKZvx0Tj3Q696/9LWBpFs8dJ rgF4pgW0Odz8SAiMFgeX1g6qrnV7v/tamfOPmWTOgBrq1dKlH/kEm8v3KtDZNYiI36V1E FdHbKa1mV/2c+O/XVgcGxGav7KXWc0qEJ+oSuSXWqDbLIrq5bMU6+BLSagmmIyX/JpTVY Vb43dHRAdgyu5pFgxN/cZQI12V6yV3CRX9om2ojpVhsk9xi6QnL86ZDQcsfYTBkD11qva sgvpoE/OZ9RjjC4B+Ly8vqhky5Gq1MI4etJEW+PdjEN833p0sR8JiEmi7M8WsE3UHSg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=blala.de; spf=pass smtp.mailfrom=blala.de; arc=none smtp.remote-ip=213.160.73.65 Received: from vs81.iboxed.net (vs10.datenmanufaktur-hosting.net [213.160.73.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4168B606A32C; Sun, 22 Nov 2026 07:32:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4168B606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blala.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=blala.de Received: from blala.de (localhost [127.0.0.1]) by vs81.iboxed.net (8.18.1/8.18.1/Debian-6) with ESMTP id 6AM7WdwT026727; Sun, 22 Nov 2026 07:32:39 GMT Received: (from akurz@localhost) by blala.de (8.18.1/8.18.1/Submit) id 6AM7WdSR026726; Sun, 22 Nov 2026 07:32:39 GMT From: Alexander Kurz To: Lee Jones , Pavel Machek , Griffin Kroah-Hartman Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Bjorn Helgaas , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Kurz Subject: [PATCH v2 1/2] leds: leds-mc13783: use unified device property API Date: Sun, 22 Nov 2026 07:32:34 +0000 Message-ID: <20261122073235.26707-2-akurz@blala.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261122073235.26707-1-akurz@blala.de> References: <20261122073235.26707-1-akurz@blala.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace OF-specific API calls with the unified device property variants. Signed-off-by: Alexander Kurz --- drivers/leds/leds-mc13783.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c index 19c1b51475db..82b2062b2280 100644 --- a/drivers/leds/leds-mc13783.c +++ b/drivers/leds/leds-mc13783.c @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #include =20 struct mc13xxx_led_devtype { @@ -114,7 +114,7 @@ static struct mc13xxx_leds_platform_data __init *mc13xx= x_led_probe_dt( { struct mc13xxx_leds *leds =3D platform_get_drvdata(pdev); struct mc13xxx_leds_platform_data *pdata; - struct device_node *child; + struct fwnode_handle *child; struct device *dev =3D &pdev->dev; int i =3D 0, ret =3D -ENODATA; =20 @@ -122,34 +122,34 @@ static struct mc13xxx_leds_platform_data __init *mc13= xxx_led_probe_dt( if (!pdata) return ERR_PTR(-ENOMEM); =20 - struct device_node *parent __free(device_node) =3D - of_get_child_by_name(dev_of_node(dev->parent), "leds"); + struct fwnode_handle *parent __free(fwnode_handle) =3D + device_get_named_child_node(dev->parent, "leds"); if (!parent) return ERR_PTR(-ENODATA); =20 - ret =3D of_property_read_u32_array(parent, "led-control", + ret =3D fwnode_property_read_u32_array(parent, "led-control", pdata->led_control, leds->devtype->num_regs); if (ret) return ERR_PTR(ret); =20 - pdata->num_leds =3D of_get_available_child_count(parent); + pdata->num_leds =3D fwnode_get_child_node_count(parent); =20 pdata->led =3D devm_kzalloc_objs(dev, *pdata->led, pdata->num_leds); if (!pdata->led) return ERR_PTR(-ENOMEM); =20 - for_each_available_child_of_node(parent, child) { + fwnode_for_each_child_node(parent, child) { const char *str; u32 tmp; =20 - if (of_property_read_u32(child, "reg", &tmp)) + if (fwnode_property_read_u32(child, "reg", &tmp)) continue; pdata->led[i].id =3D leds->devtype->led_min + tmp; =20 - if (!of_property_read_string(child, "label", &str)) + if (!fwnode_property_read_string(child, "label", &str)) pdata->led[i].name =3D str; - if (!of_property_read_string(child, "linux,default-trigger", + if (!fwnode_property_read_string(child, "linux,default-trigger", &str)) pdata->led[i].default_trigger =3D str; =20 --=20 2.39.5 From nobody Tue Nov 24 11:51:51 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.160.73.65 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795332765; b=JhKMfu8HnvPQk8PzJhsk+LKqZltBhZolWD3mvr53msVcLcB0dTVR261qMzcyU+Y9/aLc J4HWRgtC9F6kZ7Y8SgMu8bS3r1pCzIuyN8+jMJ97bds9K8IDzs1ZA+icvZ/RFgNBHcCZ4 butAByuzDFYHNNlbsIOF4d6qNg/GZ2oQgnTJURa1xGiDQtDQkuHFLuF6m22v5+RgDDUPG v1mSHQMbBtBXigrpzPVkYsPbvVxZT2ocltf4a0IEmdcbX//50rLACxxZo5ftgbvyuuRuO Lm7ANPx/8MjhUhjSo5utlOWeYchhBNVs6fAofy9et5p3yZ3S1dzBdNCORmllrVBDBrg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795332765; h=DMARC-Filter:Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=RsdGtAkYUsaeCZ/FJRf2seuLAA0egfEZef1GvkXgdf4=; b=l8LglXSqxbcz7itP464P2EncDa4cld21xorPqidI1hCaNcOoOyky28VeltuhvOZnY6Xy gc/lKAGty8+quC4rX66dRazIcMh4Dbt/eQAXbRmwEWRaEyXR/amx69kO4tvsUihhBrTn1 CVApvdtulVB4D99HP0tiwMax9WCb6+nRAqVKb1pxwQ/RZr8BmX3sr8ml1SXdDZsX42ACl 6U2bNmmM7FrmZtNQD9FJR9DGdfFxLqB4UXBBoWL26NCB2o+T3WlSu93Whhk1ZrPj9rUU3 KOXrkIue7KwaVgRwTm6PxUU/Gi/rH1ywWakHL8cFpH5fpwLPBxm0DSMtCI+6F15vl3Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=blala.de; spf=pass smtp.mailfrom=blala.de; arc=none smtp.remote-ip=213.160.73.65 Received: from vs81.iboxed.net (vs10.datenmanufaktur-hosting.net [213.160.73.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4159A606A32A; Sun, 22 Nov 2026 07:32:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4159A606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blala.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=blala.de Received: from blala.de (localhost [127.0.0.1]) by vs81.iboxed.net (8.18.1/8.18.1/Debian-6) with ESMTP id 6AM7WdeX026736; Sun, 22 Nov 2026 07:32:39 GMT Received: (from akurz@localhost) by blala.de (8.18.1/8.18.1/Submit) id 6AM7WdML026735; Sun, 22 Nov 2026 07:32:39 GMT From: Alexander Kurz To: Lee Jones , Pavel Machek , Griffin Kroah-Hartman Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Bjorn Helgaas , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Kurz Subject: [PATCH v2 2/2] leds: leds-mc13783: enable driver for deferred probe Date: Sun, 22 Nov 2026 07:32:35 +0000 Message-ID: <20261122073235.26707-3-akurz@blala.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261122073235.26707-1-akurz@blala.de> References: <20261122073235.26707-1-akurz@blala.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The probe order between mfd and leds has been changed with commit 78efa53e715e ("leds: Init leds class earlier") so that mc13xxx-led driver was not registered any more due to the missing mfd instance. Use module_platform_driver() to replace module_platform_driver_probe(). The former utilizes platform_driver_register(), which allows the driver to defer probing when it doesn't acquire the necessary resources from the mfd device due to probe order. Fixes: 78efa53e715e ("leds: Init leds class earlier") Signed-off-by: Alexander Kurz --- drivers/leds/leds-mc13783.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c index 82b2062b2280..866097be3eb9 100644 --- a/drivers/leds/leds-mc13783.c +++ b/drivers/leds/leds-mc13783.c @@ -109,7 +109,7 @@ static int mc13xxx_led_set(struct led_classdev *led_cde= v, } =20 #ifdef CONFIG_OF -static struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt( +static struct mc13xxx_leds_platform_data *mc13xxx_led_probe_dt( struct platform_device *pdev) { struct mc13xxx_leds *leds =3D platform_get_drvdata(pdev); @@ -163,14 +163,14 @@ static struct mc13xxx_leds_platform_data __init *mc13= xxx_led_probe_dt( return pdata; } #else -static inline struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_= dt( +static inline struct mc13xxx_leds_platform_data *mc13xxx_led_probe_dt( struct platform_device *pdev) { return ERR_PTR(-ENOSYS); } #endif =20 -static int __init mc13xxx_led_probe(struct platform_device *pdev) +static int mc13xxx_led_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; struct mc13xxx_leds_platform_data *pdata =3D dev_get_platdata(dev); @@ -296,13 +296,14 @@ static const struct platform_device_id mc13xxx_led_id= _table[] =3D { MODULE_DEVICE_TABLE(platform, mc13xxx_led_id_table); =20 static struct platform_driver mc13xxx_led_driver =3D { + .probe =3D mc13xxx_led_probe, .driver =3D { .name =3D "mc13xxx-led", }, .remove =3D mc13xxx_led_remove, .id_table =3D mc13xxx_led_id_table, }; -module_platform_driver_probe(mc13xxx_led_driver, mc13xxx_led_probe); +module_platform_driver(mc13xxx_led_driver); =20 MODULE_DESCRIPTION("LEDs driver for Freescale MC13XXX PMIC"); MODULE_AUTHOR("Philippe Retornaz "); --=20 2.39.5