Re: [GIT PULL] Staging/IIO driver patches for 4.19-rc1
From: Todd Poynor
Date: Tue Aug 28 2018 - 07:20:37 EST
On Tue, Aug 28, 2018 at 3:38 AM Ahmed S. Darwish <darwish.07@xxxxxxxxx> wrote:
>[...]
> 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..
Yeah, it's clear all the userspace I/O framework code needs to move to
UIO with some patches to add agreed-upon new pieces. I think everyone
agrees this code shouldn't move out of staging until that happens. A
whole lot of work is needed on these drivers, and UIO conversion is on
my list to address soon.
>
> 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.
>
> More-over, the exposed user-space API is just some ioctls. So if
> google hase some shipped user-space code that is using this,
> hopefully the driver can still be re-implemented through UIO
> without changing these bits..
>
> Thanks,
>
> [1] https://www.kernel.org/doc/html/v4.18/driver-api/uio-howto.html
> [2] drivers/staging/gasket/gasket_core.h :: struct gasket_driver_desc
> [3] drivers/staging/gasket/apex_driver.c
> [4] include/linux/uio_driver.h
>
> --
> Darwi
> http://darwish.chasingpointers.com
Thanks -- Todd