diff options
author | Marc Zyngier <maz@misterjones.org> | 2010-03-29 04:57:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-31 02:51:09 -0400 |
commit | e446630c960946b5c1762e4eadb618becef599e7 (patch) | |
tree | 7dc73fc57fd1d38f309b208b6dadfddf248cb05f /arch/arm/mach-pxa/icontrol.c | |
parent | 598ed9367a36ee1fd4ae3271a54a3547a33975a5 (diff) |
Add hotplug support to mcp251x driver
Chip model can now be selected directly by matching the modalias name
(instead of filling the .model field in platform_data), and allows the
module to be auto-loaded. Previous behaviour is of course still supported.
Convert the two in-tree users to this feature (icontrol & zeus).
Tested on an Zeus platform (mcp2515).
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Christian Pellegrin <chripell@fsfe.org>
Cc: Edwin Peer <epeer@tmtservices.co.za>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/arm/mach-pxa/icontrol.c')
-rw-r--r-- | arch/arm/mach-pxa/icontrol.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c index 771137fc1a82..5ccb0ceff6c4 100644 --- a/arch/arm/mach-pxa/icontrol.c +++ b/arch/arm/mach-pxa/icontrol.c | |||
@@ -73,7 +73,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info4 = { | |||
73 | 73 | ||
74 | static struct mcp251x_platform_data mcp251x_info = { | 74 | static struct mcp251x_platform_data mcp251x_info = { |
75 | .oscillator_frequency = 16E6, | 75 | .oscillator_frequency = 16E6, |
76 | .model = CAN_MCP251X_MCP2515, | ||
77 | .board_specific_setup = NULL, | 76 | .board_specific_setup = NULL, |
78 | .power_enable = NULL, | 77 | .power_enable = NULL, |
79 | .transceiver_enable = NULL | 78 | .transceiver_enable = NULL |
@@ -81,7 +80,7 @@ static struct mcp251x_platform_data mcp251x_info = { | |||
81 | 80 | ||
82 | static struct spi_board_info mcp251x_board_info[] = { | 81 | static struct spi_board_info mcp251x_board_info[] = { |
83 | { | 82 | { |
84 | .modalias = "mcp251x", | 83 | .modalias = "mcp2515", |
85 | .max_speed_hz = 6500000, | 84 | .max_speed_hz = 6500000, |
86 | .bus_num = 3, | 85 | .bus_num = 3, |
87 | .chip_select = 0, | 86 | .chip_select = 0, |
@@ -90,7 +89,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
90 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1) | 89 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1) |
91 | }, | 90 | }, |
92 | { | 91 | { |
93 | .modalias = "mcp251x", | 92 | .modalias = "mcp2515", |
94 | .max_speed_hz = 6500000, | 93 | .max_speed_hz = 6500000, |
95 | .bus_num = 3, | 94 | .bus_num = 3, |
96 | .chip_select = 1, | 95 | .chip_select = 1, |
@@ -99,7 +98,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
99 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2) | 98 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2) |
100 | }, | 99 | }, |
101 | { | 100 | { |
102 | .modalias = "mcp251x", | 101 | .modalias = "mcp2515", |
103 | .max_speed_hz = 6500000, | 102 | .max_speed_hz = 6500000, |
104 | .bus_num = 4, | 103 | .bus_num = 4, |
105 | .chip_select = 0, | 104 | .chip_select = 0, |
@@ -108,7 +107,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
108 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3) | 107 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3) |
109 | }, | 108 | }, |
110 | { | 109 | { |
111 | .modalias = "mcp251x", | 110 | .modalias = "mcp2515", |
112 | .max_speed_hz = 6500000, | 111 | .max_speed_hz = 6500000, |
113 | .bus_num = 4, | 112 | .bus_num = 4, |
114 | .chip_select = 1, | 113 | .chip_select = 1, |