linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-doc@vger.kernel.org, brgl@bgdev.pl,
	linus.walleij@linaro.org, andy@kernel.org, corbet@lwn.net
Subject: Re: [PATCH v2 1/9] Documentation: gpio: add chardev userspace API documentation
Date: Mon, 15 Jan 2024 09:30:51 +0800	[thread overview]
Message-ID: <20240115013051.GA27189@rigel> (raw)
In-Reply-To: <CAHp75Vc=oZK=VR6vZ+kTapq5WpySgKVjAfuO6mxcPqPfQe6VRg@mail.gmail.com>

On Mon, Jan 15, 2024 at 03:11:07AM +0200, Andy Shevchenko wrote:
> On Mon, Jan 15, 2024 at 2:49 AM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > Add documentation for the GPIO character device userspace API.
> >
> > Added to the userspace-api book, but also provide a link from the
> > admin-guide book, as historically the GPIO documentation has been
> > there.
>
> ...
>
> > +.. note::
> > +   Do NOT abuse userspace APIs to control hardware that has proper kernel
> > +   drivers. There may already be a driver for your use case, and an existing
> > +   kernel driver is sure to provide a superior solution to bitbashing
> > +   from userspace.
> > +
> > +   Read Documentation/driver-api/gpio/drivers-on-gpio.rst to avoid reinventing
> > +   kernel wheels in userspace.
> > +
> > +   Similarly, for multi-function lines there may be other subsystems, such as
> > +   Documentation/spi/index.rst, Documentation/i2c/index.rst,
> > +   Documentation/driver-api/pwm.rst, Documentation/w1/index.rst etc, that
> > +   provide suitable drivers and APIs for your hardware.
>
> Very good note and would be nice to convince users to follow it:
> https://stackoverflow.com/q/77683532/2511795
> (OOH you might be proud it's Rust, OTOH as described above)
>

Not familiar with that sensor.  And wasn't sure what they were up to or
why, so didn't comment.  You do a good job reminding people in the
forums, though, as above, not sure how many listen.

I'm language agnostic, so choose the language that suits your use case.
You can still do stupid things in any language, though the language may
constrain the set of stupid things you have to play with, or throw in
some bonus ones you didn't realise you were getting (I'm looking at you
C++).

Cheers,
Kent.

  reply	other threads:[~2024-01-15  1:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15  0:48 [PATCH v2 0/9] Documentation: gpio: add character device userspace API documentation Kent Gibson
2024-01-15  0:48 ` [PATCH v2 1/9] Documentation: gpio: add chardev " Kent Gibson
2024-01-15  1:11   ` Andy Shevchenko
2024-01-15  1:30     ` Kent Gibson [this message]
2024-01-15  0:48 ` [PATCH v2 2/9] Documentation: ABI: update gpio-cdev to reference chardev.rst Kent Gibson
2024-01-15  0:48 ` [PATCH v2 3/9] Documentation: ABI: update sysfs-gpio to reference gpio-cdev Kent Gibson
2024-01-15  0:48 ` [PATCH v2 4/9] Documentation: gpio: move sysfs into an obsolete section Kent Gibson
2024-01-15  0:48 ` [PATCH v2 5/9] Documentation: gpio: update sysfs documentation to reference new chardev doc Kent Gibson
2024-01-15  0:48 ` [PATCH v2 6/9] Documentation: gpio: add chardev v1 userspace API documentation Kent Gibson
2024-01-15  0:48 ` [PATCH v2 7/9] Documentation: gpio: capitalize GPIO in index title Kent Gibson
2024-01-15  0:48 ` [PATCH v2 8/9] Documentation: gpio: document gpio-mockup as obsoleted by gpio-sim Kent Gibson
2024-01-15  0:48 ` [PATCH v2 9/9] Documentation: gpio: move gpio-mockup into obsolete section Kent Gibson
2024-01-15  1:20   ` Andy Shevchenko
2024-01-15  1:36     ` Kent Gibson
2024-01-22  9:50 ` [PATCH v2 0/9] Documentation: gpio: add character device userspace API documentation Bartosz Golaszewski

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=20240115013051.GA27189@rigel \
    --to=warthog618@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=corbet@lwn.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).