aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel_pmic_gpio.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-10x86 platform drivers: fix gpio leakLibo Chen1-1/+5
when request_irq fails, we should release gpiochip v2: fix warning: ignoring return value of 'gpiochip_remove Signed-off-by: Libo Chen <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-03Drivers: platform: x86: remove __dev* attributes.Greg Kroah-Hartman1-1/+1
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <[email protected]> Cc: Joey Lee <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Peter Feuerer <[email protected]> Cc: Corentin Chary <[email protected]> Cc: Cezary Jackiewicz <[email protected]> Cc: Robert Gerlach <[email protected]> Cc: Ike Panhc <[email protected]> Cc: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-27intel_pmic_gpio: Convert printks to pr_<level>Joe Perches1-7/+7
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 <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-04-13x86 platform drivers: Build fix for intel_pmic_gpioMatthew Garrett1-1/+1
Fix an incorrect function name so the driver builds. Signed-off-by: Matthew Garrett <[email protected]>
2011-04-04platform-drivers: x86: pmic: Restore the dropped buslock/unlockThomas Gleixner1-4/+39
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 <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-29drivers: Final irq namespace conversionThomas Gleixner1-3/+5
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-21platform-drivers: x86: pmic: Use request_irq instead of chained handlerThomas Gleixner1-38/+12
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 <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2011-02-07platform-drivers: x86: pmic: Use irq_chip buslock mechanismThomas Gleixner1-48/+32
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 <[email protected]> Cc: Feng Tang <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Alan Cox <[email protected]> Cc: Alek Du <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-02-07platform-drivers: x86: Convert pmic to new irq_chip functionsThomas Gleixner1-14/+8
Old functions will go away soon. Remove the stray semicolons while at it. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Feng Tang <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Alan Cox <[email protected]> Cc: Alek Du <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-02-07platform-drivers: x86: pmic: Fix up bogus irq hackeryThomas Gleixner1-5/+1
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 <[email protected]> Cc: Feng Tang <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Alan Cox <[email protected]> Cc: Alek Du <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-01-07[PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq ↵Feng Tang1-1/+5
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 <[email protected]> Signed-off-by: Feng Tang <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2010-10-27Remove duplicate includes from many filesZimny Lech1-1/+0
Signed-off-by: Zimny Lech <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-21intel_pmic_gpio: fix off-by-one value range checkingAxel Lin1-1/+1
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 <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2010-10-21intel_pmic_gpio: swap the bits and mask args for intel_scu_ipc_update_registerAlek Du1-12/+12
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 <[email protected]> Signed-off-by: Alek Du <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2010-08-03gpio: Add PMIC GPIO block supportAlek Du1-0/+340
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 <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>