devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* multiple drivers for same hardware
@ 2012-01-13 18:52 Kumar Gala
       [not found] ` <316952FA-B163-46F8-B4B5-8CC0B97EAEB9-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2012-01-13 18:52 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Discuss

We have some scenarios in which we might have 2 different drivers (one in kernel or one user space as an example) and wanted to see how we'd convey in the device tree which driver should "claim" the specific device instance.

>From glancing at the OF specs it seems we could utilize the precedence order of compatible as a means to specify.  So something like:

[ bind with UIO instead of standard driver ]

	compatible = "gianfar-lnx-uio", "gianfar";

vs [ bind with stock kernel driver ]
	compatible = "gianfar";

The other thought I had was introducing a new property like:

	linux-drv = "gianfar-uio";
	compatible = "gianfar";

thoughts?

- k

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

* Re: multiple drivers for same hardware
       [not found] ` <316952FA-B163-46F8-B4B5-8CC0B97EAEB9-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
@ 2012-01-13 19:21   ` Mitch Bradley
  2012-01-16 16:21   ` Stuart Yoder
  1 sibling, 0 replies; 3+ messages in thread
From: Mitch Bradley @ 2012-01-13 19:21 UTC (permalink / raw)
  To: Kumar Gala
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Discuss

On 1/13/2012 8:52 AM, Kumar Gala wrote:
> We have some scenarios in which we might have 2 different drivers (one in kernel or one user space as an example) and wanted to see how we'd convey in the device tree which driver should "claim" the specific device instance.
>
>  From glancing at the OF specs it seems we could utilize the precedence order of compatible as a means to specify.  So something like:
>
> [ bind with UIO instead of standard driver ]
>
> 	compatible = "gianfar-lnx-uio", "gianfar";
>
> vs [ bind with stock kernel driver ]
> 	compatible = "gianfar";


That is certainly the standard way of doing it.

>
> The other thought I had was introducing a new property like:
>
> 	linux-drv = "gianfar-uio";
> 	compatible = "gianfar";
>
> thoughts?

Why add a new mechanism when there is an existing one that does what you 
want?



>
> - k
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>

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

* Re: multiple drivers for same hardware
       [not found] ` <316952FA-B163-46F8-B4B5-8CC0B97EAEB9-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
  2012-01-13 19:21   ` Mitch Bradley
@ 2012-01-16 16:21   ` Stuart Yoder
  1 sibling, 0 replies; 3+ messages in thread
From: Stuart Yoder @ 2012-01-16 16:21 UTC (permalink / raw)
  To: Kumar Gala
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Discuss

On Fri, Jan 13, 2012 at 12:52 PM, Kumar Gala <galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org> wrote:
> We have some scenarios in which we might have 2 different drivers (one in kernel or one user space as an example) and wanted to see how we'd convey in the device tree which driver should "claim" the specific device instance.
>

I don't think we want to use the device tree for this, as this is
really configuration information.

The vfio user space driver model should solve this when it is implemented.

The basic approach with vfio will be something like:
    -a new kernel argument specifies a list of devices that the kernel
should leave alone and not bind to
    -in user space, you bind desired devices to vfio through sysfs
    -the vfio subsystem makes the bound devices available through /dev/vfio
    -user space can then mmap the devices, hook their interrupts, do
     iommu config,etc through file description operations

Stuart

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

end of thread, other threads:[~2012-01-16 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 18:52 multiple drivers for same hardware Kumar Gala
     [not found] ` <316952FA-B163-46F8-B4B5-8CC0B97EAEB9-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2012-01-13 19:21   ` Mitch Bradley
2012-01-16 16:21   ` Stuart Yoder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).