lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Add c2 port support.
On Wed, 22 Oct 2008 22:48:01 +0200
Rodolfo Giometti <giometti@enneenne.com> wrote:

> > > > What I haven't yet got my head around is this:
> > > >
> > > > Currently this code supports only flash programming through sysfs
> > > > interface but extensions shoud be easy to add.
> > > >
> > > > is that really what we want to use sysfs for? As the prime interface
> > > > to a device driver (or is it a bus driver?) Didn't we used to use
> > > > device nodes for that sort of thing?
> > >
> > > I decided to use this interface since the C2 ports are simple and very
> > > easy to manage with such files abstraction.
> >
> > well.. what _is_ the implemented interface? What alternatives were
> > considered and why were they judged inappropriate? What interfaces do
> > any similar in-tree drivers use?
>
> Well... main reasons in using sysfs support are:
>
> * no more char devices and new ioctls to define,
>

Why is that good? We have hundreds and hundreds of drivers which use a
device node interface and they work OK.

sysfs was never intended for use as the sole interface between device
drivers and userspace. Using it that way is somewhat unconventional.
At the very least I do think it needs more justification and
explanation than we're being provded here.

Device nodes and ioctls and such do have a number of problems, and
perhaps we should sit down and invent a new way of wiring drivers up to
userspace. But whether that would end up being identical to the
present sysfs code is not obvious.

> * the microcontrollers on-board flash can be easily programmed by
> using only the "echo" and "cat" commands, so no more tools are needed
> and even simply busybox can be used.

A system which is using busybox might want to set CONFIG_SYSFS=n for
memory savings. Now what?



\
 
 \ /
  Last update: 2008-10-22 23:01    [W:0.041 / U:15.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site