diff options
author | Enric Balletbo i Serra <eballetbo@iseebcn.com> | 2011-04-05 03:08:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-06 15:24:26 -0400 |
commit | 34206f267120c839a479d0237db907fa062e7b0f (patch) | |
tree | 9c0ba35cefe44b0913c6cbbc7165869d839abee7 /include/linux/can | |
parent | 35a67edf3570e9b44c34965dd52a6b7f845fb40f (diff) |
can: mcp251x: Allow pass IRQ flags through platform data.
When an interrupt occurs, the INT pin is driven low by the
MCP251x controller (falling edge) but in some cases the INT
pin can be connected to the MPU through a transistor or level
translator which inverts this signal. In this case interrupt
should be configured in rising edge.
This patch adds support to pass the IRQ flags via
mcp251x_platform_data.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/can')
-rw-r--r-- | include/linux/can/platform/mcp251x.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h index 8e20540043f5..089fe43211a4 100644 --- a/include/linux/can/platform/mcp251x.h +++ b/include/linux/can/platform/mcp251x.h | |||
@@ -12,6 +12,7 @@ | |||
12 | /** | 12 | /** |
13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data | 13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data |
14 | * @oscillator_frequency: - oscillator frequency in Hz | 14 | * @oscillator_frequency: - oscillator frequency in Hz |
15 | * @irq_flags: - IRQF configuration flags | ||
15 | * @board_specific_setup: - called before probing the chip (power,reset) | 16 | * @board_specific_setup: - called before probing the chip (power,reset) |
16 | * @transceiver_enable: - called to power on/off the transceiver | 17 | * @transceiver_enable: - called to power on/off the transceiver |
17 | * @power_enable: - called to power on/off the mcp *and* the | 18 | * @power_enable: - called to power on/off the mcp *and* the |
@@ -24,6 +25,7 @@ | |||
24 | 25 | ||
25 | struct mcp251x_platform_data { | 26 | struct mcp251x_platform_data { |
26 | unsigned long oscillator_frequency; | 27 | unsigned long oscillator_frequency; |
28 | unsigned long irq_flags; | ||
27 | int (*board_specific_setup)(struct spi_device *spi); | 29 | int (*board_specific_setup)(struct spi_device *spi); |
28 | int (*transceiver_enable)(int enable); | 30 | int (*transceiver_enable)(int enable); |
29 | int (*power_enable) (int enable); | 31 | int (*power_enable) (int enable); |