diff options
| author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-06 11:01:41 -0400 |
|---|---|---|
| committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-11 21:43:19 -0400 |
| commit | fe233b9df3842b3927c0275322a8047f8b33b194 (patch) | |
| tree | c9a2ebcdfdfdb2ee97da7ee0d70fbb9b6d2f5899 | |
| parent | f755865f9082a6632f06b8314068a883508d91ca (diff) | |
video: mxsfb: adopt pinctrl support
Cc: linux-fbdev@vger.kernel.org
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
| -rw-r--r-- | drivers/video/mxsfb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 4a89f889852d..6c6bc578d0fc 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <linux/clk.h> | 45 | #include <linux/clk.h> |
| 46 | #include <linux/dma-mapping.h> | 46 | #include <linux/dma-mapping.h> |
| 47 | #include <linux/io.h> | 47 | #include <linux/io.h> |
| 48 | #include <linux/pinctrl/consumer.h> | ||
| 48 | #include <mach/mxsfb.h> | 49 | #include <mach/mxsfb.h> |
| 49 | 50 | ||
| 50 | #define REG_SET 4 | 51 | #define REG_SET 4 |
| @@ -756,6 +757,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev) | |||
| 756 | struct mxsfb_info *host; | 757 | struct mxsfb_info *host; |
| 757 | struct fb_info *fb_info; | 758 | struct fb_info *fb_info; |
| 758 | struct fb_modelist *modelist; | 759 | struct fb_modelist *modelist; |
| 760 | struct pinctrl *pinctrl; | ||
| 759 | int i, ret; | 761 | int i, ret; |
| 760 | 762 | ||
| 761 | if (!pdata) { | 763 | if (!pdata) { |
| @@ -793,6 +795,12 @@ static int __devinit mxsfb_probe(struct platform_device *pdev) | |||
| 793 | 795 | ||
| 794 | host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data]; | 796 | host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data]; |
| 795 | 797 | ||
| 798 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
| 799 | if (IS_ERR(pinctrl)) { | ||
| 800 | ret = PTR_ERR(pinctrl); | ||
| 801 | goto error_getpin; | ||
| 802 | } | ||
| 803 | |||
| 796 | host->clk = clk_get(&host->pdev->dev, NULL); | 804 | host->clk = clk_get(&host->pdev->dev, NULL); |
| 797 | if (IS_ERR(host->clk)) { | 805 | if (IS_ERR(host->clk)) { |
| 798 | ret = PTR_ERR(host->clk); | 806 | ret = PTR_ERR(host->clk); |
| @@ -848,6 +856,7 @@ error_init_fb: | |||
| 848 | error_pseudo_pallette: | 856 | error_pseudo_pallette: |
| 849 | clk_put(host->clk); | 857 | clk_put(host->clk); |
| 850 | error_getclock: | 858 | error_getclock: |
| 859 | error_getpin: | ||
| 851 | iounmap(host->base); | 860 | iounmap(host->base); |
| 852 | error_ioremap: | 861 | error_ioremap: |
| 853 | framebuffer_release(fb_info); | 862 | framebuffer_release(fb_info); |
