This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 & Omnivision, red and blue messed up

I wrote a driver for Omnivision sensor which somewhat works, at least I can get a picture. The colors are messed up and I cannot figure out why. 

Here is a picture of the test pattern from OV sensor. As you can see the red and blue are in wrong order. The second picture is from my office. On the bottom right corner, next to the coffee cup is my Fluke which is supposed to be yellow.

Initially I thought that CCD Color Pattern (CCOLP) register is set incorrectly and I tried to change it but there was no change on the picture which was really odd. I enabled dev_dbg messages line

(in function ccdc_config_raw)

dev_dbg(dev, "Writing %x to CCOLP ...\n", val); 

which outputs my new value (great) but the default output value was 0??? Anyway maybe I'm editing wrong place because the value seems to have no effect

If I'm reading my OV datasheet correctly, the correct color pattern is:

olop = CCDC_RED;
olep = CCDC_GREEN_RED;
elop = CCDC_GREEN_BLUE;
elep = CCDC_BLUE;

Any ideas??