public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1] Add c2 port support.
Date: Tue, 7 Oct 2008 11:38:45 +0200	[thread overview]
Message-ID: <20081007093845.GD13035@tekkaman> (raw)
In-Reply-To: <20081003215923.GA14890@kroah.com>

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

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

> Also, please create the needed Documentation/ABI/ files for these new
> sysfs entries, describing how they are used, and what the format of them
> are.

Ok.

> 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.

> Otherwise, how will it be loaded by a distro automatically?

The C2 port client is usually defined into platform machine data file,
for example I defined my client into linux/arch/arm/mach-pxa/wr1100.c
(wr1100.c is not in a vanilla tree, refere to mainstone.c for similar
code). In this manner the driver is autoloaded at boot time.

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/).

Thanks for your suggestions,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

  reply	other threads:[~2008-10-07  9:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 14:36 Support for Silicon C2 Interface Rodolfo Giometti
2008-10-03 14:36 ` [PATCH 1/1] Add c2 port support Rodolfo Giometti
2008-10-03 21:59   ` Greg KH
2008-10-07  9:38     ` Rodolfo Giometti [this message]
2008-10-07 17:30       ` Greg KH
2008-10-07 19:14         ` Rodolfo Giometti
2008-10-07 20:00           ` Greg KH
2008-10-07 20:27             ` Rodolfo Giometti
2008-10-03 14:49 ` Support for Silicon C2 Interface Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081007093845.GD13035@tekkaman \
    --to=giometti@enneenne.com \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox