Message ID | 20170921154814.7510-2-chris.packham@alliedtelesis.co.nz |
---|---|
State | Rejected, archived |
Headers | show |
Series | using uio_pdrv_genirq without module param | expand |
On Fri, Sep 22, 2017 at 03:48:13AM +1200, Chris Packham wrote: > 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> > --- > .../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 NAK. I'm sure this has come up before but if you want to map a device to a uio driver, then add its compatible string to the driver. Bindings describe h/w devices. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob, Greg, On 04/10/17 10:38, Rob Herring wrote: > On Fri, Sep 22, 2017 at 03:48:13AM +1200, Chris Packham wrote: >> 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> >> --- >> .../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 > > NAK. > > I'm sure this has come up before but if you want to map a device to a > uio driver, then add its compatible string to the driver. Bindings > describe h/w devices. Fair enough. The problem for me is that the uio-pdrv-genirq is so generic it could apply to pretty much any hardware device. The driver has dt-awareness but it currently doesn't have any built-in compatible string (it is set via a module param). My use-case is a microcontoller with a userspace driver all I need out of the kernel is i2c access and interrupts. Any suggestions as to how to move forward with this. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Oct 8, 2017 at 4:03 PM, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote: > Hi Rob, Greg, > > On 04/10/17 10:38, Rob Herring wrote: >> On Fri, Sep 22, 2017 at 03:48:13AM +1200, Chris Packham wrote: >>> 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> >>> --- >>> .../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 >> >> NAK. >> >> I'm sure this has come up before but if you want to map a device to a >> uio driver, then add its compatible string to the driver. Bindings >> describe h/w devices. > > Fair enough. > > The problem for me is that the uio-pdrv-genirq is so generic it could > apply to pretty much any hardware device. The driver has dt-awareness > but it currently doesn't have any built-in compatible string (it is set > via a module param). > > My use-case is a microcontoller with a userspace driver all I need out > of the kernel is i2c access and interrupts. Any suggestions as to how to > move forward with this. Define the binding for the uC regardless of how the driver is implemented. Then add its compatible to the uio-pdev driver. That's how we've dealt with spi-dev for example. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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>; +};
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> --- .../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