public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hans J. Koch" <hjk@hansjkoch.de>
To: "Worth, Kevin" <kevin.worth@hp.com>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: Using uio_pdrv to create an platform device for an FPGA, mmap() fails
Date: Fri, 31 Aug 2012 10:42:38 +0200	[thread overview]
Message-ID: <20120831084238.GD4819@local> (raw)
In-Reply-To: <B5EF724456FFB24A8C8AE88E26CE8F4B66840DF2@G9W0725.americas.hpqcorp.net>

On Thu, Aug 30, 2012 at 11:03:04PM +0000, Worth, Kevin wrote:
> >
> >>  but the code seems like
> >> possibly useful sample/example code.
> >
> >That is another good argument.
> 
> Perhaps this could be genericized to be a generic "Memory Map Userspace
> IO Device" that takes a base address and a length in config (since those
> are really the only things that are particular to my device/usage).

I don't see a point in making it more generic than it already is. Other
people's devices generate interrupts or have several mappings. Since these
drivers are so small, especially when using uio_pdrv, it doesn't make sense
to make it more generic.

> Could be enhanced to allow for additional maps, etc. or just serve as a
> working example. Docs could then also simply refer to this as an example
> of a device that uses the uio_pdrv driver.

Just make your driver clean and simple, then refer to it in the docs as one
possible example.

Thanks,
Hans


      reply	other threads:[~2012-08-31  8:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 23:19 Using uio_pdrv to create an platform device for an FPGA, mmap() fails Worth, Kevin
2012-08-30  3:27 ` Hans J. Koch
2012-08-30 18:36   ` Worth, Kevin
2012-08-30 19:00     ` Hans J. Koch
2012-08-30 20:10       ` Worth, Kevin
2012-08-30 22:24         ` Hans J. Koch
2012-08-30 23:03           ` Worth, Kevin
2012-08-31  8:42             ` Hans J. Koch [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=20120831084238.GD4819@local \
    --to=hjk@hansjkoch.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kevin.worth@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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