The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Tobias Müller" <Tobias_Mueller@twam.info>
To: Andres Salomon <dilinger@collabora.co.uk>
Cc: akpm@linux-foundation.org, Randy Dunlap <randy.dunlap@oracle.com>,
	deepak@laptop.org, Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org, linux-geode@lists.infradead.org,
	jordan@cosmicpenguin.net, cjb@laptop.org,
	David Brownell <david-b@pacbell.net>
Subject: Re: [PATCH 1/2] cs5535-gpio: add AMD CS5535/CS5536 GPIO driver  support
Date: Sat, 20 Jun 2009 12:20:23 +0200	[thread overview]
Message-ID: <17be05570906200320t5be9393areaa39c7332d381bc@mail.gmail.com> (raw)
In-Reply-To: <20090612202334.62c032ac@mycelium.queued.net>

2009/6/13 Andres Salomon <dilinger@collabora.co.uk>:
> On Thu, 11 Jun 2009 23:35:55 +0200
> Tobias Müller <Tobias_Mueller@twam.info> wrote:
>
>> >> /**
>> >> * Some GPIO pins
>> >> *  31-29,23 : reserved (always mask out)
>> >> *  28       : Power Button
>> >> *  26       : PME#
>> >> *  22-16    : LPC
>> >> *  14,15    : SMBus
>> >> *  9,8      : UART1
>> >> *  7        : PCI INTB
>> >> *  3,4      : UART2/DDC
>> >> *  2        : IDE_IRQ0
>> >> *  1        : AC_BEEP
>> >> *  0        : PCI INTA
>> >> *
>> >> * If a mask was not specified, be conservative and only allow:
>> >> *  1,2,5,6,10-13,24,25,27
>> >> */
>> >>
>> >> I'll add this in my patch to clear it out.
>> >>
>> >
>> > But why are you being conservative in the first place?  If
>> > something's using GPIOs, unless they're unmapped, you should allow
>> > it to use them without requiring a boot arg.
>> >
>> > For example, OLPC uses GPIO 7 for its DCON IRQ.  With the masking
>> > scheme, OLPC will need to set that mask from the default.  I don't
>> > see the point of having the mask at all if other drivers in the
>> > kernel are going to be requesting GPIOs (presumably they know what
>> > they're doing).
>> Hmm... OK, this makes sense. So default mask allow everything exept
>> reserved pins and pin 28 (power button).
>>
>> I think the mask is quite useful if you've critical things on GPIO
>> pins and they should be changeable (especially from userspace and when
>> non-root users are allowed to use userspace gpio).
>
> I agree that it would be useful for userspace, just not for
> kernelspace.  Is there a way that you can have it only enforce the
> mask if the request is coming from userspace?

I didn't find a way to find out if a request is coming from userspace, so at
the moment I think it's only possible to set it global.

  reply	other threads:[~2009-06-20 10:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10  4:10 [PATCH 1/2] cs5535-gpio: add AMD CS5535/CS5536 GPIO driver support Andres Salomon
2009-06-11 14:46 ` Tobias Müller
2009-06-11 15:16   ` Andres Salomon
2009-06-11 18:52 ` Tobias Müller
2009-06-11 20:00   ` Andres Salomon
2009-06-11 20:11     ` Tobias Müller
2009-06-11 21:28       ` Andres Salomon
2009-06-11 21:35         ` Tobias Müller
2009-06-13  0:23           ` Andres Salomon
2009-06-20 10:20             ` Tobias Müller [this message]
2009-07-01 22:32         ` David Brownell
2009-08-15 10:59           ` Tobias Müller
2009-08-18  4:43             ` Andres Salomon
2009-08-18  8:32               ` Tobias Müller

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=17be05570906200320t5be9393areaa39c7332d381bc@mail.gmail.com \
    --to=tobias_mueller@twam.info \
    --cc=akpm@linux-foundation.org \
    --cc=cjb@laptop.org \
    --cc=david-b@pacbell.net \
    --cc=deepak@laptop.org \
    --cc=dilinger@collabora.co.uk \
    --cc=jordan@cosmicpenguin.net \
    --cc=linux-geode@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=tiwai@suse.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