[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081022135810.37c564f8.akpm@linux-foundation.org>
Date: Wed, 22 Oct 2008 13:58:10 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Rodolfo Giometti <giometti@...eenne.com>
Cc: greg@...ah.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] Add c2 port support.
On Wed, 22 Oct 2008 22:48:01 +0200
Rodolfo Giometti <giometti@...eenne.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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists