Lines Matching refs:lcd

216 	struct hx8357_data *lcd = lcd_get_data(lcdev);  in hx8357_spi_write_then_read()  local
252 ret = spi_sync(lcd->spi, &msg); in hx8357_spi_write_then_read()
320 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_lcd_reset() local
323 gpiod_set_value(lcd->reset, 0); in hx8357_lcd_reset()
325 gpiod_set_value(lcd->reset, 1); in hx8357_lcd_reset()
327 gpiod_set_value(lcd->reset, 0); in hx8357_lcd_reset()
335 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_lcd_init() local
342 if (lcd->im_pins) { in hx8357_lcd_init()
343 gpiod_set_value_cansleep(lcd->im_pins->desc[0], 1); in hx8357_lcd_init()
344 gpiod_set_value_cansleep(lcd->im_pins->desc[1], 0); in hx8357_lcd_init()
345 gpiod_set_value_cansleep(lcd->im_pins->desc[2], 1); in hx8357_lcd_init()
539 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_set_power() local
542 if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->state)) in hx8357_set_power()
544 else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->state)) in hx8357_set_power()
548 lcd->state = power; in hx8357_set_power()
557 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_get_power() local
559 return lcd->state; in hx8357_get_power()
573 struct hx8357_data *lcd; in hx8357_probe() local
577 lcd = devm_kzalloc(dev, sizeof(*lcd), GFP_KERNEL); in hx8357_probe()
578 if (!lcd) in hx8357_probe()
585 lcd->spi = spi; in hx8357_probe()
591 lcd->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in hx8357_probe()
592 if (IS_ERR(lcd->reset)) in hx8357_probe()
593 return dev_err_probe(dev, PTR_ERR(lcd->reset), "failed to request reset GPIO\n"); in hx8357_probe()
594 gpiod_set_consumer_name(lcd->reset, "hx8357-reset"); in hx8357_probe()
596 lcd->im_pins = devm_gpiod_get_array_optional(dev, "im", GPIOD_OUT_LOW); in hx8357_probe()
597 if (IS_ERR(lcd->im_pins)) in hx8357_probe()
598 return dev_err_probe(dev, PTR_ERR(lcd->im_pins), "failed to request im GPIOs\n"); in hx8357_probe()
599 if (lcd->im_pins) { in hx8357_probe()
600 if (lcd->im_pins->ndescs < HX8357_NUM_IM_PINS) in hx8357_probe()
604 gpiod_set_consumer_name(lcd->im_pins->desc[i], "im_pins"); in hx8357_probe()
607 lcdev = devm_lcd_device_register(dev, "mxsfb", dev, lcd, &hx8357_ops); in hx8357_probe()