Lines Matching refs:lcd
150 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_spi_write_then_read() local
186 ret = spi_sync(lcd->spi, &msg); in hx8357_spi_write_then_read()
246 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_lcd_init() local
253 gpio_set_value_cansleep(lcd->im_pins[0], 1); in hx8357_lcd_init()
254 gpio_set_value_cansleep(lcd->im_pins[1], 0); in hx8357_lcd_init()
255 gpio_set_value_cansleep(lcd->im_pins[2], 1); in hx8357_lcd_init()
258 gpio_set_value(lcd->reset, 1); in hx8357_lcd_init()
260 gpio_set_value(lcd->reset, 0); in hx8357_lcd_init()
262 gpio_set_value(lcd->reset, 1); in hx8357_lcd_init()
363 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_set_power() local
366 if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->state)) in hx8357_set_power()
368 else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->state)) in hx8357_set_power()
372 lcd->state = power; in hx8357_set_power()
381 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_get_power() local
383 return lcd->state; in hx8357_get_power()
394 struct hx8357_data *lcd; in hx8357_probe() local
397 lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); in hx8357_probe()
398 if (!lcd) { in hx8357_probe()
409 lcd->spi = spi; in hx8357_probe()
411 lcd->reset = of_get_named_gpio(spi->dev.of_node, "gpios-reset", 0); in hx8357_probe()
412 if (!gpio_is_valid(lcd->reset)) { in hx8357_probe()
417 ret = devm_gpio_request_one(&spi->dev, lcd->reset, in hx8357_probe()
423 lcd->reset, ret); in hx8357_probe()
428 lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node, in hx8357_probe()
430 if (lcd->im_pins[i] == -EPROBE_DEFER) { in hx8357_probe()
434 if (!gpio_is_valid(lcd->im_pins[i])) { in hx8357_probe()
439 ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i], in hx8357_probe()
443 lcd->im_pins[i], ret); in hx8357_probe()
448 lcdev = lcd_device_register("mxsfb", &spi->dev, lcd, &hx8357_ops); in hx8357_probe()