History log of /drivers/platform/x86/intel_pmic_gpio.c
Revision Date Author Comments
9a2ffd168ef8ec3705060ffb21d6dcb20eeb9506 30-Mar-2011 Joe Perches <joe@perches.com> intel_pmic_gpio: Convert printks to pr_<level>

Add #define pr_fmt(fmt) "%s: " fmt, __func__
to prefix function name to each output message.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
21a8d026e0721f90ae03084e96a215632c80fc13 13-Apr-2011 Matthew Garrett <mjg@redhat.com> x86 platform drivers: Build fix for intel_pmic_gpio

Fix an incorrect function name so the driver builds.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
65d7ac038e34702feedad91d0bf597b1f0a4174a 02-Apr-2011 Thomas Gleixner <tglx@linutronix.de> platform-drivers: x86: pmic: Restore the dropped buslock/unlock

When I added the buslock/unlock mechanism to the pmic code in order to
get rid of the horrible work queue stuff, stupid me missed to add the
new callbacks to the irq_chip.

In consequence Andrew removed the unused functions, but I missed that.

Add them back and hook them up proper.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
dced35aeb0367dda2636ee9ee914bda14510dcc9 28-Mar-2011 Thomas Gleixner <tglx@linutronix.de> drivers: Final irq namespace conversion

Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
98401ae43413ac374c0eb8d6018b13495e08f948 07-Feb-2011 Thomas Gleixner <tglx@linutronix.de> platform-drivers: x86: pmic: Use request_irq instead of chained handler

There is no need to install a chained handler for this hardware. This
is a plain x86 IOAPIC interrupt which is handled by the core code
perfectly fine. There is nothing special about demultiplexing these
gpio interrupts which justifies a custom hack. Replace it by a plain
old interrupt handler installed with request_irq. That makes the code
agnostic about the underlying primary interrupt hardware. The overhead
for this is minimal, but it gives us the advantage of accounting,
balancing and to detect interrupt storms. gpio interrupts are not
really that performance critical.

Patch fixups from akpm

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
d4b7de612d193e1c8fdeee9902e5a582e746dfe9 05-Feb-2011 Thomas Gleixner <tglx@linutronix.de> platform-drivers: x86: pmic: Use irq_chip buslock mechanism

The set_type function of the pmic irq chip is a horrible hack. It
schedules work because it cannot access the scu chip from the set_type
function. That breaks the assumption, that the type is set after
set_type has returned.

irq_chips provide buslock functions to avoid the above. Convert the
driver to use the proper model.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
cb8e5e6a60cab5a90afd45d49655458c6e1db78c 05-Feb-2011 Thomas Gleixner <tglx@linutronix.de> platform-drivers: x86: Convert pmic to new irq_chip functions

Old functions will go away soon. Remove the stray semicolons while at
it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
180e9d19eed63b0b153aff9f300b913f48788e37 05-Feb-2011 Thomas Gleixner <tglx@linutronix.de> platform-drivers: x86: pmic: Fix up bogus irq hackery

commit 456dc301([PATCH] intel_pmic_gpio: modify EOI handling following
change of kernel irq subsystem) changes

- desc->chip->eoi(irq);
+
+ if (desc->chip->irq_eoi)
+ desc->chip->irq_eoi(irq_get_irq_data(irq));
+ else
+ dev_warn(pg->chip.dev, "missing EOI handler for irq %d\n", irq);

With the following explanation:

"Latest kernel has many changes in IRQ subsystem and its interfaces,
like adding irq_eoi" for struct irq_chip, this patch will make it
support both the new and old interface."

This is completely bogus.

#1) The changelog does not match the patch at all

#2) This driver relies on the assumption that it sits behind an eoi
capable interrupt line. If the implementation of the underlying
chip changes from eoi to irq_eoi then this driver has to follow
that change and not add a total bogosity.

Remove the sillyness and retrieve the interrupt data from irq_desc
directly. No need to got through circles to look it up.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
456dc301cc3b547b2a674de3028f53fb1453e532 31-Dec-2010 Feng Tang <feng.tang@intel.com> [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem

Latest kernel has many changes in IRQ subsystem and its interfaces, like adding
"irq_eoi" for struct irq_chip, this patch will make it support both the new
and old interface.

Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
61d8e11e519ee7912ab59610fba1aaf08e3c1d84 28-Oct-2010 Zimny Lech <napohybelskurwysynom2010@gmail.com> Remove duplicate includes from many files

Signed-off-by: Zimny Lech <napohybelskurwysynom2010@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4119617919c243755946699808ffd0f4befa62c7 08-Oct-2010 Axel Lin <axel.lin@gmail.com> intel_pmic_gpio: fix off-by-one value range checking

In pmic_irq_type(), we use gpio as array index for trigger,
thus the valid value range for gpio should be 0 .. NUM_GPIO - 1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
ffcfff3a8d6cc94f1fb598e0b021c64ce35b5036 04-Oct-2010 Alek Du <alek.du@intel.com> intel_pmic_gpio: swap the bits and mask args for intel_scu_ipc_update_register

The intel_scu_ipc_update_register 2nd paramter should the bits and 3rd
paramter should be the mask.

This typo was introduced during IPC function changing...

Reported-by: Ryan Zhou <ryan.zhou@intel.com>
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
8950778704cf8483cc5cc0140f557adf0d3f45a5 13-Jul-2010 Alek Du <alek.du@intel.com> gpio: Add PMIC GPIO block support

Moorestown has PMIC chip which contains GPIO blocks. The PMIC chip is
connected to Langwell by SPI interface. So this GPIO driver will be regarded
as SPI GPIO expander though the actual GPIO access is through IPC and SRAM.
The SPI master contoller will probe this device driver by parsing SPIB table.

Cleaned up for new IPC, GPE removed and some printk and other tidying by
Alan Cox. Fixes for points noted by Matthew Garrett

Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>