public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Stigge <stigge@antcom.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: gregkh@linuxfoundation.org, grant.likely@secretlab.ca,
	linus.walleij@linaro.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, w.sang@pengutronix.de,
	jbe@pengutronix.de, plagnioj@jcrosoft.com, highguy@gmail.com,
	broonie@opensource.wolfsonmicro.com, daniel-gl@gmx.net,
	rmallon@gmail.com, tru@work-microwave.de, sr@denx.de,
	wg@grandegger.com
Subject: Re: [PATCH 0/6 v10] gpio: Add block GPIO
Date: Fri, 07 Dec 2012 13:06:44 +0100	[thread overview]
Message-ID: <50C1DBD4.1040007@antcom.de> (raw)
In-Reply-To: <20121207103643.34ca6dc5@pyramind.ukuu.org.uk>

On 12/07/2012 11:36 AM, Alan Cox wrote:
>> * Device interface for userland access (alternative to sysfs)
> 
> Currently we can set different permissions on different GPIO lines. Your
> driver change drives a truck through this facility.
> 
> I'm not sure there is an elegant way to snoop on the permissions set
> on the sysfs gpio nodes and the driver also breaks managing GPIO rights
> via smack/selinux/apparmor and assigning specific gpio lines to specific
> pieces of user space code.

Right. It's difficult to synchronize sysfs and dev node permissions from
the kernel. But since those permissions are set up and maintained from
userspace, maybe we can leave it to the respective facilities there?

Regarding different permissions of individual GPIOs that could end up in
a single GPIO block: You can group GPIOs into separate blocks that are
supposed to group with the same permissions. Especially, you don't need
to put all GPIOs of one gpio_chip into one block.

And finally, you are not forced to use such blocks. Use it optionally
where you group GPIOs into one bus or n-bit interface. E.g., you
typically won't give different permissions to the different lines on an
SD card interface.

Anyway - suggestions (and specific requests for necessary features of
the device interface) welcome!

Thanks in advance,

Roland

  reply	other threads:[~2012-12-07 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 21:47 [PATCH 0/6 v10] gpio: Add block GPIO Roland Stigge
2012-12-06 21:47 ` [PATCH 1/6 v10] gpio: Add a block GPIO API to gpiolib Roland Stigge
2012-12-06 21:47 ` [PATCH 2/6 v10] gpio: Add sysfs support to block GPIO API Roland Stigge
2012-12-06 21:47 ` [PATCH 3/6 v10] gpio: Add userland device interface to block GPIO Roland Stigge
2012-12-06 21:47 ` [PATCH 4/6 v10] gpiolib: Fix default attributes for class Roland Stigge
2012-12-06 21:47 ` [PATCH 5/6 v10] gpio: Add device tree support to block GPIO API Roland Stigge
2012-12-06 21:47 ` [PATCH 6/6 v10] gpio: Add block gpio to several gpio drivers Roland Stigge
2012-12-07 10:36 ` [PATCH 0/6 v10] gpio: Add block GPIO Alan Cox
2012-12-07 12:06   ` Roland Stigge [this message]
2012-12-07 12:16     ` Roland Stigge
2012-12-07 17:02       ` Alan Cox
2012-12-07 17:33         ` Roland Stigge
2012-12-07 21:28           ` Alan Cox

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=50C1DBD4.1040007@antcom.de \
    --to=stigge@antcom.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=daniel-gl@gmx.net \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=highguy@gmail.com \
    --cc=jbe@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=rmallon@gmail.com \
    --cc=sr@denx.de \
    --cc=tru@work-microwave.de \
    --cc=w.sang@pengutronix.de \
    --cc=wg@grandegger.com \
    /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