lkml.org 
[lkml]   [2008]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Add c2 port support.
On Tue, Oct 07, 2008 at 11:38:45AM +0200, Rodolfo Giometti wrote:
> On Fri, Oct 03, 2008 at 02:59:23PM -0700, Greg KH wrote:
> > On Fri, Oct 03, 2008 at 04:36:29PM +0200, Rodolfo Giometti wrote:
> > > C2port implements a two wire serial communication protocol (bit
> > > banging) designed to enable in-system programming, debugging, and
> > > boundary-scan testing on low pin-count Silicon Labs devices.
> > >
> > > Currently this code supports only flash programming through sysfs
> > > interface but extensions shoud be easy to add.
> > >
> > > Signed-off-by: Rodolfo Giometti <giometti@linux.it>
> > > ---
> > > drivers/misc/Kconfig | 13 +
> > > drivers/misc/Makefile | 1 +
> > > drivers/misc/c2port_core.c | 996 ++++++++++++++++++++++++++++++++++++++++++++
> > > include/linux/c2port.h | 65 +++
> >
> > Why does this file have to be in include/linux? I don't think this
> > exports any structures to userspace, and no other code calls this
> > driver, so it should all fit into the .c file just fine.
>
> The inlcude file is needed because you have to define a clients for
> each c2 port implementations, see here for further info:
>
> http://wiki.enneenne.com/index.php/Silicon_C2_Interface

You might want to flush out your Kconfig entry with more information
from this site :)

> The file c2port_core.c implements the core, a client implements the
> low level functions.

But you aren't submitting any clients here, right? Are you planning to?

> > Is there any way to detect automatically if this hardware is present in
> > the system or not?
>
> I don't think so. The C2 port is usually implemented with two generic
> GPIOs.

Then the default config option should be N, and you should make the
Kconfig help text a bit clearer as to exactly which machines this device
would be expected for, otherwise you might accidentally have distros add
this device to their builds, which would not be a good thing.

> I posted the code in order to get some feedbacks and then repropose
> something suitable for inclusion. So I'd like to know if I should make
> a separate subdir into linux/drivers/misc/ to hold possible clients
> (i.e. linux/drivers/misc/c2port/).

What's wrong with drivers/c2port/ ? Come on, think big :)

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-10-07 19:37    [from the cache]
©2003-2011 Jasper Spaans