* [PATCH v3 1/5] uio: dt-bindings: document existing binding for uio-pdrv-genirq
2017-10-09 22:46 [PATCH v3 0/5] using uio_pdrv_genirq without module param Chris Packham
@ 2017-10-09 22:46 ` Chris Packham
[not found] ` <20171009224655.6173-2-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2017-10-09 22:46 ` [PATCH v3 2/5] uio: dt-bindings: Add binding for "st,stm32f100" Chris Packham
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Chris Packham @ 2017-10-09 22:46 UTC (permalink / raw)
To: robh+dt, mark.rutland, gregkh; +Cc: devicetree, linux-kernel, Chris Packham
Document the device tree bindings for the uio-prv-genirq driver. Provide
some examples on how it can be used.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Changes in v3:
- New. Document existing binding first.
.../devicetree/bindings/uio/uio-pdrv-genirq.txt | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
diff --git a/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt b/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
new file mode 100644
index 000000000000..5a92b1f8825f
--- /dev/null
+++ b/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
@@ -0,0 +1,27 @@
+*Generic UIO platform driver with interrupts
+
+Required properties:
+- compatible: Should be 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 assuming of_id="me,my-device" */
+my-device@10000 {
+ compatible = "me,my-device";
+ reg = <0x10000 0x40>;
+ interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-parent = <&gic>;
+};
+
+/* Device with interrupt only assuming of_id="me,my-device" */
+my-int {
+ compatible = "me,my-device";
+ interrupts = <6 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-parent = <&gic>;
+};
--
2.14.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/5] uio: dt-bindings: Add binding for "st,stm32f100"
2017-10-09 22:46 [PATCH v3 0/5] using uio_pdrv_genirq without module param Chris Packham
2017-10-09 22:46 ` [PATCH v3 1/5] uio: dt-bindings: document existing binding for uio-pdrv-genirq Chris Packham
@ 2017-10-09 22:46 ` Chris Packham
[not found] ` <20171009224655.6173-3-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2017-10-09 22:46 ` [PATCH v3 3/5] uio: dt-bindings: Add binding for "marvell,88e2040" Chris Packham
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Chris Packham @ 2017-10-09 22:46 UTC (permalink / raw)
To: robh+dt, mark.rutland, gregkh; +Cc: devicetree, linux-kernel, Chris Packham
The stm32f100 is a general purpose micro controller. Document a binding
that allows a user-space driver to be implemented for these devices.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Changes in v3:
- (replaces "uio: dt-bindings: document binding for uio-pdrv-genirq")
- split the bindings up into the devices I'm actually wanting to support. The
first is a stm32f100 micro controller.
Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt b/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
index 5a92b1f8825f..fb4c1b5059f2 100644
--- a/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
+++ b/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
@@ -1,7 +1,8 @@
*Generic UIO platform driver with interrupts
Required properties:
-- compatible: Should be a value set with the of_id module parameter.
+- compatible: Should be a value set with the of_id module parameter or the
+ built in value "st,stm32f100".
Optional properties:
- interrupts: Should contain the interrupt to be associated with this device
--
2.14.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 3/5] uio: dt-bindings: Add binding for "marvell,88e2040"
2017-10-09 22:46 [PATCH v3 0/5] using uio_pdrv_genirq without module param Chris Packham
2017-10-09 22:46 ` [PATCH v3 1/5] uio: dt-bindings: document existing binding for uio-pdrv-genirq Chris Packham
2017-10-09 22:46 ` [PATCH v3 2/5] uio: dt-bindings: Add binding for "st,stm32f100" Chris Packham
@ 2017-10-09 22:46 ` Chris Packham
[not found] ` <20171009224655.6173-1-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2017-10-09 22:46 ` [PATCH v3 5/5] uio: uio_pdrv_genirq: Add "marvell,88e2040" " Chris Packham
4 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2017-10-09 22:46 UTC (permalink / raw)
To: robh+dt, mark.rutland, gregkh; +Cc: devicetree, linux-kernel, Chris Packham
The marvell,88e2040 is a N-BaseT Ethernet PHY which requires a userspace
driver. The only kernel presence is an interrupt handler which
uio_pdrv_genirq can provide.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Changes in v3:
- (replaces "uio: dt-bindings: document binding for uio-pdrv-genirq")
- split the bindings up into the devices I'm actually wanting to support. The
second is a marvell N-BaseT Ethernet PHY
Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt b/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
index fb4c1b5059f2..7b28bead4016 100644
--- a/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
+++ b/Documentation/devicetree/bindings/uio/uio-pdrv-genirq.txt
@@ -1,8 +1,8 @@
*Generic UIO platform driver with interrupts
Required properties:
-- compatible: Should be a value set with the of_id module parameter or the
- built in value "st,stm32f100".
+- compatible: Should be a value set with the of_id module parameter or one of
+ the built in values "st,stm32f100", "marvell,88e2040".
Optional properties:
- interrupts: Should contain the interrupt to be associated with this device
--
2.14.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <20171009224655.6173-1-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>]
* [PATCH v3 4/5] uio: uio_pdrv_genirq: Add st,stm32f100 to dt compatible list
[not found] ` <20171009224655.6173-1-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
@ 2017-10-09 22:46 ` Chris Packham
0 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2017-10-09 22:46 UTC (permalink / raw)
To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chris Packham
The stm32f100 is a general purpose micro controller. Allow users to
interact with one as a uio device.
Signed-off-by: Chris Packham <chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
---
Changes in v3:
- (replaces "uio: add default compatible string to uio_pdrv_genirq")
- remove superfluous change suggested by checkpatch.pl
- As suggested by Rob, add specific dt bindings for the hardware I'm
supporting. uio_pdrv_genirq is one potential implementor of a compatible
driver.
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..532de98034c2 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 = "st,stm32f100" },
{ /* 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, 0);
MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
#endif
--
2.14.2
--
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] 8+ messages in thread
* [PATCH v3 5/5] uio: uio_pdrv_genirq: Add "marvell,88e2040" to dt compatible list
2017-10-09 22:46 [PATCH v3 0/5] using uio_pdrv_genirq without module param Chris Packham
` (3 preceding siblings ...)
[not found] ` <20171009224655.6173-1-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
@ 2017-10-09 22:46 ` Chris Packham
4 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2017-10-09 22:46 UTC (permalink / raw)
To: robh+dt, mark.rutland, gregkh; +Cc: devicetree, linux-kernel, Chris Packham
The marvell,88e2040 is a N-BaseT Ethernet PHY which requires a userspace
driver. uio_pdrv_genirq can be used to provide interrupts to such a
userspace driver.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Changes in v3:
- (replaces "uio: add default compatible string to uio_pdrv_genirq")
- As suggested by Rob, add specific dt bindings for the hardware I'm
supporting. uio_pdrv_genirq is one potential implementor of a compatible
driver.
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 532de98034c2..4bcab82b899e 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -254,11 +254,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 = "st,stm32f100" },
+ { .compatible = "marvell,88e2040" },
{ /* This is filled with module_parm */ },
{ /* Sentinel */ },
};
MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
-module_param_string(of_id, uio_of_genirq_match[1].compatible, 128, 0);
+module_param_string(of_id, uio_of_genirq_match[2].compatible, 128, 0);
MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
#endif
--
2.14.2
^ permalink raw reply related [flat|nested] 8+ messages in thread