0c836dba8bf1814c56c05729c9a831b32e118d21
[openembedded.git] /
1 From 9f2341ea93de0e76d71c075791cdada7b9ce163b Mon Sep 17 00:00:00 2001
2 From: Vaibhav Hiremath <hvaibhav@ti.com>
3 Date: Tue, 13 Jul 2010 19:38:51 +0530
4 Subject: [PATCH 39/75] omap3beagle-camera:Clean up: Remove unneccessary code/printf
5
6 Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
7 ---
8  arch/arm/mach-omap2/board-omap3beagle-camera.c |   25 +++--------------------
9  1 files changed, 4 insertions(+), 21 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 0a591a1..be59040 100644
13 --- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
14 +++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
15 @@ -77,7 +77,7 @@ static struct isp_interface_config mt9v113_if_config = {
16  };
17  
18  static struct v4l2_ifparm mt9v113_ifparm_s = {
19 -#if 1
20 +#if 0
21         .if_type = V4L2_IF_TYPE_RAW,
22         .u       = {
23                 .raw = {
24 @@ -192,32 +192,24 @@ static int mt9v113_power_set(struct v4l2_int_device *s, enum v4l2_power power)
25  
26                 /* turn on VDD */
27                 regulator_enable(beagle_mt9v113_1_8v1);
28 -
29                 mdelay(1);
30 -
31                 /* turn on VDD_IO */
32                 regulator_enable(beagle_mt9v113_1_8v2);
33 -
34                 mdelay(50);
35  
36                 /* Enable EXTCLK */
37                 isp_set_xclk(vdev->cam->isp, MT9V113_CLK_MIN, CAM_USE_XCLKA);
38 -
39                 /*
40                  * Wait at least 70 CLK cycles (w/EXTCLK = 6MHz, or CLK_MIN):
41                  * ((1000000 * 70) / 6000000) = aprox 12 us.
42                  */
43 -
44                 udelay(12);
45 -
46                 /* Set RESET_BAR to 1 */
47                 gpio_set_value(LEOPARD_RESET_GPIO, 1);
48 -
49                 /*
50                  * Wait at least 100 CLK cycles (w/EXTCLK = 6MHz, or CLK_MIN):
51                  * ((1000000 * 100) / 6000000) = aprox 17 us.
52                  */
53 -
54                 udelay(17);
55  
56                 break;
57 @@ -245,15 +237,11 @@ struct mt9v113_platform_data mt9v113_pdata = {
58  
59  static int beagle_cam_probe(struct platform_device *pdev)
60  {
61 -       int err;
62 -
63 -       printk("%s:%d\n", __func__, __LINE__);
64         beagle_mt9v113_1_8v1 = regulator_get(&pdev->dev, "vaux3_1");
65         if (IS_ERR(beagle_mt9v113_1_8v1)) {
66                 dev_err(&pdev->dev, "vaux3_1 regulator missing\n");
67                 return PTR_ERR(beagle_mt9v113_1_8v1);
68         }
69 -       printk("%s:%d\n", __func__, __LINE__);
70         beagle_mt9v113_1_8v2 = regulator_get(&pdev->dev, "vaux4_1");
71         if (IS_ERR(beagle_mt9v113_1_8v2)) {
72                 dev_err(&pdev->dev, "vaux4_1 regulator missing\n");
73 @@ -261,7 +249,6 @@ static int beagle_cam_probe(struct platform_device *pdev)
74                 return PTR_ERR(beagle_mt9v113_1_8v2);
75         }
76  
77 -       printk("%s:%d\n", __func__, __LINE__);
78         if (gpio_request(LEOPARD_RESET_GPIO, "cam_rst") != 0) {
79                 dev_err(&pdev->dev, "Could not request GPIO %d",
80                         LEOPARD_RESET_GPIO);
81 @@ -270,7 +257,6 @@ static int beagle_cam_probe(struct platform_device *pdev)
82                 return -ENODEV;
83         }
84  
85 -       printk("%s:%d\n", __func__, __LINE__);
86         /* set to output mode, default value 0 */
87         gpio_direction_output(LEOPARD_RESET_GPIO, 0);
88  
89 @@ -281,10 +267,10 @@ static int beagle_cam_probe(struct platform_device *pdev)
90  
91  static int beagle_cam_remove(struct platform_device *pdev)
92  {
93 -       printk("%s:%d\n", __func__, __LINE__);
94         if (regulator_is_enabled(beagle_mt9v113_1_8v1))
95                 regulator_disable(beagle_mt9v113_1_8v1);
96         regulator_put(beagle_mt9v113_1_8v1);
97 +
98         if (regulator_is_enabled(beagle_mt9v113_1_8v2))
99                 regulator_disable(beagle_mt9v113_1_8v2);
100         regulator_put(beagle_mt9v113_1_8v2);
101 @@ -360,12 +346,9 @@ static struct platform_driver beagle_cam_driver = {
102   */
103  int __init omap3beaglelmb_init(void)
104  {
105 -       printk("%s:%d\n", __func__, __LINE__);
106 -       if (cpu_is_omap3630()) {
107 -       printk("%s:%d\n", __func__, __LINE__);
108 +       if (cpu_is_omap3630())
109                 platform_driver_register(&beagle_cam_driver);
110 -       }
111 -       printk("%s:%d\n", __func__, __LINE__);
112 +
113         return 0;
114  }
115  late_initcall(omap3beaglelmb_init);
116 -- 
117 1.6.6.1
118