All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code
@ 2022-02-03 12:56 Andy Shevchenko
  2022-02-04  8:32 ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2022-02-03 12:56 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, linux-acpi, linux-kernel
  Cc: Daniel Scally, Heikki Krogerus, Sakari Ailus, Greg Kroah-Hartman,
	Rafael J. Wysocki, Wolfram Sang

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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

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(-)

diff --git a/drivers/base/property.c b/drivers/base/property.c
index fc59e0f7f9cc..c0e94cce9c29 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -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
diff --git a/include/linux/property.h b/include/linux/property.h
index 95d56a562b6a..4cd4b326941f 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -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 *
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code
  2022-02-03 12:56 [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code Andy Shevchenko
@ 2022-02-04  8:32 ` Sakari Ailus
  2022-02-04  9:41   ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2022-02-04  8:32 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, linux-acpi, linux-kernel, Daniel Scally,
	Heikki Krogerus, Greg Kroah-Hartman, Rafael J. Wysocki,
	Wolfram Sang

Hi Andy,

On Thu, Feb 03, 2022 at 02:56:13PM +0200, Andy Shevchenko wrote:
> 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.

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.

-- 
Kind regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code
  2022-02-04  8:32 ` Sakari Ailus
@ 2022-02-04  9:41   ` Sakari Ailus
  2022-02-04 13:40     ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2022-02-04  9:41 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, linux-acpi, linux-kernel, Daniel Scally,
	Heikki Krogerus, Greg Kroah-Hartman, Rafael J. Wysocki,
	Wolfram Sang

On Fri, Feb 04, 2022 at 10:32:27AM +0200, Sakari Ailus wrote:
> 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 <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code
  2022-02-04  9:41   ` Sakari Ailus
@ 2022-02-04 13:40     ` Andy Shevchenko
  2022-02-04 18:52       ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2022-02-04 13:40 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Rafael J. Wysocki, linux-acpi, linux-kernel, Daniel Scally,
	Heikki Krogerus, Greg Kroah-Hartman, Rafael J. Wysocki,
	Wolfram Sang

On Fri, Feb 04, 2022 at 11:41:19AM +0200, Sakari Ailus wrote:
> On Fri, Feb 04, 2022 at 10:32:27AM +0200, Sakari Ailus wrote:
> > 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 <sakari.ailus@linux.intel.com>

Thank you, Sakari!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code
  2022-02-04 13:40     ` Andy Shevchenko
@ 2022-02-04 18:52       ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2022-02-04 18:52 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Sakari Ailus, Rafael J. Wysocki, ACPI Devel Maling List,
	Linux Kernel Mailing List, Daniel Scally, Heikki Krogerus,
	Greg Kroah-Hartman, Rafael J. Wysocki, Wolfram Sang

On Fri, Feb 4, 2022 at 2:41 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Fri, Feb 04, 2022 at 11:41:19AM +0200, Sakari Ailus wrote:
> > On Fri, Feb 04, 2022 at 10:32:27AM +0200, Sakari Ailus wrote:
> > > 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 <sakari.ailus@linux.intel.com>
>
> Thank you, Sakari!

Patch applied as 5.18 material, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-04 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 12:56 [PATCH v1 1/1] device property: Don't split fwnode_get_irq*() APIs in the code Andy Shevchenko
2022-02-04  8:32 ` Sakari Ailus
2022-02-04  9:41   ` Sakari Ailus
2022-02-04 13:40     ` Andy Shevchenko
2022-02-04 18:52       ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.