pinctrl-imx7d.c (c25141062a82ae8bddced1b3ce2b57a1c0efabe0) pinctrl-imx7d.c (7372077542b0d5b6a1ed68493e5758045119cedd)
1/*
2 * Freescale imx7d pinctrl driver
3 *
4 * Author: Anson Huang <Anson.Huang@freescale.com>
5 * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

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

373static const struct of_device_id imx7d_pinctrl_of_match[] = {
374 { .compatible = "fsl,imx7d-iomuxc", .data = &imx7d_pinctrl_info, },
375 { .compatible = "fsl,imx7d-iomuxc-lpsr", .data = &imx7d_lpsr_pinctrl_info },
376 { /* sentinel */ }
377};
378
379static int imx7d_pinctrl_probe(struct platform_device *pdev)
380{
1/*
2 * Freescale imx7d pinctrl driver
3 *
4 * Author: Anson Huang <Anson.Huang@freescale.com>
5 * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

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

373static const struct of_device_id imx7d_pinctrl_of_match[] = {
374 { .compatible = "fsl,imx7d-iomuxc", .data = &imx7d_pinctrl_info, },
375 { .compatible = "fsl,imx7d-iomuxc-lpsr", .data = &imx7d_lpsr_pinctrl_info },
376 { /* sentinel */ }
377};
378
379static int imx7d_pinctrl_probe(struct platform_device *pdev)
380{
381 const struct of_device_id *match;
382 struct imx_pinctrl_soc_info *pinctrl_info;
381 const struct imx_pinctrl_soc_info *pinctrl_info;
383
382
384 match = of_match_device(imx7d_pinctrl_of_match, &pdev->dev);
385
386 if (!match)
383 pinctrl_info = of_device_get_match_data(&pdev->dev);
384 if (!pinctrl_info)
387 return -ENODEV;
388
385 return -ENODEV;
386
389 pinctrl_info = (struct imx_pinctrl_soc_info *) match->data;
390
391 return imx_pinctrl_probe(pdev, pinctrl_info);
392}
393
394static struct platform_driver imx7d_pinctrl_driver = {
395 .driver = {
396 .name = "imx7d-pinctrl",
397 .of_match_table = of_match_ptr(imx7d_pinctrl_of_match),
398 },
399 .probe = imx7d_pinctrl_probe,
400};
401
402static int __init imx7d_pinctrl_init(void)
403{
404 return platform_driver_register(&imx7d_pinctrl_driver);
405}
406arch_initcall(imx7d_pinctrl_init);
387 return imx_pinctrl_probe(pdev, pinctrl_info);
388}
389
390static struct platform_driver imx7d_pinctrl_driver = {
391 .driver = {
392 .name = "imx7d-pinctrl",
393 .of_match_table = of_match_ptr(imx7d_pinctrl_of_match),
394 },
395 .probe = imx7d_pinctrl_probe,
396};
397
398static int __init imx7d_pinctrl_init(void)
399{
400 return platform_driver_register(&imx7d_pinctrl_driver);
401}
402arch_initcall(imx7d_pinctrl_init);