Skip to content

Commit 4413ad0

Browse files
committed
Merge tag 'devicetree-fixes-for-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring: - Fix interaction between fw_devlink and DT overlays causing devices to not be probed - Fix the compatible string for loongson,cpu-interrupt-controller * tag 'devicetree-fixes-for-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: treewide: Fix probing of devices in DT overlays dt-bindings: interrupt-controller: loongarch: Fix mismatched compatible
2 parents 531f27a + 1a50d94 commit 4413ad0

File tree

6 files changed

+25
-3
lines changed

6 files changed

+25
-3
lines changed

Documentation/devicetree/bindings/interrupt-controller/loongarch,cpu-interrupt-controller.yaml renamed to Documentation/devicetree/bindings/interrupt-controller/loongson,cpu-interrupt-controller.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
22
%YAML 1.2
33
---
4-
$id: http://devicetree.org/schemas/interrupt-controller/loongarch,cpu-interrupt-controller.yaml#
4+
$id: http://devicetree.org/schemas/interrupt-controller/loongson,cpu-interrupt-controller.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: LoongArch CPU Interrupt Controller
@@ -11,7 +11,7 @@ maintainers:
1111

1212
properties:
1313
compatible:
14-
const: loongarch,cpu-interrupt-controller
14+
const: loongson,cpu-interrupt-controller
1515

1616
'#interrupt-cells':
1717
const: 1
@@ -28,7 +28,7 @@ required:
2828
examples:
2929
- |
3030
interrupt-controller {
31-
compatible = "loongarch,cpu-interrupt-controller";
31+
compatible = "loongson,cpu-interrupt-controller";
3232
#interrupt-cells = <1>;
3333
interrupt-controller;
3434
};

drivers/bus/imx-weim.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
329329
"Failed to setup timing for '%pOF'\n", rd->dn);
330330

331331
if (!of_node_check_flag(rd->dn, OF_POPULATED)) {
332+
/*
333+
* Clear the flag before adding the device so that
334+
* fw_devlink doesn't skip adding consumers to this
335+
* device.
336+
*/
337+
rd->dn->fwnode.flags &= ~FWNODE_FLAG_NOT_DEVICE;
332338
if (!of_platform_device_create(rd->dn, NULL, &pdev->dev)) {
333339
dev_err(&pdev->dev,
334340
"Failed to create child device '%pOF'\n",

drivers/i2c/i2c-core-of.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
178178
return NOTIFY_OK;
179179
}
180180

181+
/*
182+
* Clear the flag before adding the device so that fw_devlink
183+
* doesn't skip adding consumers to this device.
184+
*/
185+
rd->dn->fwnode.flags &= ~FWNODE_FLAG_NOT_DEVICE;
181186
client = of_i2c_register_device(adap, rd->dn);
182187
if (IS_ERR(client)) {
183188
dev_err(&adap->dev, "failed to create client for '%pOF'\n",

drivers/of/dynamic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ static void __of_attach_node(struct device_node *np)
226226
np->sibling = np->parent->child;
227227
np->parent->child = np;
228228
of_node_clear_flag(np, OF_DETACHED);
229+
np->fwnode.flags |= FWNODE_FLAG_NOT_DEVICE;
229230
}
230231

231232
/**

drivers/of/platform.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,11 @@ static int of_platform_notify(struct notifier_block *nb,
737737
if (of_node_check_flag(rd->dn, OF_POPULATED))
738738
return NOTIFY_OK;
739739

740+
/*
741+
* Clear the flag before adding the device so that fw_devlink
742+
* doesn't skip adding consumers to this device.
743+
*/
744+
rd->dn->fwnode.flags &= ~FWNODE_FLAG_NOT_DEVICE;
740745
/* pdev_parent may be NULL when no bus platform device */
741746
pdev_parent = of_find_device_by_node(rd->dn->parent);
742747
pdev = of_platform_device_create(rd->dn, NULL,

drivers/spi/spi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4456,6 +4456,11 @@ static int of_spi_notify(struct notifier_block *nb, unsigned long action,
44564456
return NOTIFY_OK;
44574457
}
44584458

4459+
/*
4460+
* Clear the flag before adding the device so that fw_devlink
4461+
* doesn't skip adding consumers to this device.
4462+
*/
4463+
rd->dn->fwnode.flags &= ~FWNODE_FLAG_NOT_DEVICE;
44594464
spi = of_register_spi_device(ctlr, rd->dn);
44604465
put_device(&ctlr->dev);
44614466

0 commit comments

Comments
 (0)