Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
regmap-irq.c File Reference
#include <linux/export.h>
#include <linux/device.h>
#include <linux/regmap.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  regmap_irq_chip_data
 

Functions

int regmap_add_irq_chip (struct regmap *map, int irq, int irq_flags, int irq_base, const struct regmap_irq_chip *chip, struct regmap_irq_chip_data **data)
 
 EXPORT_SYMBOL_GPL (regmap_add_irq_chip)
 
void regmap_del_irq_chip (int irq, struct regmap_irq_chip_data *d)
 
 EXPORT_SYMBOL_GPL (regmap_del_irq_chip)
 
int regmap_irq_chip_get_base (struct regmap_irq_chip_data *data)
 
 EXPORT_SYMBOL_GPL (regmap_irq_chip_get_base)
 
int regmap_irq_get_virq (struct regmap_irq_chip_data *data, int irq)
 
 EXPORT_SYMBOL_GPL (regmap_irq_get_virq)
 

Function Documentation

EXPORT_SYMBOL_GPL ( regmap_add_irq_chip  )
EXPORT_SYMBOL_GPL ( regmap_del_irq_chip  )
EXPORT_SYMBOL_GPL ( regmap_irq_chip_get_base  )
EXPORT_SYMBOL_GPL ( regmap_irq_get_virq  )
int regmap_add_irq_chip ( struct regmap map,
int  irq,
int  irq_flags,
int  irq_base,
const struct regmap_irq_chip *  chip,
struct regmap_irq_chip_data **  data 
)

regmap_add_irq_chip(): Use standard regmap IRQ controller handling

map: The regmap for the device. irq: The IRQ the device uses to signal interrupts irq_flags: The IRQF_ flags to use for the primary interrupt. chip: Configuration for the interrupt controller. data: Runtime data structure for the controller, allocated on success

Returns 0 on success or an errno on failure.

In order for this to be efficient the chip really should use a register cache. The chip driver is responsible for restoring the register values used by the IRQ controller over suspend and resume.

Definition at line 263 of file regmap-irq.c.

void regmap_del_irq_chip ( int  irq,
struct regmap_irq_chip_data d 
)

regmap_del_irq_chip(): Stop interrupt handling for a regmap IRQ chip

: Primary IRQ for the device : regmap_irq_chip_data allocated by regmap_add_irq_chip()

Definition at line 415 of file regmap-irq.c.

int regmap_irq_chip_get_base ( struct regmap_irq_chip_data data)

regmap_irq_chip_get_base(): Retrieve interrupt base for a regmap IRQ chip

Useful for drivers to request their own IRQs.

: regmap_irq controller to operate on.

Definition at line 437 of file regmap-irq.c.

int regmap_irq_get_virq ( struct regmap_irq_chip_data data,
int  irq 
)

regmap_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ

Useful for drivers to request their own IRQs.

: regmap_irq controller to operate on. : index of the interrupt requested in the chip IRQs

Definition at line 452 of file regmap-irq.c.