devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about UIO vs DT
@ 2025-05-15  4:45 Kuninori Morimoto
  2025-05-15  7:52 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2025-05-15  4:45 UTC (permalink / raw)
  To: Greg KH
  Cc: Linux-Kernel, devicetree, shimoda, goda, Kurokawa, Kihara,
	kazuya.mizuguchi.ks, takamitsu.honda.pv


Hi Greg / UIO / DT

I would like to ask about UIO vs DT.

If my understanding was correct, current UIO can use 1 IRQ / 1 reg per 1 UIO,
but some device needs multi-IRQ/reg. In such case, we need to use
multi-UIO. But it is not good much to DT rule. For example in case of
the device which needs "2 regs 3 irqs". it will be

(A)	[1 reg, 1 IRQ] UIO
(B)	[1 reg, 1 IRQ] UIO
(C)	[0 reg, 1 IRQ] UIO

and (C) will be DT error. Is this known issue ? Do we have better solution ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: Question about UIO vs DT
  2025-05-15  4:45 Question about UIO vs DT Kuninori Morimoto
@ 2025-05-15  7:52 ` Greg KH
  2025-05-16  2:18   ` Kuninori Morimoto
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2025-05-15  7:52 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Linux-Kernel, devicetree, shimoda, goda, Kurokawa, Kihara,
	kazuya.mizuguchi.ks, takamitsu.honda.pv

On Thu, May 15, 2025 at 04:45:23AM +0000, Kuninori Morimoto wrote:
> 
> Hi Greg / UIO / DT
> 
> I would like to ask about UIO vs DT.
> 
> If my understanding was correct, current UIO can use 1 IRQ / 1 reg per 1 UIO,
> but some device needs multi-IRQ/reg. In such case, we need to use
> multi-UIO. But it is not good much to DT rule. For example in case of
> the device which needs "2 regs 3 irqs". it will be
> 
> (A)	[1 reg, 1 IRQ] UIO
> (B)	[1 reg, 1 IRQ] UIO
> (C)	[0 reg, 1 IRQ] UIO
> 
> and (C) will be DT error. Is this known issue ? Do we have better solution ?

Yes, write a real driver for the device as obviously it is a complex one
and UIO shouldn't be used for it :)

What type of device is this that requires this type of hardware control
and why do you feel that UIO is the proper solution?

thanks,

greg k-h

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

* Re: Question about UIO vs DT
  2025-05-15  7:52 ` Greg KH
@ 2025-05-16  2:18   ` Kuninori Morimoto
  2025-05-16  6:03     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2025-05-16  2:18 UTC (permalink / raw)
  To: Greg KH
  Cc: Linux-Kernel, devicetree, shimoda, goda, Kurokawa, Kihara,
	kazuya.mizuguchi.ks, takamitsu.honda.pv


Hi Greg

Thank you for the reply

> > For example in case of
> > the device which needs "2 regs 3 irqs". it will be
> > 
> > (A)	[1 reg, 1 IRQ] UIO
> > (B)	[1 reg, 1 IRQ] UIO
> > (C)	[0 reg, 1 IRQ] UIO
> > 
> > and (C) will be DT error. Is this known issue ? Do we have better solution ?
> 
> Yes, write a real driver for the device as obviously it is a complex one
> and UIO shouldn't be used for it :)
> 
> What type of device is this that requires this type of hardware control
> and why do you feel that UIO is the proper solution?

One of big reason is license.
Because it needs to be proprietary licensed driver, we can't create
real driver.

Our team is thinking it will be no more DT error if UIO can allow
below, somehow.

	reg = <reg1 reg2>;
	interrupts = <irq1 irq2 irq3>;

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: Question about UIO vs DT
  2025-05-16  2:18   ` Kuninori Morimoto
@ 2025-05-16  6:03     ` Greg KH
  2025-05-16  7:05       ` Kuninori Morimoto
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2025-05-16  6:03 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Linux-Kernel, devicetree, shimoda, goda, Kurokawa, Kihara,
	kazuya.mizuguchi.ks, takamitsu.honda.pv

On Fri, May 16, 2025 at 02:18:07AM +0000, Kuninori Morimoto wrote:
> 
> Hi Greg
> 
> Thank you for the reply
> 
> > > For example in case of
> > > the device which needs "2 regs 3 irqs". it will be
> > > 
> > > (A)	[1 reg, 1 IRQ] UIO
> > > (B)	[1 reg, 1 IRQ] UIO
> > > (C)	[0 reg, 1 IRQ] UIO
> > > 
> > > and (C) will be DT error. Is this known issue ? Do we have better solution ?
> > 
> > Yes, write a real driver for the device as obviously it is a complex one
> > and UIO shouldn't be used for it :)
> > 
> > What type of device is this that requires this type of hardware control
> > and why do you feel that UIO is the proper solution?
> 
> One of big reason is license.
> Because it needs to be proprietary licensed driver, we can't create
> real driver.

That is not a valid reason at all, sorry.  So much so that I, and many
others, have argued that you can not have UIO drivers in userspace that
are NOT also released under the GPLv2.

Go work with your lawyers please, there's nothing I can now do to help
you out with this due to the expectation that you are attempting to
evade the license requirements here.

greg k-h

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

* Re: Question about UIO vs DT
  2025-05-16  6:03     ` Greg KH
@ 2025-05-16  7:05       ` Kuninori Morimoto
  0 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2025-05-16  7:05 UTC (permalink / raw)
  To: Greg KH
  Cc: Linux-Kernel, devicetree, shimoda, goda, Kurokawa, Kihara,
	kazuya.mizuguchi.ks, takamitsu.honda.pv


Hi Greg

Thank you for your help

> > > > (A)	[1 reg, 1 IRQ] UIO
> > > > (B)	[1 reg, 1 IRQ] UIO
> > > > (C)	[0 reg, 1 IRQ] UIO
> > > > 
> > > > and (C) will be DT error. Is this known issue ? Do we have better solution ?
> > > 
> > > Yes, write a real driver for the device as obviously it is a complex one
> > > and UIO shouldn't be used for it :)
> > > 
> > > What type of device is this that requires this type of hardware control
> > > and why do you feel that UIO is the proper solution?
> > 
> > One of big reason is license.
> > Because it needs to be proprietary licensed driver, we can't create
> > real driver.
> 
> That is not a valid reason at all, sorry.  So much so that I, and many
> others, have argued that you can not have UIO drivers in userspace that
> are NOT also released under the GPLv2.
> 
> Go work with your lawyers please, there's nothing I can now do to help
> you out with this due to the expectation that you are attempting to
> evade the license requirements here.

OK, Thank you for clearing details and helping us.
I will forward this info to the relatead members.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

end of thread, other threads:[~2025-05-16  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15  4:45 Question about UIO vs DT Kuninori Morimoto
2025-05-15  7:52 ` Greg KH
2025-05-16  2:18   ` Kuninori Morimoto
2025-05-16  6:03     ` Greg KH
2025-05-16  7:05       ` Kuninori Morimoto

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).