File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 14
14
#include <linux/platform_device.h>
15
15
#include <linux/clk.h>
16
16
#include <linux/spi/spi.h>
17
+ #include <linux/of.h>
17
18
18
19
#include <asm/mach-ath79/ar71xx_regs.h>
19
20
@@ -150,6 +151,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
150
151
if (IS_ERR (ahb_clk ))
151
152
return PTR_ERR (ahb_clk );
152
153
154
+ master -> dev .of_node = pdev -> dev .of_node ;
153
155
master -> bus_num = 0 ;
154
156
master -> num_chipselect = 3 ;
155
157
master -> mode_bits = SPI_TX_DUAL ;
@@ -188,11 +190,18 @@ static int rb4xx_spi_remove(struct platform_device *pdev)
188
190
return 0 ;
189
191
}
190
192
193
+ static const struct of_device_id rb4xx_spi_dt_match [] = {
194
+ { .compatible = "mikrotik,rb4xx-spi" },
195
+ { },
196
+ };
197
+ MODULE_DEVICE_TABLE (of , rb4xx_spi_dt_match );
198
+
191
199
static struct platform_driver rb4xx_spi_drv = {
192
200
.probe = rb4xx_spi_probe ,
193
201
.remove = rb4xx_spi_remove ,
194
202
.driver = {
195
203
.name = "rb4xx-spi" ,
204
+ .of_match_table = of_match_ptr (rb4xx_spi_dt_match ),
196
205
},
197
206
};
198
207
You can’t perform that action at this time.
0 commit comments