linux-omap 2.6.37: sync with OE .dev
[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap / media / 0022-v4l-Rename-V4L2_MBUS_FMT_GREY8_1X8-to-V4L2_MBUS_FMT_.patch
1 From 0be9c8b998cef9ce650e1e53d12bb5a6d772d151 Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Tue, 28 Sep 2010 12:01:44 +0200
4 Subject: [PATCH 22/43] v4l: Rename V4L2_MBUS_FMT_GREY8_1X8 to V4L2_MBUS_FMT_Y8_1X8
6 For consistency with the V4L2_MBUS_FMT_Y10_1X10 format.
8 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 ---
10  drivers/media/video/mt9m001.c        |    2 +-
11  drivers/media/video/mt9v022.c        |    4 ++--
12  drivers/media/video/ov6650.c         |   10 +++++-----
13  drivers/media/video/sh_mobile_csi2.c |    6 +++---
14  drivers/media/video/soc_mediabus.c   |    2 +-
15  include/linux/v4l2-mediabus.h        |    2 +-
16  6 files changed, 13 insertions(+), 13 deletions(-)
18 diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
19 index fcb4cd9..3aaedf6 100644
20 --- a/drivers/media/video/mt9m001.c
21 +++ b/drivers/media/video/mt9m001.c
22 @@ -79,7 +79,7 @@ static const struct mt9m001_datafmt mt9m001_colour_fmts[] = {
23  static const struct mt9m001_datafmt mt9m001_monochrome_fmts[] = {
24         /* Order important - see above */
25         {V4L2_MBUS_FMT_Y10_1X10, V4L2_COLORSPACE_JPEG},
26 -       {V4L2_MBUS_FMT_GREY8_1X8, V4L2_COLORSPACE_JPEG},
27 +       {V4L2_MBUS_FMT_Y8_1X8, V4L2_COLORSPACE_JPEG},
28  };
29  
30  struct mt9m001 {
31 diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
32 index b96171c..56dd4fc 100644
33 --- a/drivers/media/video/mt9v022.c
34 +++ b/drivers/media/video/mt9v022.c
35 @@ -95,7 +95,7 @@ static const struct mt9v022_datafmt mt9v022_colour_fmts[] = {
36  static const struct mt9v022_datafmt mt9v022_monochrome_fmts[] = {
37         /* Order important - see above */
38         {V4L2_MBUS_FMT_Y10_1X10, V4L2_COLORSPACE_JPEG},
39 -       {V4L2_MBUS_FMT_GREY8_1X8, V4L2_COLORSPACE_JPEG},
40 +       {V4L2_MBUS_FMT_Y8_1X8, V4L2_COLORSPACE_JPEG},
41  };
42  
43  struct mt9v022 {
44 @@ -392,7 +392,7 @@ static int mt9v022_s_fmt(struct v4l2_subdev *sd,
45          * icd->try_fmt(), datawidth is from our supported format list
46          */
47         switch (mf->code) {
48 -       case V4L2_MBUS_FMT_GREY8_1X8:
49 +       case V4L2_MBUS_FMT_Y8_1X8:
50         case V4L2_MBUS_FMT_Y10_1X10:
51                 if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATM)
52                         return -EINVAL;
53 diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c
54 index cf93de9..fe8e3eb 100644
55 --- a/drivers/media/video/ov6650.c
56 +++ b/drivers/media/video/ov6650.c
57 @@ -207,7 +207,7 @@ static enum v4l2_mbus_pixelcode ov6650_codes[] = {
58         V4L2_MBUS_FMT_YVYU8_2X8,
59         V4L2_MBUS_FMT_VYUY8_2X8,
60         V4L2_MBUS_FMT_SBGGR8_1X8,
61 -       V4L2_MBUS_FMT_GREY8_1X8,
62 +       V4L2_MBUS_FMT_Y8_1X8,
63  };
64  
65  static const struct v4l2_queryctrl ov6650_controls[] = {
66 @@ -800,7 +800,7 @@ static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
67  
68         /* select color matrix configuration for given color encoding */
69         switch (code) {
70 -       case V4L2_MBUS_FMT_GREY8_1X8:
71 +       case V4L2_MBUS_FMT_Y8_1X8:
72                 dev_dbg(&client->dev, "pixel format GREY8_1X8\n");
73                 coma_mask |= COMA_RGB | COMA_WORD_SWAP | COMA_BYTE_SWAP;
74                 coma_set |= COMA_BW;
75 @@ -846,7 +846,7 @@ static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
76         }
77         priv->code = code;
78  
79 -       if (code == V4L2_MBUS_FMT_GREY8_1X8 ||
80 +       if (code == V4L2_MBUS_FMT_Y8_1X8 ||
81                         code == V4L2_MBUS_FMT_SBGGR8_1X8) {
82                 coml_mask = COML_ONE_CHANNEL;
83                 coml_set = 0;
84 @@ -936,8 +936,8 @@ static int ov6650_try_fmt(struct v4l2_subdev *sd,
85  
86         switch (mf->code) {
87         case V4L2_MBUS_FMT_Y10_1X10:
88 -               mf->code = V4L2_MBUS_FMT_GREY8_1X8;
89 -       case V4L2_MBUS_FMT_GREY8_1X8:
90 +               mf->code = V4L2_MBUS_FMT_Y8_1X8;
91 +       case V4L2_MBUS_FMT_Y8_1X8:
92         case V4L2_MBUS_FMT_YVYU8_2X8:
93         case V4L2_MBUS_FMT_YUYV8_2X8:
94         case V4L2_MBUS_FMT_VYUY8_2X8:
95 diff --git a/drivers/media/video/sh_mobile_csi2.c b/drivers/media/video/sh_mobile_csi2.c
96 index 84a6468..dd1b81b 100644
97 --- a/drivers/media/video/sh_mobile_csi2.c
98 +++ b/drivers/media/video/sh_mobile_csi2.c
99 @@ -56,7 +56,7 @@ static int sh_csi2_try_fmt(struct v4l2_subdev *sd,
100                 switch (mf->code) {
101                 case V4L2_MBUS_FMT_UYVY8_2X8:           /* YUV422 */
102                 case V4L2_MBUS_FMT_YUYV8_1_5X8:         /* YUV420 */
103 -               case V4L2_MBUS_FMT_GREY8_1X8:           /* RAW8 */
104 +               case V4L2_MBUS_FMT_Y8_1X8:              /* RAW8 */
105                 case V4L2_MBUS_FMT_SBGGR8_1X8:
106                 case V4L2_MBUS_FMT_SGRBG8_1X8:
107                         break;
108 @@ -67,7 +67,7 @@ static int sh_csi2_try_fmt(struct v4l2_subdev *sd,
109                 break;
110         case SH_CSI2I:
111                 switch (mf->code) {
112 -               case V4L2_MBUS_FMT_GREY8_1X8:           /* RAW8 */
113 +               case V4L2_MBUS_FMT_Y8_1X8:              /* RAW8 */
114                 case V4L2_MBUS_FMT_SBGGR8_1X8:
115                 case V4L2_MBUS_FMT_SGRBG8_1X8:
116                 case V4L2_MBUS_FMT_SBGGR10_1X10:        /* RAW10 */
117 @@ -111,7 +111,7 @@ static int sh_csi2_s_fmt(struct v4l2_subdev *sd,
118         case V4L2_MBUS_FMT_RGB565_2X8_BE:
119                 tmp |= 0x22;    /* RGB565 */
120                 break;
121 -       case V4L2_MBUS_FMT_GREY8_1X8:
122 +       case V4L2_MBUS_FMT_Y8_1X8:
123         case V4L2_MBUS_FMT_SBGGR8_1X8:
124         case V4L2_MBUS_FMT_SGRBG8_1X8:
125                 tmp |= 0x2a;    /* RAW8 */
126 diff --git a/drivers/media/video/soc_mediabus.c b/drivers/media/video/soc_mediabus.c
127 index 9139121..d9c297d 100644
128 --- a/drivers/media/video/soc_mediabus.c
129 +++ b/drivers/media/video/soc_mediabus.c
130 @@ -88,7 +88,7 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = {
131                 .packing                = SOC_MBUS_PACKING_EXTEND16,
132                 .order                  = SOC_MBUS_ORDER_LE,
133         },
134 -       [MBUS_IDX(GREY8_1X8)] = {
135 +       [MBUS_IDX(Y8_1X8)] = {
136                 .fourcc                 = V4L2_PIX_FMT_GREY,
137                 .name                   = "Grey",
138                 .bits_per_sample        = 8,
139 diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
140 index feeb88c..dc1d5c0 100644
141 --- a/include/linux/v4l2-mediabus.h
142 +++ b/include/linux/v4l2-mediabus.h
143 @@ -45,7 +45,7 @@ enum v4l2_mbus_pixelcode {
144         V4L2_MBUS_FMT_BGR565_2X8_BE,
145         V4L2_MBUS_FMT_SBGGR8_1X8,
146         V4L2_MBUS_FMT_SBGGR10_1X10,
147 -       V4L2_MBUS_FMT_GREY8_1X8,
148 +       V4L2_MBUS_FMT_Y8_1X8,
149         V4L2_MBUS_FMT_Y10_1X10,
150         V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE,
151         V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE,
152 -- 
153 1.6.6.1