All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] using uio_pdrv_genirq without module param
@ 2017-09-21  0:53 Chris Packham
  2017-09-21  0:53   ` Chris Packham
  2017-09-21  0:53 ` [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq Chris Packham
  0 siblings, 2 replies; 12+ messages in thread
From: Chris Packham @ 2017-09-21  0:53 UTC (permalink / raw)
  To: robh+dt, mark.rutland, gregkh, devicetree, linux-kernel; +Cc: Chris Packham

I found myself about to add a driver that was a sub-optimal clone of
uio_pdrv_genirq the only difference was that I didn't want to modify the args
passed to the kernel by my bootloader. If uio_pdrv_genirq had a default
of_match entry I could simply use that. This series attempts to implement this.

Chris Packham (2):
  uio: dt-bindings: document binding for uio-pdrv-genirq
  uio: add default compatible string to uio_pdrv_genirq

 .../bindings/uio/linux,uio-pdrv-genirq.txt         | 28 ++++++++++++++++++++++
 drivers/uio/uio_pdrv_genirq.c                      |  3 ++-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt

-- 
2.14.1

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

* [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq
@ 2017-09-21  0:53   ` Chris Packham
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Packham @ 2017-09-21  0:53 UTC (permalink / raw)
  To: robh+dt, mark.rutland, gregkh, devicetree, linux-kernel; +Cc: Chris Packham

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 .../bindings/uio/linux,uio-pdrv-genirq.txt         | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt

diff --git a/Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt b/Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt
new file mode 100644
index 000000000000..90447905e886
--- /dev/null
+++ b/Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt
@@ -0,0 +1,28 @@
+*Generic UIO platform driver with interrupts
+
+Required properties:
+- compatible: Should be "linux,uio-pdrv-genirq" or a value set with the of_id
+  module parameter.
+
+Optional properties:
+- interrupts: Should contain the interrupt to be associated with this device
+  (only a single interrupt is supported per device).
+- interrupt-parent: Specifies the phandle to the parent interrupt controller.
+- reg: Should specify the physical address spaces used by this device.
+
+Example:
+
+/* Device with MM IO and interrupt */
+my-device@10000 {
+	compatible = "linux,uio-pdrv-genirq";
+	reg = <0x10000 0x40>;
+	interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
+	interrupt-parent = <&gic>;
+};
+
+/* Device with interrupt only */
+my-int {
+	compatible = "linux,uio-pdrv-genirq";
+	interrupts = <6 IRQ_TYPE_EDGE_BOTH>;
+	interrupt-parent = <&gic>;
+};
-- 
2.14.1

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

* [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq
@ 2017-09-21  0:53   ` Chris Packham
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Packham @ 2017-09-21  0:53 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Chris Packham

Signed-off-by: Chris Packham <chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
---
 .../bindings/uio/linux,uio-pdrv-genirq.txt         | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt

diff --git a/Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt b/Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt
new file mode 100644
index 000000000000..90447905e886
--- /dev/null
+++ b/Documentation/devicetree/bindings/uio/linux,uio-pdrv-genirq.txt
@@ -0,0 +1,28 @@
+*Generic UIO platform driver with interrupts
+
+Required properties:
+- compatible: Should be "linux,uio-pdrv-genirq" or a value set with the of_id
+  module parameter.
+
+Optional properties:
+- interrupts: Should contain the interrupt to be associated with this device
+  (only a single interrupt is supported per device).
+- interrupt-parent: Specifies the phandle to the parent interrupt controller.
+- reg: Should specify the physical address spaces used by this device.
+
+Example:
+
+/* Device with MM IO and interrupt */
+my-device@10000 {
+	compatible = "linux,uio-pdrv-genirq";
+	reg = <0x10000 0x40>;
+	interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
+	interrupt-parent = <&gic>;
+};
+
+/* Device with interrupt only */
+my-int {
+	compatible = "linux,uio-pdrv-genirq";
+	interrupts = <6 IRQ_TYPE_EDGE_BOTH>;
+	interrupt-parent = <&gic>;
+};
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq
  2017-09-21  0:53 [PATCH 0/2] using uio_pdrv_genirq without module param Chris Packham
  2017-09-21  0:53   ` Chris Packham
@ 2017-09-21  0:53 ` Chris Packham
  2017-09-21  7:50     ` Andy Shevchenko
  1 sibling, 1 reply; 12+ messages in thread
From: Chris Packham @ 2017-09-21  0:53 UTC (permalink / raw)
  To: robh+dt, mark.rutland, gregkh, devicetree, linux-kernel; +Cc: Chris Packham

Add a default compatible string "linux,uio-pdrv-genirq" to
uio_pdrv_genirq to make it usable without supplying a module parameter.
The module parameter is still supported in addition to the default.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/uio/uio_pdrv_genirq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index f598ecddc8a7..8dd4729e14ab 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -253,11 +253,12 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 
 #ifdef CONFIG_OF
 static struct of_device_id uio_of_genirq_match[] = {
+	{ .compatible = "linux,uio-pdrv-genirq" },
 	{ /* This is filled with module_parm */ },
 	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
-module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, 0000);
 MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #endif
 
-- 
2.14.1

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

* Re: [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq
@ 2017-09-21  7:24     ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2017-09-21  7:24 UTC (permalink / raw)
  To: Chris Packham; +Cc: robh+dt, mark.rutland, devicetree, linux-kernel

On Thu, Sep 21, 2017 at 12:53:25PM +1200, Chris Packham wrote:
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

I can't take patches without any changelog text, sorry.

thanks,

greg k-h

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

* Re: [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq
@ 2017-09-21  7:24     ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2017-09-21  7:24 UTC (permalink / raw)
  To: Chris Packham
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, Sep 21, 2017 at 12:53:25PM +1200, Chris Packham wrote:
> Signed-off-by: Chris Packham <chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>

I can't take patches without any changelog text, sorry.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq
@ 2017-09-21  7:50     ` Andy Shevchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2017-09-21  7:50 UTC (permalink / raw)
  To: Chris Packham
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, devicetree, linux-kernel

On Thu, Sep 21, 2017 at 3:53 AM, Chris Packham
<chris.packham@alliedtelesis.co.nz> wrote:


> -module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
> +module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, 0000);

0 -> 0000 looks like bogus checkpatch warning.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq
@ 2017-09-21  7:50     ` Andy Shevchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2017-09-21  7:50 UTC (permalink / raw)
  To: Chris Packham
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, devicetree,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, Sep 21, 2017 at 3:53 AM, Chris Packham
<chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:


> -module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
> +module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, 0000);

0 -> 0000 looks like bogus checkpatch warning.

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq
  2017-09-21  7:50     ` Andy Shevchenko
@ 2017-09-21 15:44       ` Chris Packham
  -1 siblings, 0 replies; 12+ messages in thread
From: Chris Packham @ 2017-09-21 15:44 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, devicetree, linux-kernel

On 21/09/17 19:50, Andy Shevchenko wrote:
> On Thu, Sep 21, 2017 at 3:53 AM, Chris Packham
> <chris.packham@alliedtelesis.co.nz> wrote:
> 
> 
>> -module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
>> +module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, 0000);
> 
> 0 -> 0000 looks like bogus checkpatch warning.
> 

Yes. I changed it to satisfy checkpatch. I initially wasn't going to but 
then I noticed plenty of 0000 attached to module_params. I'll switch it 
back in v2.

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

* Re: [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq
@ 2017-09-21 15:44       ` Chris Packham
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Packham @ 2017-09-21 15:44 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, devicetree,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 21/09/17 19:50, Andy Shevchenko wrote:
> On Thu, Sep 21, 2017 at 3:53 AM, Chris Packham
> <chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:
> 
> 
>> -module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
>> +module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, 0000);
> 
> 0 -> 0000 looks like bogus checkpatch warning.
> 

Yes. I changed it to satisfy checkpatch. I initially wasn't going to but 
then I noticed plenty of 0000 attached to module_params. I'll switch it 
back in v2.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq
@ 2017-10-04  8:31     ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2017-10-04  8:31 UTC (permalink / raw)
  To: Chris Packham; +Cc: robh+dt, mark.rutland, devicetree, linux-kernel

On Thu, Sep 21, 2017 at 12:53:25PM +1200, Chris Packham wrote:
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---

I can't take patches without any changelog text, sorry.

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

* Re: [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq
@ 2017-10-04  8:31     ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2017-10-04  8:31 UTC (permalink / raw)
  To: Chris Packham
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, Sep 21, 2017 at 12:53:25PM +1200, Chris Packham wrote:
> Signed-off-by: Chris Packham <chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
> ---

I can't take patches without any changelog text, sorry.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-10-04  8:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-21  0:53 [PATCH 0/2] using uio_pdrv_genirq without module param Chris Packham
2017-09-21  0:53 ` [PATCH 1/2] uio: dt-bindings: document binding for uio-pdrv-genirq Chris Packham
2017-09-21  0:53   ` Chris Packham
2017-09-21  7:24   ` Greg KH
2017-09-21  7:24     ` Greg KH
2017-10-04  8:31   ` Greg KH
2017-10-04  8:31     ` Greg KH
2017-09-21  0:53 ` [PATCH 2/2] uio: add default compatible string to uio_pdrv_genirq Chris Packham
2017-09-21  7:50   ` Andy Shevchenko
2017-09-21  7:50     ` Andy Shevchenko
2017-09-21 15:44     ` Chris Packham
2017-09-21 15:44       ` Chris Packham

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.