Skip to content

Commit

Permalink
viafb: vt1636 cleanup
Browse files Browse the repository at this point in the history
This patch merges tbl1636 into vt1636 and cleans it up as the data was
only used there anyway. No runtime changes are expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Sep 24, 2010
1 parent 6f9422d commit dbc2809
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 131 deletions.
2 changes: 1 addition & 1 deletion drivers/video/via/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
obj-$(CONFIG_FB_VIA) += viafb.o

viafb-y :=viafbdev.o hw.o via_i2c.o dvi.o lcd.o ioctl.o accel.o \
via_utility.o vt1636.o global.o tblDPASetting.o viamode.o tbl1636.o \
via_utility.o vt1636.o global.o tblDPASetting.o viamode.o \
via-core.o via-gpio.o via_modesetting.o
1 change: 0 additions & 1 deletion drivers/video/via/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include "via_utility.h"
#include "vt1636.h"
#include "tblDPASetting.h"
#include "tbl1636.h"

/* External struct*/

Expand Down
71 changes: 0 additions & 71 deletions drivers/video/via/tbl1636.c

This file was deleted.

34 changes: 0 additions & 34 deletions drivers/video/via/tbl1636.h

This file was deleted.

65 changes: 41 additions & 24 deletions drivers/video/via/vt1636.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@
#include <linux/via_i2c.h>
#include "global.h"

static const struct IODATA common_init_data[] = {
/* Index, Mask, Value */
/* Set panel power sequence timing */
{0x10, 0xC0, 0x00},
/* T1: VDD on - Data on. Each increment is 1 ms. (50ms = 031h) */
{0x0B, 0xFF, 0x40},
/* T2: Data on - Backlight on. Each increment is 2 ms. (210ms = 068h) */
{0x0C, 0xFF, 0x31},
/* T3: Backlight off -Data off. Each increment is 2 ms. (210ms = 068h)*/
{0x0D, 0xFF, 0x31},
/* T4: Data off - VDD off. Each increment is 1 ms. (50ms = 031h) */
{0x0E, 0xFF, 0x68},
/* T5: VDD off - VDD on. Each increment is 100 ms. (500ms = 04h) */
{0x0F, 0xFF, 0x68},
/* LVDS output power up */
{0x09, 0xA0, 0xA0},
/* turn on back light */
{0x10, 0x33, 0x13}
};

/* Index, Mask, Value */
static const struct IODATA dual_channel_enable_data = {0x08, 0xF0, 0xE0};
static const struct IODATA single_channel_enable_data = {0x08, 0xF0, 0x00};
static const struct IODATA dithering_enable_data = {0x0A, 0x70, 0x50};
static const struct IODATA dithering_disable_data = {0x0A, 0x70, 0x00};
static const struct IODATA vdd_on_data = {0x10, 0x20, 0x20};
static const struct IODATA vdd_off_data = {0x10, 0x20, 0x00};

u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information
*plvds_setting_info, struct lvds_chip_information *plvds_chip_info,
u8 index)
Expand Down Expand Up @@ -55,52 +83,41 @@ void viafb_init_lvds_vt1636(struct lvds_setting_information
int reg_num, i;

/* Common settings: */
reg_num = ARRAY_SIZE(COMMON_INIT_TBL_VT1636);

for (i = 0; i < reg_num; i++) {
reg_num = ARRAY_SIZE(common_init_data);
for (i = 0; i < reg_num; i++)
viafb_gpio_i2c_write_mask_lvds(plvds_setting_info,
plvds_chip_info,
COMMON_INIT_TBL_VT1636[i]);
}
plvds_chip_info, common_init_data[i]);

/* Input Data Mode Select */
if (plvds_setting_info->device_lcd_dualedge) {
if (plvds_setting_info->device_lcd_dualedge)
viafb_gpio_i2c_write_mask_lvds(plvds_setting_info,
plvds_chip_info,
DUAL_CHANNEL_ENABLE_TBL_VT1636[0]);
} else {
plvds_chip_info, dual_channel_enable_data);
else
viafb_gpio_i2c_write_mask_lvds(plvds_setting_info,
plvds_chip_info,
SINGLE_CHANNEL_ENABLE_TBL_VT1636[0]);
}
plvds_chip_info, single_channel_enable_data);

if (plvds_setting_info->LCDDithering) {
if (plvds_setting_info->LCDDithering)
viafb_gpio_i2c_write_mask_lvds(plvds_setting_info,
plvds_chip_info,
DITHERING_ENABLE_TBL_VT1636[0]);
} else {
plvds_chip_info, dithering_enable_data);
else
viafb_gpio_i2c_write_mask_lvds(plvds_setting_info,
plvds_chip_info,
DITHERING_DISABLE_TBL_VT1636[0]);
}
plvds_chip_info, dithering_disable_data);
}

void viafb_enable_lvds_vt1636(struct lvds_setting_information
*plvds_setting_info,
struct lvds_chip_information *plvds_chip_info)
{

viafb_gpio_i2c_write_mask_lvds(plvds_setting_info, plvds_chip_info,
VDD_ON_TBL_VT1636[0]);
vdd_on_data);
}

void viafb_disable_lvds_vt1636(struct lvds_setting_information
*plvds_setting_info,
struct lvds_chip_information *plvds_chip_info)
{

viafb_gpio_i2c_write_mask_lvds(plvds_setting_info, plvds_chip_info,
VDD_OFF_TBL_VT1636[0]);
vdd_off_data);
}

bool viafb_lvds_identify_vt1636(u8 i2c_adapter)
Expand Down

0 comments on commit dbc2809

Please sign in to comment.