lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 5 May 2015 15:29:54 +0300
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Wolfram Sang <wsa@...-dreams.de>,
	Octavian Purdila <octavian.purdila@...el.com>,
	Robert Dolca <robert.dolca@...el.com>,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-acpi@...r.kernel.org
Subject: Re: [PATCH 1/2] gpio / ACPI: Add support for retrieving GpioInt
 resources from a device

On Tue, May 05, 2015 at 01:47:36AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, April 28, 2015 06:05:06 PM Mika Westerberg wrote:
> > ACPI specification knows two types of GPIOs: GpioIo and GpioInt. The latter
> > is used to describe that a given device interrupt line is connected to a
> > specific GPIO pin. Typical ACPI _CRS entry for such device looks like
> > below:
> > 
> >     Name (_CRS, ResourceTemplate ()
> >     {
> >         I2cSerialBus (0x004A, ControllerInitiated, 0x00061A80,
> >                       AddressingMode7Bit, "\\_SB.PCI0.I2C6",
> >                       0x00, ResourceConsumer)
> >         GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
> >                 IoRestrictionOutputOnly, "\\_SB.GPO0",
> >                 0x00, ResourceConsumer)
> >         {
> >             0x004B
> >         }
> >         GpioInt (Level, ActiveLow, Shared, PullDefault, 0x0000,
> >                  "\\_SB.GPO0", 0x00, ResourceConsumer)
> >         {
> >             0x004C
> >         }
> >     })
> > 
> > Currently drivers need to request a GPIO corresponding to the right GpioInt
> > and then translate that to Linux IRQ number. This adds unnecessary lines of
> > boiler-plate code.
> > 
> > We can ease this a bit by introducing acpi_dev_gpio_irq_get() analogous to
> > of_irq_get(). This function translates given GpioInt resource under the
> > device in question to the suitable Linux IRQ number.
> > 
> > Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Thanks Rafael.

I'm going to change the other patch a bit to address conserns from
Wolfram so that we will use irq == 0 to indicate an invalid interrupt
instead of -1.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ