BigW Consortium Gitlab

Commit 0b9b861e by David Frey

Provide relevant platform data for mcp251x IoT card by default

parent 88d9a19c
...@@ -1024,6 +1024,10 @@ static const struct spi_device_id mcp251x_id_table[] = { ...@@ -1024,6 +1024,10 @@ static const struct spi_device_id mcp251x_id_table[] = {
}; };
MODULE_DEVICE_TABLE(spi, mcp251x_id_table); MODULE_DEVICE_TABLE(spi, mcp251x_id_table);
static struct mcp251x_platform_data msm_mcp2515_pdata = {
.oscillator_frequency = 16*1000*1000,
};
static int mcp251x_can_probe(struct spi_device *spi) static int mcp251x_can_probe(struct spi_device *spi)
{ {
const struct of_device_id *of_id = of_match_device(mcp251x_of_match, const struct of_device_id *of_id = of_match_device(mcp251x_of_match,
...@@ -1034,6 +1038,9 @@ static int mcp251x_can_probe(struct spi_device *spi) ...@@ -1034,6 +1038,9 @@ static int mcp251x_can_probe(struct spi_device *spi)
int freq, ret = -ENODEV; int freq, ret = -ENODEV;
struct clk *clk; struct clk *clk;
if (!pdata)
pdata = &msm_mcp2515_pdata;
clk = devm_clk_get(&spi->dev, NULL); clk = devm_clk_get(&spi->dev, NULL);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
if (pdata) if (pdata)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment