TPO_R03_EN_PRE_CHARGE | TPO_R03_SOFTWARE_CTL)
static const u16 tpo_td043_def_gamma[12] = {
- 106, 200, 289, 375, 460, 543, 625, 705, 785, 864, 942, 1020
+ 105, 315, 381, 431, 490, 537, 579, 686, 780, 837, 880, 1023
};
struct tpo_td043_device {
struct spi_device *spi;
struct regulator *vcc_reg;
+ struct regulator *vdd_reg;
int nreset_gpio;
u16 gamma[12];
u32 mode;
.pixel_clock = 36000,
+ /* note:
+ * hbp+hsw must be 215
+ * if vbp+vsw < 32, the panel tears at the bottom
+ * if vbp+vsw > 35, it wraps from the top */
.hsw = 1,
- .hfp = 68,
+ .hfp = 150,
.hbp = 214,
.vsw = 1,
- .vfp = 39,
+ .vfp = 0,
.vbp = 34,
};
return 0;
regulator_enable(tpo_td043->vcc_reg);
+ regulator_enable(tpo_td043->vdd_reg);
/* wait for regulator to stabilize */
msleep(160);
tpo_td043_write(tpo_td043->spi, 3, TPO_R03_VAL_STANDBY);
+ regulator_disable(tpo_td043->vdd_reg);
regulator_disable(tpo_td043->vcc_reg);
tpo_td043->powered_on = 0;
goto fail_regulator;
}
+ tpo_td043->vdd_reg = regulator_get(&dssdev->dev, "vdd");
+ if (IS_ERR(tpo_td043->vdd_reg)) {
+ dev_err(&dssdev->dev, "failed to get LCD VDD regulator\n");
+ ret = PTR_ERR(tpo_td043->vdd_reg);
+ goto fail_vdd_regulator;
+ }
+
if (gpio_is_valid(nreset_gpio)) {
ret = gpio_request(nreset_gpio, "lcd reset");
if (ret < 0) {
fail_gpio_direction:
gpio_free(nreset_gpio);
fail_gpio_req:
+ regulator_put(tpo_td043->vdd_reg);
+fail_vdd_regulator:
regulator_put(tpo_td043->vcc_reg);
fail_regulator:
kfree(tpo_td043);
dev_dbg(&dssdev->dev, "remove\n");
sysfs_remove_group(&dssdev->dev.kobj, &tpo_td043_attr_group);
+ regulator_put(tpo_td043->vdd_reg);
regulator_put(tpo_td043->vcc_reg);
if (gpio_is_valid(nreset_gpio))
gpio_free(nreset_gpio);
}
+static void tpo_td043_set_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings)
+{
+ dpi_set_timings(dssdev, timings);
+}
+
+static int tpo_td043_check_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings)
+{
+ return dpi_check_timings(dssdev, timings);
+}
+
static struct omap_dss_driver tpo_td043_driver = {
.probe = tpo_td043_probe,
.remove = tpo_td043_remove,
.set_mirror = tpo_td043_set_hmirror,
.get_mirror = tpo_td043_get_hmirror,
+ .set_timings = tpo_td043_set_timings,
+ .check_timings = tpo_td043_check_timings,
+
.driver = {
.name = "tpo_td043mtea1_panel",
.owner = THIS_MODULE,