lkml.org 
[lkml]   [2018]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [GIT PULL] Staging/IIO driver patches for 4.19-rc1
Hi!

On Tue, Aug 28, 2018 at 02:36:07PM +0200, Greg KH wrote:
> On Tue, Aug 28, 2018 at 10:38:17AM +0000, Ahmed S. Darwish wrote:
> > [ re-send; forgotten lkml CC added; sorry ]
> >
> > Hi,
> >
> > On Sat, 18 Aug 2018 17:57:24 +0200, Greg KH wrote:
> > [...]
> > > addition of some new IIO drivers. Also added was a "gasket" driver from
> > > Google that needs loads of work and the erofs filesystem.
> > >
> >
> > Why are we adding __a whole new in-kernel framework__ for
> > developing basic user-space drivers?
> >
> > We already have a frameowrk for that, and it's UIO. [1] The UIO
> > code is a very stable and simple subsystem; it's also heavily used
> > in the embedded industry..
>
> As Todd said, the code will end up being a simple UIO driver, if even
> that big, in th end. It is just going to take him a while to constantly
> refactor things until he achieves that goal...
>
> > I've looked at the gasket documentation [2], and the first user
> > of this new in-kernel API [3], and this is almost replicating UIO
> > it's not funny. [4] True, the gasket APIs adds some extra new
> > conveniences (PCI BAR re-mapping, MSI, ..), but there's no
> > technical reason this cannot be added to the UIO code instead.
>
> {shh} That's my plan :)
>

Cool, thanks a lot.

Can we then merge something like below patch?

[ I've searched the gasket included TODO file before posting,
but did not find any mention of UIO. Below patch will make
sure this will not be forgotten over time.. ]

==>

Subject: [PATCH] gasket: TODO: re-implement using UIO

The gasket in-kernel APIs, recently introduced under staging,
re-implements what is already long-time provided by the UIO
framework and subsystem.

Before moving it out of staging, make sure we add the new bits
to the UIO subsystem instead, then transform its signle client,
the Apex driver, to become a UIO driver (uio_driver.h)

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---
drivers/staging/gasket/TODO | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/drivers/staging/gasket/TODO b/drivers/staging/gasket/TODO
index 6ff8e01b04cc..5b1865f8af2d 100644
--- a/drivers/staging/gasket/TODO
+++ b/drivers/staging/gasket/TODO
@@ -1,9 +1,22 @@
This is a list of things that need to be done to get this driver out of the
staging directory.
+
+- Implement the gasket framework's functionality through UIO instead of
+ introducing a new user-space drivers framework that is quite similar.
+
+ UIO provides the necessary bits to implement user-space drivers. Meanwhile
+ the gasket APIs adds some extra conveniences like PCI BAR mapping, and
+ MSI interrupts. Add these features to the UIO subsystem, then re-implement
+ the Apex driver as a basic UIO driver instead (include/linux/uio_driver.h)
+
- Document sysfs files with Documentation/ABI/ entries.
+
- Use misc interface instead of major number for driver version description.
+
- Add descriptions of module_param's
+
- apex_get_status() should actually check status.
+
- "drivers" should never be dealing with "raw" sysfs calls or mess around with
kobjects at all. The driver core should handle all of this for you
automaically. There should not be a need for raw attribute macros.
Ciao,

--
Darwish
http://darwish.chasingpointers.com

\
 
 \ /
  Last update: 2018-08-28 16:31    [W:0.048 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site