Lines Matching +full:cs +full:- +full:2
1 // SPDX-License-Identifier: GPL-2.0+
18 static void lcd_panel_spi_write(int cs, int clk, int mosi, in lcd_panel_spi_write() argument
23 gpio_direction_output(cs, 0); in lcd_panel_spi_write()
26 offset = (bits - 1) - i; in lcd_panel_spi_write()
28 udelay(2); in lcd_panel_spi_write()
30 udelay(2); in lcd_panel_spi_write()
32 gpio_direction_output(cs, 1); in lcd_panel_spi_write()
33 udelay(2); in lcd_panel_spi_write()
44 0x3ca4, /* enter test mode(2) */ in hitachi_tx18d42vm_init()
46 0x4041, /* adopt 2 line / 1 dot */ in hitachi_tx18d42vm_init()
48 int i, cs, clk, mosi, ret = 0; in hitachi_tx18d42vm_init() local
50 cs = name_to_gpio(CONFIG_VIDEO_LCD_SPI_CS); in hitachi_tx18d42vm_init()
54 if (cs == -1 || clk == -1 || mosi == 1) { in hitachi_tx18d42vm_init()
56 return -EINVAL; in hitachi_tx18d42vm_init()
59 if (gpio_request(cs, "tx18d42vm-spi-cs") != 0 || in hitachi_tx18d42vm_init()
60 gpio_request(clk, "tx18d42vm-spi-clk") != 0 || in hitachi_tx18d42vm_init()
61 gpio_request(mosi, "tx18d42vm-spi-mosi") != 0) { in hitachi_tx18d42vm_init()
63 ret = -EBUSY; in hitachi_tx18d42vm_init()
68 lcd_panel_spi_write(cs, clk, mosi, init_data[i], 16); in hitachi_tx18d42vm_init()
72 lcd_panel_spi_write(cs, clk, mosi, 0x00ad, 16); /* display on */ in hitachi_tx18d42vm_init()
77 gpio_free(cs); in hitachi_tx18d42vm_init()