2024-04-12 04:58:39

by Chris Packham

[permalink] [raw]
Subject: [PATCH v3 0/2] uio: pdrv_gen_irq and threaded intrerrupts

I've combined these two commits submitted separatedly [1][2] into a small
series. They can be applied separately as they are not dependent on each other.

[1] - https://lore.kernel.org/lkml/[email protected]/
[2] - https://lore.kernel.org/lkml/[email protected]/

Chris Packham (2):
uio_pdrv_genirq: convert to use device_property APIs
uio: use threaded interrupts

drivers/uio/uio.c | 24 +++++++++++++++++++-----
drivers/uio/uio_pdrv_genirq.c | 10 +++++-----
2 files changed, 24 insertions(+), 10 deletions(-)

--
2.43.2



2024-04-12 04:58:48

by Chris Packham

[permalink] [raw]
Subject: [PATCH v3 1/2] uio_pdrv_genirq: convert to use device_property APIs

Convert the uio_pdrv_genirq driver to use the device_property_* APIs
instead of the of_property_* ones. This allows UIO interrupts to be
defined via an ACPI overlay using the Device Tree namespace linkage.

Signed-off-by: Chris Packham <[email protected]>
---

Notes:
Changes in v3:
- None
Changes in v2:
- Remove extraneous newline

drivers/uio/uio_pdrv_genirq.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 63258b6accc4..796f5be0a086 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -23,8 +23,8 @@
#include <linux/irq.h>

#include <linux/of.h>
-#include <linux/of_platform.h>
-#include <linux/of_address.h>
+#include <linux/mod_devicetable.h>
+#include <linux/property.h>

#define DRIVER_NAME "uio_pdrv_genirq"

@@ -110,7 +110,7 @@ static void uio_pdrv_genirq_cleanup(void *data)
static int uio_pdrv_genirq_probe(struct platform_device *pdev)
{
struct uio_info *uioinfo = dev_get_platdata(&pdev->dev);
- struct device_node *node = pdev->dev.of_node;
+ struct fwnode_handle *node = dev_fwnode(&pdev->dev);
struct uio_pdrv_genirq_platdata *priv;
struct uio_mem *uiomem;
int ret = -EINVAL;
@@ -127,11 +127,11 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
return -ENOMEM;
}

- if (!of_property_read_string(node, "linux,uio-name", &name))
+ if (!device_property_read_string(&pdev->dev, "linux,uio-name", &name))
uioinfo->name = devm_kstrdup(&pdev->dev, name, GFP_KERNEL);
else
uioinfo->name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
- "%pOFn", node);
+ "%pfwP", node);

uioinfo->version = "devicetree";
/* Multiple IRQs are not supported */
--
2.43.2


2024-04-12 07:49:52

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] uio: pdrv_gen_irq and threaded intrerrupts

On Fri, Apr 12, 2024 at 04:55:34PM +1200, Chris Packham wrote:
> I've combined these two commits submitted separatedly [1][2] into a small
> series. They can be applied separately as they are not dependent on each other.
>
> [1] - https://lore.kernel.org/lkml/[email protected]/
> [2] - https://lore.kernel.org/lkml/[email protected]/
>
> Chris Packham (2):
> uio_pdrv_genirq: convert to use device_property APIs
> uio: use threaded interrupts
>
> drivers/uio/uio.c | 24 +++++++++++++++++++-----
> drivers/uio/uio_pdrv_genirq.c | 10 +++++-----
> 2 files changed, 24 insertions(+), 10 deletions(-)
>
> --
> 2.43.2
>

Can you just send a fix-up patch instead?

thanks,

greg k-h