diff options
| author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-06 08:25:13 -0400 |
|---|---|---|
| committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-11 21:43:09 -0400 |
| commit | a53157c21c699c392921e243fa96abc27722f910 (patch) | |
| tree | 5298e54022a20e86ef7fb5b782c131890cc231b8 | |
| parent | b2bccee1793ebcf47272fc6556e741a9fba896c7 (diff) | |
can: flexcan: adopt pinctrl support
Cc: linux-can@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
| -rw-r--r-- | drivers/net/can/flexcan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 1efb08386c61..38c0690df5c8 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
| 36 | #include <linux/of.h> | 36 | #include <linux/of.h> |
| 37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
| 38 | #include <linux/pinctrl/consumer.h> | ||
| 38 | 39 | ||
| 39 | #define DRV_NAME "flexcan" | 40 | #define DRV_NAME "flexcan" |
| 40 | 41 | ||
| @@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev) | |||
| 927 | struct flexcan_priv *priv; | 928 | struct flexcan_priv *priv; |
| 928 | struct resource *mem; | 929 | struct resource *mem; |
| 929 | struct clk *clk = NULL; | 930 | struct clk *clk = NULL; |
| 931 | struct pinctrl *pinctrl; | ||
| 930 | void __iomem *base; | 932 | void __iomem *base; |
| 931 | resource_size_t mem_size; | 933 | resource_size_t mem_size; |
| 932 | int err, irq; | 934 | int err, irq; |
| 933 | u32 clock_freq = 0; | 935 | u32 clock_freq = 0; |
| 934 | 936 | ||
| 937 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
| 938 | if (IS_ERR(pinctrl)) | ||
| 939 | return PTR_ERR(pinctrl); | ||
| 940 | |||
| 935 | if (pdev->dev.of_node) { | 941 | if (pdev->dev.of_node) { |
| 936 | const u32 *clock_freq_p; | 942 | const u32 *clock_freq_p; |
| 937 | 943 | ||
