Skip to contentSkip to conversation

device property: Add a note to the fwnode.h

PATCH In review Andy Shevchenko 4 participants 4 messages Apr 8, 2025 – Apr 9, 2025

Subsystems (3)
lore
Share & tools
lore

Andy Shevchenko

author reviewer
#0 lore raw

PATCH v3 1/1 device property: Add a note to the fwnode.h

Add a note to the fwnode.h that the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.

The purpose of this note is to give guidance to driver writers to avoid repeating a common mistake.

---

v3: reworded the note, added problem statement into commit message (Rafael)
v2: added "...into the driver" piece at the end to remove ambiguity

 include/linux/fwnode.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/fwnode.h +5 -0
index 87b183595ba1..900ecd8f45a1 100644
@@ -2,6 +2,11 @@
 /*
  * fwnode.h - Firmware device node object handle type definition.
  *
+ * This header file provides low-level data types and definitions for firmware
+ * and device property providers. The respective API header files supplied by
+ * them should contain all of the requisite data types and definitions for end
+ * users, so including it directly should not be necessary.
+ *
  * Copyright (C) 2015, Intel Corporation
  * Author: Rafael J. Wysocki <[email protected]>
  */
Signature · 1 line
2.47.2
reviewer Reviewed-by on v3 1/1
#1 lore raw
Quoted 8 lines · Andy Shevchenko

Add a note to the fwnode.h that the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.

The purpose of this note is to give guidance to driver writers to avoid repeating a common mistake.

Quoted 24 lines

---

v3: reworded the note, added problem statement into commit message (Rafael)
v2: added "...into the driver" piece at the end to remove ambiguity

 include/linux/fwnode.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/fwnode.h +5 -0
index 87b183595ba1..900ecd8f45a1 100644
@@ -2,6 +2,11 @@
 /*
  * fwnode.h - Firmware device node object handle type definition.
  *
+ * This header file provides low-level data types and definitions for firmware
+ * and device property providers. The respective API header files supplied by
+ * them should contain all of the requisite data types and definitions for end
+ * users, so including it directly should not be necessary.
+ *
  * Copyright (C) 2015, Intel Corporation
  * Author: Rafael J. Wysocki <[email protected]>
  */
Signature · 3 lines
Regards,

Sakari Ailus
Reviewed-by on v3 1/1
#2 lore raw
In reply to Andy Shevchenko
Quoted 22 lines · Andy Shevchenko

Add a note to the fwnode.h that the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.

The purpose of this note is to give guidance to driver writers to avoid repeating a common mistake.

---

v3: reworded the note, added problem statement into commit message (Rafael)
v2: added "...into the driver" piece at the end to remove ambiguity

 include/linux/fwnode.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/fwnode.h +0 -0
index 87b183595ba1..900ecd8f45a1 100644
@@ -2,6 +2,11 @@
 /*

include/linux/fwnode.h line 12

Quoted 10 lines
include/linux/fwnode.h +5 -0
  * fwnode.h - Firmware device node object handle type definition.
  *
+ * This header file provides low-level data types and definitions for firmware
+ * and device property providers. The respective API header files supplied by
+ * them should contain all of the requisite data types and definitions for end
+ * users, so including it directly should not be necessary.
+ *
  * Copyright (C) 2015, Intel Corporation
  * Author: Rafael J. Wysocki <[email protected]>
  */
maintainer Reviewed-by on v3 1/1
#3 lore raw
In reply to Andy Shevchenko
Quoted 9 lines · Andy Shevchenko

Add a note to the fwnode.h that the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.

The purpose of this note is to give guidance to driver writers to avoid repeating a common mistake.

Quoted 27 lines

---

v3: reworded the note, added problem statement into commit message (Rafael)
v2: added "...into the driver" piece at the end to remove ambiguity

 include/linux/fwnode.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/fwnode.h +5 -1
index 87b183595ba1..900ecd8f45a1 100644
@@ -2,6 +2,11 @@
 /*
  * fwnode.h - Firmware device node object handle type definition.
  *
+ * This header file provides low-level data types and definitions for firmware
+ * and device property providers. The respective API header files supplied by
+ * them should contain all of the requisite data types and definitions for end
+ * users, so including it directly should not be necessary.
+ *
  * Copyright (C) 2015, Intel Corporation
  * Author: Rafael J. Wysocki <[email protected]>
  */
--

2.47.2