summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft/fb_agm1264k-fl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/fbtft/fb_agm1264k-fl.c')
-rw-r--r--drivers/staging/fbtft/fb_agm1264k-fl.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c
index eeeeec97ad27..207d578547cd 100644
--- a/drivers/staging/fbtft/fb_agm1264k-fl.c
+++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
@@ -77,19 +77,6 @@ static int init_display(struct fbtft_par *par)
return 0;
}
-static void reset(struct fbtft_par *par)
-{
- if (!par->gpio.reset)
- return;
-
- dev_dbg(par->info->device, "%s()\n", __func__);
-
- gpiod_set_value(par->gpio.reset, 0);
- udelay(20);
- gpiod_set_value(par->gpio.reset, 1);
- mdelay(120);
-}
-
/* Check if all necessary GPIOS defined */
static int verify_gpios(struct fbtft_par *par)
{
@@ -194,12 +181,12 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
/* select chip */
if (*buf) {
/* cs1 */
- gpiod_set_value(par->CS0, 1);
- gpiod_set_value(par->CS1, 0);
- } else {
- /* cs0 */
gpiod_set_value(par->CS0, 0);
gpiod_set_value(par->CS1, 1);
+ } else {
+ /* cs0 */
+ gpiod_set_value(par->CS0, 1);
+ gpiod_set_value(par->CS1, 0);
}
gpiod_set_value(par->RS, 0); /* RS->0 (command mode) */
@@ -397,8 +384,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
}
kfree(convert_buf);
- gpiod_set_value(par->CS0, 1);
- gpiod_set_value(par->CS1, 1);
+ gpiod_set_value(par->CS0, 0);
+ gpiod_set_value(par->CS1, 0);
return ret;
}
@@ -419,10 +406,10 @@ static int write(struct fbtft_par *par, void *buf, size_t len)
for (i = 0; i < 8; ++i)
gpiod_set_value(par->gpio.db[i], data & (1 << i));
/* set E */
- gpiod_set_value(par->EPIN, 1);
+ gpiod_set_value(par->EPIN, 0);
udelay(5);
/* unset E - write */
- gpiod_set_value(par->EPIN, 0);
+ gpiod_set_value(par->EPIN, 1);
udelay(1);
}
@@ -439,7 +426,6 @@ static struct fbtft_display display = {
.set_addr_win = set_addr_win,
.verify_gpios = verify_gpios,
.request_gpios_match = request_gpios_match,
- .reset = reset,
.write = write,
.write_register = write_reg8_bus8,
.write_vmem = write_vmem,