diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-tegra20.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-tegra20.c | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra20.c b/drivers/pinctrl/pinctrl-tegra20.c index f69ff96aa292..a74f9a568536 100644 --- a/drivers/pinctrl/pinctrl-tegra20.c +++ b/drivers/pinctrl/pinctrl-tegra20.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Pinctrl data for the NVIDIA Tegra20 pinmux | 2 | * Pinctrl data for the NVIDIA Tegra20 pinmux |
3 | * | 3 | * |
4 | * Copyright (c) 2011, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Derived from code: | 6 | * Derived from code: |
7 | * Copyright (C) 2010 Google, Inc. | 7 | * Copyright (C) 2010 Google, Inc. |
@@ -17,6 +17,8 @@ | |||
17 | * more details. | 17 | * more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/of.h> | ||
20 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
21 | #include <linux/pinctrl/pinctrl.h> | 23 | #include <linux/pinctrl/pinctrl.h> |
22 | #include <linux/pinctrl/pinmux.h> | 24 | #include <linux/pinctrl/pinmux.h> |
@@ -2854,7 +2856,39 @@ static const struct tegra_pinctrl_soc_data tegra20_pinctrl = { | |||
2854 | .ngroups = ARRAY_SIZE(tegra20_groups), | 2856 | .ngroups = ARRAY_SIZE(tegra20_groups), |
2855 | }; | 2857 | }; |
2856 | 2858 | ||
2857 | void __devinit tegra20_pinctrl_init(const struct tegra_pinctrl_soc_data **soc) | 2859 | static int __devinit tegra20_pinctrl_probe(struct platform_device *pdev) |
2858 | { | 2860 | { |
2859 | *soc = &tegra20_pinctrl; | 2861 | return tegra_pinctrl_probe(pdev, &tegra20_pinctrl); |
2860 | } | 2862 | } |
2863 | |||
2864 | static struct of_device_id tegra20_pinctrl_of_match[] __devinitdata = { | ||
2865 | { .compatible = "nvidia,tegra20-pinmux", }, | ||
2866 | { }, | ||
2867 | }; | ||
2868 | |||
2869 | static struct platform_driver tegra20_pinctrl_driver = { | ||
2870 | .driver = { | ||
2871 | .name = "tegra20-pinctrl", | ||
2872 | .owner = THIS_MODULE, | ||
2873 | .of_match_table = tegra20_pinctrl_of_match, | ||
2874 | }, | ||
2875 | .probe = tegra20_pinctrl_probe, | ||
2876 | .remove = __devexit_p(tegra_pinctrl_remove), | ||
2877 | }; | ||
2878 | |||
2879 | static int __init tegra20_pinctrl_init(void) | ||
2880 | { | ||
2881 | return platform_driver_register(&tegra20_pinctrl_driver); | ||
2882 | } | ||
2883 | arch_initcall(tegra20_pinctrl_init); | ||
2884 | |||
2885 | static void __exit tegra20_pinctrl_exit(void) | ||
2886 | { | ||
2887 | platform_driver_unregister(&tegra20_pinctrl_driver); | ||
2888 | } | ||
2889 | module_exit(tegra20_pinctrl_exit); | ||
2890 | |||
2891 | MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); | ||
2892 | MODULE_DESCRIPTION("NVIDIA Tegra20 pinctrl driver"); | ||
2893 | MODULE_LICENSE("GPL v2"); | ||
2894 | MODULE_DEVICE_TABLE(of, tegra20_pinctrl_of_match); | ||