diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch new file mode 100644 index 00000000..c32c4405 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From 784407ada9241d907cf08145885410351a7eafc4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergio Aguirre <saaguirre@ti.com> | ||
3 | Date: Fri, 25 Jun 2010 12:03:59 -0500 | ||
4 | Subject: [PATCH 25/75] omap3beagle: camera: Rename regulators to match actual voltage levels | ||
5 | |||
6 | Signed-off-by: Sergio Aguirre <saaguirre@ti.com> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle-camera.c | 46 ++++++++++++------------ | ||
9 | 1 files changed, 23 insertions(+), 23 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c | ||
12 | index 792c48d..8a4b7bc 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle-camera.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c | ||
15 | @@ -53,8 +53,8 @@ | ||
16 | |||
17 | #define LEOPARD_RESET_GPIO 98 | ||
18 | |||
19 | -static struct regulator *beagle_mt9t111_1_8v; | ||
20 | -static struct regulator *beagle_mt9t111_2_8v; | ||
21 | +static struct regulator *beagle_mt9t111_1_8v1; | ||
22 | +static struct regulator *beagle_mt9t111_1_8v2; | ||
23 | |||
24 | #if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE) | ||
25 | static struct isp_interface_config mt9t111_if_config = { | ||
26 | @@ -169,10 +169,10 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power) | ||
27 | case V4L2_POWER_STANDBY: | ||
28 | isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA); | ||
29 | |||
30 | - if (regulator_is_enabled(beagle_mt9t111_1_8v)) | ||
31 | - regulator_disable(beagle_mt9t111_1_8v); | ||
32 | - if (regulator_is_enabled(beagle_mt9t111_2_8v)) | ||
33 | - regulator_disable(beagle_mt9t111_2_8v); | ||
34 | + if (regulator_is_enabled(beagle_mt9t111_1_8v1)) | ||
35 | + regulator_disable(beagle_mt9t111_1_8v1); | ||
36 | + if (regulator_is_enabled(beagle_mt9t111_1_8v2)) | ||
37 | + regulator_disable(beagle_mt9t111_1_8v2); | ||
38 | break; | ||
39 | |||
40 | case V4L2_POWER_ON: | ||
41 | @@ -184,12 +184,12 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power) | ||
42 | gpio_set_value(LEOPARD_RESET_GPIO, 0); | ||
43 | |||
44 | /* turn on VDD */ | ||
45 | - regulator_enable(beagle_mt9t111_1_8v); | ||
46 | + regulator_enable(beagle_mt9t111_1_8v1); | ||
47 | |||
48 | mdelay(1); | ||
49 | |||
50 | /* turn on VDD_IO */ | ||
51 | - regulator_enable(beagle_mt9t111_2_8v); | ||
52 | + regulator_enable(beagle_mt9t111_1_8v2); | ||
53 | |||
54 | mdelay(50); | ||
55 | |||
56 | @@ -240,23 +240,23 @@ static int beagle_cam_probe(struct platform_device *pdev) | ||
57 | { | ||
58 | int err; | ||
59 | |||
60 | - beagle_mt9t111_1_8v = regulator_get(&pdev->dev, "vaux3_1"); | ||
61 | - if (IS_ERR(beagle_mt9t111_1_8v)) { | ||
62 | + beagle_mt9t111_1_8v1 = regulator_get(&pdev->dev, "vaux3_1"); | ||
63 | + if (IS_ERR(beagle_mt9t111_1_8v1)) { | ||
64 | dev_err(&pdev->dev, "vaux3_1 regulator missing\n"); | ||
65 | - return PTR_ERR(beagle_mt9t111_1_8v); | ||
66 | + return PTR_ERR(beagle_mt9t111_1_8v1); | ||
67 | } | ||
68 | - beagle_mt9t111_2_8v = regulator_get(&pdev->dev, "vaux4_1"); | ||
69 | - if (IS_ERR(beagle_mt9t111_2_8v)) { | ||
70 | + beagle_mt9t111_1_8v2 = regulator_get(&pdev->dev, "vaux4_1"); | ||
71 | + if (IS_ERR(beagle_mt9t111_1_8v2)) { | ||
72 | dev_err(&pdev->dev, "vaux4_1 regulator missing\n"); | ||
73 | - regulator_put(beagle_mt9t111_1_8v); | ||
74 | - return PTR_ERR(beagle_mt9t111_2_8v); | ||
75 | + regulator_put(beagle_mt9t111_1_8v1); | ||
76 | + return PTR_ERR(beagle_mt9t111_1_8v2); | ||
77 | } | ||
78 | |||
79 | if (gpio_request(LEOPARD_RESET_GPIO, "cam_rst") != 0) { | ||
80 | dev_err(&pdev->dev, "Could not request GPIO %d", | ||
81 | LEOPARD_RESET_GPIO); | ||
82 | - regulator_put(beagle_mt9t111_2_8v); | ||
83 | - regulator_put(beagle_mt9t111_1_8v); | ||
84 | + regulator_put(beagle_mt9t111_1_8v2); | ||
85 | + regulator_put(beagle_mt9t111_1_8v1); | ||
86 | return -ENODEV; | ||
87 | } | ||
88 | |||
89 | @@ -270,12 +270,12 @@ static int beagle_cam_probe(struct platform_device *pdev) | ||
90 | |||
91 | static int beagle_cam_remove(struct platform_device *pdev) | ||
92 | { | ||
93 | - if (regulator_is_enabled(beagle_mt9t111_1_8v)) | ||
94 | - regulator_disable(beagle_mt9t111_1_8v); | ||
95 | - regulator_put(beagle_mt9t111_1_8v); | ||
96 | - if (regulator_is_enabled(beagle_mt9t111_2_8v)) | ||
97 | - regulator_disable(beagle_mt9t111_2_8v); | ||
98 | - regulator_put(beagle_mt9t111_2_8v); | ||
99 | + if (regulator_is_enabled(beagle_mt9t111_1_8v1)) | ||
100 | + regulator_disable(beagle_mt9t111_1_8v1); | ||
101 | + regulator_put(beagle_mt9t111_1_8v1); | ||
102 | + if (regulator_is_enabled(beagle_mt9t111_1_8v2)) | ||
103 | + regulator_disable(beagle_mt9t111_1_8v2); | ||
104 | + regulator_put(beagle_mt9t111_1_8v2); | ||
105 | |||
106 | gpio_free(LEOPARD_RESET_GPIO); | ||
107 | |||
108 | -- | ||
109 | 1.6.6.1 | ||
110 | |||