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>
This commit is contained in:
committed by
David S. Miller
parent
598ed9367a
commit
e446630c96
@@ -73,7 +73,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info4 = {
|
||||
|
||||
static struct mcp251x_platform_data mcp251x_info = {
|
||||
.oscillator_frequency = 16E6,
|
||||
.model = CAN_MCP251X_MCP2515,
|
||||
.board_specific_setup = NULL,
|
||||
.power_enable = NULL,
|
||||
.transceiver_enable = NULL
|
||||
@@ -81,7 +80,7 @@ static struct mcp251x_platform_data mcp251x_info = {
|
||||
|
||||
static struct spi_board_info mcp251x_board_info[] = {
|
||||
{
|
||||
.modalias = "mcp251x",
|
||||
.modalias = "mcp2515",
|
||||
.max_speed_hz = 6500000,
|
||||
.bus_num = 3,
|
||||
.chip_select = 0,
|
||||
@@ -90,7 +89,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1)
|
||||
},
|
||||
{
|
||||
.modalias = "mcp251x",
|
||||
.modalias = "mcp2515",
|
||||
.max_speed_hz = 6500000,
|
||||
.bus_num = 3,
|
||||
.chip_select = 1,
|
||||
@@ -99,7 +98,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2)
|
||||
},
|
||||
{
|
||||
.modalias = "mcp251x",
|
||||
.modalias = "mcp2515",
|
||||
.max_speed_hz = 6500000,
|
||||
.bus_num = 4,
|
||||
.chip_select = 0,
|
||||
@@ -108,7 +107,7 @@ static struct spi_board_info mcp251x_board_info[] = {
|
||||
.irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3)
|
||||
},
|
||||
{
|
||||
.modalias = "mcp251x",
|
||||
.modalias = "mcp2515",
|
||||
.max_speed_hz = 6500000,
|
||||
.bus_num = 4,
|
||||
.chip_select = 1,
|
||||
|
Reference in New Issue
Block a user