Duy Truong | f3ac7b3 | 2013-02-13 01:07:28 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions are |
| 5 | * met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the distribution. |
Duy Truong | f3ac7b3 | 2013-02-13 01:07:28 -0800 | [diff] [blame] | 12 | * * Neither the name of The Linux Foundation nor the names of its |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | * |
| 28 | */ |
| 29 | |
| 30 | #include <stdint.h> |
| 31 | #include <msm_panel.h> |
| 32 | #include <err.h> |
| 33 | |
| 34 | int lvds_chimei_wxga_config(void *pdata) |
| 35 | { |
| 36 | return NO_ERROR; |
| 37 | } |
| 38 | |
| 39 | int lvds_chimei_wxga_on() |
| 40 | { |
| 41 | return NO_ERROR; |
| 42 | } |
| 43 | |
| 44 | int lvds_chimei_wxga_off() |
| 45 | { |
| 46 | return NO_ERROR; |
| 47 | } |
| 48 | |
| 49 | void lvds_chimei_wxga_init(struct msm_panel_info *pinfo) |
| 50 | { |
| 51 | pinfo->xres = 1364; |
| 52 | pinfo->yres = 768; |
| 53 | pinfo->type = LVDS_PANEL; |
| 54 | pinfo->wait_cycle = 0; |
| 55 | pinfo->bpp = 24; |
| 56 | pinfo->clk_rate = 75000000; |
| 57 | |
| 58 | pinfo->lcdc.h_back_porch = 0; |
| 59 | pinfo->lcdc.h_front_porch = 194; |
| 60 | pinfo->lcdc.h_pulse_width = 40; |
| 61 | pinfo->lcdc.v_back_porch = 0; |
| 62 | pinfo->lcdc.v_front_porch = 38; |
| 63 | pinfo->lcdc.v_pulse_width = 20; |
| 64 | pinfo->lcdc.underflow_clr = 0xff; |
| 65 | pinfo->lcdc.hsync_skew = 0; |
| 66 | pinfo->lvds.channel_mode = LVDS_SINGLE_CHANNEL_MODE; |
| 67 | |
| 68 | /* Set border color, padding only for reducing active display region */ |
| 69 | pinfo->lcdc.border_clr = 0x0; |
| 70 | pinfo->lcdc.xres_pad = 0; |
| 71 | pinfo->lcdc.yres_pad = 0; |
| 72 | |
| 73 | pinfo->on = lvds_chimei_wxga_on; |
| 74 | pinfo->off = lvds_chimei_wxga_off; |
| 75 | pinfo->config = lvds_chimei_wxga_config; |
| 76 | } |