device property: Don't split fwnode_get_irq*() APIs in the code
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/1 device property: Don't split fwnode_get_irq*() APIs in the code
New fwnode_get_irq_byname() landed after an unrelated function by ordering. Move fwnode_iomap(), so fwnode_get_irq*() APIs will go together.
No functional change intended.
---
Since the original code is piped via I2C tree, this one keeps the same route.
drivers/base/property.c | 32 ++++++++++++++++---------------- include/linux/property.h | 6 +++--- 2 files changed, 19 insertions(+), 19 deletions(-)
drivers/base/property.c +16 -16
@@ -895,6 +895,22 @@ int device_get_phy_mode(struct device *dev) }EXPORT_SYMBOL_GPL (device_get_phy_mode); +/** +* fwnode_iomap - Maps the memory mapped IO for a given fwnode +* @fwnode: Pointer to the firmware node +* @index: Index of the IO range +* +* Returns a pointer to the mapped memory. +*/ +void __iomem *fwnode_iomap (struct fwnode_handle *fwnode,int index) +{ +if (IS_ENABLED (CONFIG_OF_ADDRESS ) &&is_of_node (fwnode)) +return of_iomap (to_of_node (fwnode), index); + +return NULL ; +} +EXPORT_SYMBOL (fwnode_iomap); +/** * fwnode_irq_get - Get IRQ directly from a fwnode * @fwnode: Pointer to the firmware node
@@ -919,22 +935,6 @@ int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) }EXPORT_SYMBOL (fwnode_irq_get); -/** -* fwnode_iomap - Maps the memory mapped IO for a given fwnode -* @fwnode: Pointer to the firmware node -* @index: Index of the IO range -* -* Returns a pointer to the mapped memory. -*/ -void __iomem *fwnode_iomap (struct fwnode_handle *fwnode,int index) -{ -if (IS_ENABLED (CONFIG_OF_ADDRESS ) &&is_of_node (fwnode)) -return of_iomap (to_of_node (fwnode), index); - -return NULL ; -} -EXPORT_SYMBOL (fwnode_iomap); -/** * fwnode_irq_get_byname - Get IRQ from a fwnode using its name * @fwnode: Pointer to the firmware node
include/linux/property.h +3 -3
@@ -123,8 +123,6 @@ void fwnode_handle_put(struct fwnode_handle *fwnode);int fwnode_irq_get (const struct fwnode_handle *fwnode,unsigned int index);int fwnode_irq_get_byname (const struct fwnode_handle *fwnode,const char *name); -void __iomem *fwnode_iomap (struct fwnode_handle *fwnode,int index); -unsigned int device_get_child_node_count (struct device *dev); static inline bool device_property_read_bool(struct device *dev,
@@ -388,8 +386,10 @@ enum dev_dma_attr device_get_dma_attr(struct device *dev);const void *device_get_match_data (struct device *dev);int device_get_phy_mode (struct device *dev); -int fwnode_get_phy_mode (struct fwnode_handle *fwnode); + +void __iomem *fwnode_iomap (struct fwnode_handle *fwnode,int index); +struct fwnode_handle *fwnode_graph_get_next_endpoint (const struct fwnode_handle *fwnode,struct fwnode_handle *prev); struct fwnode_handle *
Signature · 1 line
2.34.1
Sakari Ailus
reviewerHi Andy,
Quoted 5 lines · Andy Shevchenko
New
fwnode_get_irq_byname()landed after an unrelated function by ordering. Movefwnode_iomap(), so fwnode_get_irq*() APIs will go together.No functional change intended.
I have no problem with the patch as such, but I have four patches moving the implementation of this and other similar functions to OF and ACPI frameworks. I moved what was here to OF/ACPI FWs as part of the fwnode graph API implementation but some firmware type checks have crept back in since that.
I'd prefer to prepend this patch to the rest of the set I have and get it all merged through linux-pm tree, on the dependent patch reaches it.
Signature · 3 lines
Kind regards, Sakari Ailus
Quoted 2 lines · Sakari Ailus
I'd prefer to prepend this patch to the rest of the set I have and get it all merged through linux-pm tree, on the dependent patch reaches it.
I rebased mine on this patch and I was quite surprised to see it doesn't conflict! So either way works fine for me.
Signature · 1 line
Sakari Ailus
Andy Shevchenko
reviewerQuoted 8 lines · Sakari Ailus
Quoted 2 lines · Sakari Ailus
I'd prefer to prepend this patch to the rest of the set I have and get it all merged through linux-pm tree, on the dependent patch reaches it.
I rebased mine on this patch and I was quite surprised to see it doesn't conflict! So either way works fine for me.
Reviewed-by Sakari Ailus <[email protected]>
Thank you, Sakari!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rafael J. Wysocki
maintainerQuoted 6 lines · Andy Shevchenko
Quoted 4 lines · Sakari Ailus
Quoted 2 lines · Sakari Ailus
I'd prefer to prepend this patch to the rest of the set I have and get it all merged through linux-pm tree, on the dependent patch reaches it.
Quoted 6 lines
Quoted 4 lines
I rebased mine on this patch and I was quite surprised to see it doesn't conflict! So either way works fine for me.
Reviewed-by Sakari Ailus <[email protected]>Thank you, Sakari!
Patch applied as 5.18 material, thanks!