All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: FPGA registers userspace interface?
Date: Mon, 3 Jan 2011 13:29:11 -0800	[thread overview]
Message-ID: <20110103212911.GA4776@kroah.com> (raw)
In-Reply-To: <AANLkTinRz_6_+eqQ2pp3zS7BPYzuqALbu63PnKCcAFjJ@mail.gmail.com>

On Mon, Jan 03, 2011 at 10:52:34PM +0200, Daniel Baluta wrote:
> > I thought about using 3 files in sysfs.
> > 1. address of the register
> > 2. data to write to the register
> > 3. trigger that do the write
> 
> The most effective solution would be to
> have one file per register.
> 
> Writing register:
> # echo value > /sys/path/to/file
> 
> Reading register:
> # cat /sys/path/to/file
> 
> Also, since your FPGA is in development phase I assume that
> the registers base address is changing (or am I wrong?). You can
> solve this with an additional writable sysfs entry  which will
> hold the current base address.

Also remember that debugfs would also be good for something like this,
being much easier to use than sysfs.

Note the rule when using debugfs:
	There is are no rules when using debugfs.

Which works much better when doing development :)

thanks,

greg k-h

      reply	other threads:[~2011-01-03 21:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 12:47 FPGA registers userspace interface? Kfir Lavi
2011-01-03 12:57 ` Daniel Baluta
2011-01-03 13:00 ` Philip Downer
2011-01-03 15:09   ` Kfir Lavi
2011-01-03 15:21     ` Kfir Lavi
2011-01-03 20:52       ` Daniel Baluta
2011-01-03 21:29         ` Greg KH [this message]

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=20110103212911.GA4776@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.