Lines Matching refs:ili
299 static void ili9341_dpi_init(struct ili9341 *ili) in ili9341_dpi_init() argument
301 struct device *dev = (&ili->panel)->dev; in ili9341_dpi_init()
302 struct mipi_dbi *dbi = ili->dbi; in ili9341_dpi_init()
303 struct ili9341_config *cfg = (struct ili9341_config *)ili->conf; in ili9341_dpi_init()
315 mipi_dbi_command(ili->dbi, ILI9341_PRC, cfg->prc); in ili9341_dpi_init()
363 static int ili9341_dpi_power_on(struct ili9341 *ili) in ili9341_dpi_power_on() argument
365 struct device *dev = (&ili->panel)->dev; in ili9341_dpi_power_on()
369 gpiod_set_value(ili->reset_gpio, 1); in ili9341_dpi_power_on()
372 ret = regulator_bulk_enable(ARRAY_SIZE(ili->supplies), in ili9341_dpi_power_on()
373 ili->supplies); in ili9341_dpi_power_on()
381 gpiod_set_value(ili->reset_gpio, 0); in ili9341_dpi_power_on()
387 static int ili9341_dpi_power_off(struct ili9341 *ili) in ili9341_dpi_power_off() argument
390 gpiod_set_value(ili->reset_gpio, 1); in ili9341_dpi_power_off()
393 return regulator_bulk_disable(ARRAY_SIZE(ili->supplies), in ili9341_dpi_power_off()
394 ili->supplies); in ili9341_dpi_power_off()
399 struct ili9341 *ili = panel_to_ili9341(panel); in ili9341_dpi_disable() local
401 mipi_dbi_command(ili->dbi, MIPI_DCS_SET_DISPLAY_OFF); in ili9341_dpi_disable()
407 struct ili9341 *ili = panel_to_ili9341(panel); in ili9341_dpi_unprepare() local
409 return ili9341_dpi_power_off(ili); in ili9341_dpi_unprepare()
414 struct ili9341 *ili = panel_to_ili9341(panel); in ili9341_dpi_prepare() local
417 ret = ili9341_dpi_power_on(ili); in ili9341_dpi_prepare()
421 ili9341_dpi_init(ili); in ili9341_dpi_prepare()
428 struct ili9341 *ili = panel_to_ili9341(panel); in ili9341_dpi_enable() local
430 mipi_dbi_command(ili->dbi, MIPI_DCS_SET_DISPLAY_ON); in ili9341_dpi_enable()
437 struct ili9341 *ili = panel_to_ili9341(panel); in ili9341_dpi_get_modes() local
443 info->width_mm = ili->conf->mode.width_mm; in ili9341_dpi_get_modes()
444 info->height_mm = ili->conf->mode.height_mm; in ili9341_dpi_get_modes()
446 if (ili->conf->rgb_interface & ILI9341_RGB_DPL) in ili9341_dpi_get_modes()
451 if (ili->conf->rgb_interface & ILI9341_RGB_EPL) in ili9341_dpi_get_modes()
456 mode = drm_mode_duplicate(drm, &ili->conf->mode); in ili9341_dpi_get_modes()
464 if (ili->conf->rgb_interface & ILI9341_RGB_HSPL) in ili9341_dpi_get_modes()
469 if (ili->conf->rgb_interface & ILI9341_RGB_VSPL) in ili9341_dpi_get_modes()
665 struct ili9341 *ili; in ili9341_dpi_probe() local
668 ili = devm_kzalloc(dev, sizeof(struct ili9341), GFP_KERNEL); in ili9341_dpi_probe()
669 if (!ili) in ili9341_dpi_probe()
672 ili->dbi = devm_kzalloc(dev, sizeof(struct mipi_dbi), in ili9341_dpi_probe()
674 if (!ili->dbi) in ili9341_dpi_probe()
677 ili->supplies[0].supply = "vci"; in ili9341_dpi_probe()
678 ili->supplies[1].supply = "vddi"; in ili9341_dpi_probe()
679 ili->supplies[2].supply = "vddi-led"; in ili9341_dpi_probe()
680 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ili->supplies), in ili9341_dpi_probe()
681 ili->supplies); in ili9341_dpi_probe()
687 ret = mipi_dbi_spi_init(spi, ili->dbi, dc); in ili9341_dpi_probe()
691 spi_set_drvdata(spi, ili); in ili9341_dpi_probe()
692 ili->reset_gpio = reset; in ili9341_dpi_probe()
697 ili->conf = of_device_get_match_data(dev); in ili9341_dpi_probe()
698 if (!ili->conf) { in ili9341_dpi_probe()
703 ili->max_spi_speed = ili->conf->max_spi_speed; in ili9341_dpi_probe()
704 drm_panel_init(&ili->panel, dev, &ili9341_dpi_funcs, in ili9341_dpi_probe()
706 drm_panel_add(&ili->panel); in ili9341_dpi_probe()
737 struct ili9341 *ili = spi_get_drvdata(spi); in ili9341_remove() local
741 ili9341_dpi_power_off(ili); in ili9341_remove()
742 drm_panel_remove(&ili->panel); in ili9341_remove()