mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Asier Llano Palacios <a.llano@usyscom.com>
Cc: Jamey Hicks <jamey.hicks@hp.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: gpio api
Date: Mon, 21 Feb 2005 10:18:51 +0000	[thread overview]
Message-ID: <20050221101851.B28213@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1108980144.15299.16.camel@localhost.localdomain>; from a.llano@usyscom.com on Mon, Feb 21, 2005 at 11:02:24AM +0100

On Mon, Feb 21, 2005 at 11:02:24AM +0100, Asier Llano Palacios wrote:
> The GPIOs requesting and numbering should be done by specifying the
> chip, the port and the pin. We should be able to manipulate easily a
> GPIO from one of 3 I2C chips and another one from our microprocessor.

I think there's a problem with this approach:

- I2C chips require you to talk to them via a relatively slow bus.
  The I2C subsystem takes a semaphore, so it can be used from interrupt
  context.
- You may wish to use GPIOs (especially on-chip GPIOs) from interrupt
  context.

Therefore, you don't have a clear locking model for a GPIO subsystem.
You'll probably be in the situation where some GPIOs may be locked by
spinlocks (which are fine to manipulate from interrupt context) and
others which are locked by semaphores - so you don't actually know
what's going on beneath the GPIO API.

This is real bad news in terms of ensuring correctness and being able to
review.

-- 
Russell King


  reply	other threads:[~2005-02-21 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-18 13:46 Jamey Hicks
2005-02-18 14:35 ` Jörn Engel
2005-02-21 10:02 ` Asier Llano Palacios
2005-02-21 10:18   ` Russell King [this message]
2005-02-22  2:18   ` Yoichi Yuasa

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=20050221101851.B28213@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=a.llano@usyscom.com \
    --cc=jamey.hicks@hp.com \
    --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

all inboxes | Powered by JetHome®