imx-audmux.c (d3514abcf5b896a3a66d8b7c960a0018a52ebc2c) | imx-audmux.c (a1c85ec03738421668becb973f35fe6e1501c6e6) |
---|---|
1/* 2 * Copyright 2012 Freescale Semiconductor, Inc. 3 * Copyright 2012 Linaro Ltd. 4 * Copyright 2009 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> 5 * 6 * Initial development of this code was funded by 7 * Phytec Messtechnik GmbH, http://www.phytec.de 8 * --- 12 unchanged lines hidden (view full) --- 21#include <linux/debugfs.h> 22#include <linux/err.h> 23#include <linux/io.h> 24#include <linux/module.h> 25#include <linux/of.h> 26#include <linux/of_device.h> 27#include <linux/platform_device.h> 28#include <linux/slab.h> | 1/* 2 * Copyright 2012 Freescale Semiconductor, Inc. 3 * Copyright 2012 Linaro Ltd. 4 * Copyright 2009 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> 5 * 6 * Initial development of this code was funded by 7 * Phytec Messtechnik GmbH, http://www.phytec.de 8 * --- 12 unchanged lines hidden (view full) --- 21#include <linux/debugfs.h> 22#include <linux/err.h> 23#include <linux/io.h> 24#include <linux/module.h> 25#include <linux/of.h> 26#include <linux/of_device.h> 27#include <linux/platform_device.h> 28#include <linux/slab.h> |
29#include <linux/pinctrl/consumer.h> |
|
29 30#include "imx-audmux.h" 31 32#define DRIVER_NAME "imx-audmux" 33 34static struct clk *audmux_clk; 35static void __iomem *audmux_base; 36 --- 207 unchanged lines hidden (view full) --- 244 245 return 0; 246} 247EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); 248 249static int __devinit imx_audmux_probe(struct platform_device *pdev) 250{ 251 struct resource *res; | 30 31#include "imx-audmux.h" 32 33#define DRIVER_NAME "imx-audmux" 34 35static struct clk *audmux_clk; 36static void __iomem *audmux_base; 37 --- 207 unchanged lines hidden (view full) --- 245 246 return 0; 247} 248EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); 249 250static int __devinit imx_audmux_probe(struct platform_device *pdev) 251{ 252 struct resource *res; |
253 struct pinctrl *pinctrl; |
|
252 const struct of_device_id *of_id = 253 of_match_device(imx_audmux_dt_ids, &pdev->dev); 254 255 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 256 audmux_base = devm_request_and_ioremap(&pdev->dev, res); 257 if (!audmux_base) 258 return -EADDRNOTAVAIL; 259 | 254 const struct of_device_id *of_id = 255 of_match_device(imx_audmux_dt_ids, &pdev->dev); 256 257 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 258 audmux_base = devm_request_and_ioremap(&pdev->dev, res); 259 if (!audmux_base) 260 return -EADDRNOTAVAIL; 261 |
262 pinctrl = devm_pinctrl_get_select_default(&pdev->dev); 263 if (IS_ERR(pinctrl)) { 264 dev_err(&pdev->dev, "setup pinctrl failed!"); 265 return PTR_ERR(pinctrl); 266 } 267 |
|
260 audmux_clk = clk_get(&pdev->dev, "audmux"); 261 if (IS_ERR(audmux_clk)) { 262 dev_dbg(&pdev->dev, "cannot get clock: %ld\n", 263 PTR_ERR(audmux_clk)); 264 audmux_clk = NULL; 265 } 266 267 if (of_id) --- 44 unchanged lines hidden --- | 268 audmux_clk = clk_get(&pdev->dev, "audmux"); 269 if (IS_ERR(audmux_clk)) { 270 dev_dbg(&pdev->dev, "cannot get clock: %ld\n", 271 PTR_ERR(audmux_clk)); 272 audmux_clk = NULL; 273 } 274 275 if (of_id) --- 44 unchanged lines hidden --- |