Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1547947

Re: [PATCH] iio: misc: add a generic regulator driver

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] iio: misc: add a generic regulator driver
Date 2016-12-28 14:10 +0100
Message-ID <sTm9r-bB-9@gated-at.bofh.it> (permalink)
References (3 earlier) <sJa9z-4PB-3@gated-at.bofh.it> <sKjNw-2Bb-11@gated-at.bofh.it> <sLmpX-1th-13@gated-at.bofh.it> <sNCqB-75R-25@gated-at.bofh.it> <sNWfD-2go-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 13, 2016 at 3:28 PM, Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:

> + Linus
>
> While the new GPIO interface would be very convenient - in our case we
> could simply name the lines appropriately in the device tree - I'm not
> sure this would be the correct approach.
>
> From this year's ELCE in Berlin I remember Linus suggested during his
> talk that it's always better to write a kernel driver. Also: this way
> the relevant GPIO lines would not be reserved for exclusive use by
> power switches.
>
> Linus - do you have any thoughts/suggestions on that subject?

If the probe you are power cycling has its own DT node and is
described as a device per se in the system, then it should have
a device driver grabbing and toggling its own GPIO line.

If the probe is only really known in userspace, and driven
from userspace, it's GPIO reset line should also be driven
from userspace, using the chardev ABI as you describe.

Whether something should have a userspace or kernelspace
driver is a gray area, admittedly. There are cases for both.
The general consideration would be reuse and deployment.
If you expect all users of this probe to always use libiio and
some other userspace, I guess userspace-only makes sense?

Yours,
Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] iio: misc: add a generic regulator driver Lars-Peter Clausen <lars@metafoo.de> - 2016-12-12 18:20 +0100
  Re: [PATCH] iio: misc: add a generic regulator driver Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-13 15:30 +0100
    Re: [PATCH] iio: misc: add a generic regulator driver Linus Walleij <linus.walleij@linaro.org> - 2016-12-28 14:10 +0100
  Re: [PATCH] iio: misc: add a generic regulator driver Geert Uytterhoeven <geert@linux-m68k.org> - 2016-12-23 11:10 +0100
    Re: [PATCH] iio: misc: add a generic regulator driver Lars-Peter Clausen <lars@metafoo.de> - 2016-12-23 12:40 +0100
      Re: [PATCH] iio: misc: add a generic regulator driver Geert Uytterhoeven <geert@linux-m68k.org> - 2016-12-23 14:00 +0100
        Re: [PATCH] iio: misc: add a generic regulator driver Jonathan Cameron <jic23@jic23.retrosnub.co.uk> - 2016-12-24 11:50 +0100
      Re: [PATCH] iio: misc: add a generic regulator driver Linus Walleij <linus.walleij@linaro.org> - 2016-12-28 14:10 +0100

csiph-web