From: Andres Salomon <dilinger@queued.net>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Daniel Drake <dsd@laptop.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/11] x86, olpc-xo1-sci: Add GPE handler and ebook switch functionality
Date: Mon, 16 May 2011 09:07:18 -0700 [thread overview]
Message-ID: <20110516090718.66b5368a@debxo> (raw)
In-Reply-To: <20110516090813.GA26487@linutronix.de>
On Mon, 16 May 2011 11:08:13 +0200
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> * Daniel Drake | 2011-04-30 13:32:26 [+0100]:
>
> >diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c
> >b/arch/x86/platform/olpc/olpc-xo1-sci.c index 8fbf961..9de2a00 100644
> >--- a/arch/x86/platform/olpc/olpc-xo1-sci.c
> >+++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
> >@@ -104,6 +177,37 @@ static int __devinit setup_sci_interrupt(struct
> >platform_device *pdev)
> > return r;
> > }
> >
> >+static int __devinit setup_ec_sci(void)
> >+{
> >+ int r;
> >+
> >+ r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");
> >+ if (r)
> >+ return r;
> >+
> >+ gpio_direction_input(OLPC_GPIO_ECSCI);
> >+
> >+ /* Clear pending EC SCI events */
> >+ cs5535_gpio_set(OLPC_GPIO_ECSCI, GPIO_NEGATIVE_EDGE_STS);
> >+ cs5535_gpio_set(OLPC_GPIO_ECSCI, GPIO_POSITIVE_EDGE_STS);
>
> why not use the gpio framework here, i.e. gpio_set_value()?
The gpio framework is designed to work with toggling GPIO lines.
To deal with that, the cs5535 gpio driver (when toggling a GPIO line)
would set or clear CS5535_OUTPUT_VAL. The cs5535 hardware, however,
can have a whole range of values set per a single GPIO line; amongst
these, positive and negative edge status. Most users of the cs5535
GPIOs don't care about that, but those that do (like this SCI driver)
must use the custom cs5535 GPIO functions to set/clear it.
>
> >+
> >+ /* Enable EC SCI events */
> >+ cs5535_gpio_set(OLPC_GPIO_ECSCI, GPIO_EVENTS_ENABLE);
> >+
> >+ /* Set the SCI to cause a PME event on group 7 */
> >+ cs5535_gpio_setup_event(OLPC_GPIO_ECSCI, 7, 1);
> >+
> >+ /* And have group 7 also fire the SCI interrupt */
> >+ cs5535_gpio_set_irq(7, sci_irq);
>
> What do you do here? Could this be hidden behind a gpio irq_chip or is
> this too olpc specific?
>
> Sebastian
next prev parent reply other threads:[~2011-05-16 16:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-30 12:32 [PATCH 0/11] OLPC Power Management Daniel Drake
2011-04-30 12:32 ` [PATCH 01/11] x86, olpc: add missing elements to device tree Daniel Drake
2011-04-30 12:32 ` [PATCH 02/11] x86, olpc: Move CS5536-related constants to cs5535.h Daniel Drake
2011-04-30 12:32 ` [PATCH 03/11] x86, olpc: rename olpc-xo1 to olpc-xo1-pm Daniel Drake
2011-04-30 12:32 ` [PATCH 04/11] x86, olpc: Add XO-1 suspend/resume support Daniel Drake
2011-04-30 12:32 ` [PATCH 05/11] x86, olpc: Add XO-1 SCI driver and power button control Daniel Drake
2011-04-30 12:32 ` [PATCH 06/11] x86, olpc: EC SCI wakeup mask functionality Daniel Drake
2011-04-30 12:32 ` [PATCH 07/11] x86, olpc-xo1-sci: Add GPE handler and ebook switch functionality Daniel Drake
2011-05-16 9:08 ` Sebastian Andrzej Siewior
2011-05-16 16:07 ` Andres Salomon [this message]
2011-05-24 21:40 ` Daniel Drake
2011-05-31 11:28 ` Sebastian Andrzej Siewior
2011-05-31 20:48 ` Daniel Drake
2011-06-09 0:25 ` Andres Salomon
2011-04-30 12:32 ` [PATCH 08/11] x86, olpc-xo1-sci: Add lid " Daniel Drake
2011-04-30 12:32 ` [PATCH 09/11] x86, olpc-xo1-sci: Propagate power supply/battery events Daniel Drake
2011-04-30 12:32 ` [PATCH 10/11] x86, olpc: Add XO-1 RTC driver Daniel Drake
2011-05-16 9:18 ` Sebastian Andrzej Siewior
2011-05-19 19:35 ` Grant Likely
2011-04-30 12:32 ` [PATCH 11/11] x86, olpc: Add XO-1.5 SCI driver Daniel Drake
2011-05-16 9:24 ` Sebastian Andrzej Siewior
2011-05-24 21:52 ` Daniel Drake
2011-04-30 17:07 ` [PATCH 0/11] OLPC Power Management Andres Salomon
2011-05-14 19:09 ` Daniel Drake
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=20110516090718.66b5368a@debxo \
--to=dilinger@queued.net \
--cc=bigeasy@linutronix.de \
--cc=dsd@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@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