imx-audmux.c (0588000eac9ba4178cebade437da3b28e8fad48f) imx-audmux.c (a0a3d518c33853940936fae5ed579509fe5966eb)
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 *

--- 148 unchanged lines hidden (view full) ---

157 snprintf(buf, sizeof(buf), "ssi%d", i);
158 if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
159 (void *)i, &audmux_debugfs_fops))
160 pr_warning("Failed to create AUDMUX port %d debugfs file\n",
161 i);
162 }
163}
164
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 *

--- 148 unchanged lines hidden (view full) ---

157 snprintf(buf, sizeof(buf), "ssi%d", i);
158 if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
159 (void *)i, &audmux_debugfs_fops))
160 pr_warning("Failed to create AUDMUX port %d debugfs file\n",
161 i);
162 }
163}
164
165static void __devexit audmux_debugfs_remove(void)
165static void audmux_debugfs_remove(void)
166{
167 debugfs_remove_recursive(audmux_debugfs_root);
168}
169#else
170static inline void audmux_debugfs_init(void)
171{
172}
173

--- 65 unchanged lines hidden (view full) ---

239
240 if (audmux_clk)
241 clk_disable_unprepare(audmux_clk);
242
243 return 0;
244}
245EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port);
246
166{
167 debugfs_remove_recursive(audmux_debugfs_root);
168}
169#else
170static inline void audmux_debugfs_init(void)
171{
172}
173

--- 65 unchanged lines hidden (view full) ---

239
240 if (audmux_clk)
241 clk_disable_unprepare(audmux_clk);
242
243 return 0;
244}
245EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port);
246
247static int __devinit imx_audmux_probe(struct platform_device *pdev)
247static int imx_audmux_probe(struct platform_device *pdev)
248{
249 struct resource *res;
250 struct pinctrl *pinctrl;
251 const struct of_device_id *of_id =
252 of_match_device(imx_audmux_dt_ids, &pdev->dev);
253
254 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
255 audmux_base = devm_request_and_ioremap(&pdev->dev, res);

--- 17 unchanged lines hidden (view full) ---

273 pdev->id_entry = of_id->data;
274 audmux_type = pdev->id_entry->driver_data;
275 if (audmux_type == IMX31_AUDMUX)
276 audmux_debugfs_init();
277
278 return 0;
279}
280
248{
249 struct resource *res;
250 struct pinctrl *pinctrl;
251 const struct of_device_id *of_id =
252 of_match_device(imx_audmux_dt_ids, &pdev->dev);
253
254 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
255 audmux_base = devm_request_and_ioremap(&pdev->dev, res);

--- 17 unchanged lines hidden (view full) ---

273 pdev->id_entry = of_id->data;
274 audmux_type = pdev->id_entry->driver_data;
275 if (audmux_type == IMX31_AUDMUX)
276 audmux_debugfs_init();
277
278 return 0;
279}
280
281static int __devexit imx_audmux_remove(struct platform_device *pdev)
281static int imx_audmux_remove(struct platform_device *pdev)
282{
283 if (audmux_type == IMX31_AUDMUX)
284 audmux_debugfs_remove();
285 clk_put(audmux_clk);
286
287 return 0;
288}
289
290static struct platform_driver imx_audmux_driver = {
291 .probe = imx_audmux_probe,
282{
283 if (audmux_type == IMX31_AUDMUX)
284 audmux_debugfs_remove();
285 clk_put(audmux_clk);
286
287 return 0;
288}
289
290static struct platform_driver imx_audmux_driver = {
291 .probe = imx_audmux_probe,
292 .remove = __devexit_p(imx_audmux_remove),
292 .remove = imx_audmux_remove,
293 .id_table = imx_audmux_ids,
294 .driver = {
295 .name = DRIVER_NAME,
296 .owner = THIS_MODULE,
297 .of_match_table = imx_audmux_dt_ids,
298 }
299};
300

--- 16 unchanged lines hidden ---
293 .id_table = imx_audmux_ids,
294 .driver = {
295 .name = DRIVER_NAME,
296 .owner = THIS_MODULE,
297 .of_match_table = imx_audmux_dt_ids,
298 }
299};
300

--- 16 unchanged lines hidden ---