Lines Matching full:lcd

3  * Sharp LS037V7DW01 LCD Panel Driver
41 struct ls037v7dw01_panel *lcd = to_ls037v7dw01_device(panel); in ls037v7dw01_disable() local
43 gpiod_set_value_cansleep(lcd->ini_gpio, 0); in ls037v7dw01_disable()
44 gpiod_set_value_cansleep(lcd->resb_gpio, 0); in ls037v7dw01_disable()
46 /* Wait at least 5 vsyncs after disabling the LCD. */ in ls037v7dw01_disable()
54 struct ls037v7dw01_panel *lcd = to_ls037v7dw01_device(panel); in ls037v7dw01_unprepare() local
56 regulator_disable(lcd->vdd); in ls037v7dw01_unprepare()
62 struct ls037v7dw01_panel *lcd = to_ls037v7dw01_device(panel); in ls037v7dw01_prepare() local
65 ret = regulator_enable(lcd->vdd); in ls037v7dw01_prepare()
67 dev_err(&lcd->pdev->dev, "%s: failed to enable regulator\n", in ls037v7dw01_prepare()
75 struct ls037v7dw01_panel *lcd = to_ls037v7dw01_device(panel); in ls037v7dw01_enable() local
77 /* Wait couple of vsyncs before enabling the LCD. */ in ls037v7dw01_enable()
80 gpiod_set_value_cansleep(lcd->resb_gpio, 1); in ls037v7dw01_enable()
81 gpiod_set_value_cansleep(lcd->ini_gpio, 1); in ls037v7dw01_enable()
139 struct ls037v7dw01_panel *lcd; in ls037v7dw01_probe() local
141 lcd = devm_kzalloc(&pdev->dev, sizeof(*lcd), GFP_KERNEL); in ls037v7dw01_probe()
142 if (!lcd) in ls037v7dw01_probe()
145 platform_set_drvdata(pdev, lcd); in ls037v7dw01_probe()
146 lcd->pdev = pdev; in ls037v7dw01_probe()
148 lcd->vdd = devm_regulator_get(&pdev->dev, "envdd"); in ls037v7dw01_probe()
149 if (IS_ERR(lcd->vdd)) { in ls037v7dw01_probe()
151 return PTR_ERR(lcd->vdd); in ls037v7dw01_probe()
154 lcd->ini_gpio = devm_gpiod_get(&pdev->dev, "enable", GPIOD_OUT_LOW); in ls037v7dw01_probe()
155 if (IS_ERR(lcd->ini_gpio)) { in ls037v7dw01_probe()
157 return PTR_ERR(lcd->ini_gpio); in ls037v7dw01_probe()
160 lcd->resb_gpio = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW); in ls037v7dw01_probe()
161 if (IS_ERR(lcd->resb_gpio)) { in ls037v7dw01_probe()
163 return PTR_ERR(lcd->resb_gpio); in ls037v7dw01_probe()
166 lcd->mo_gpio = devm_gpiod_get_index(&pdev->dev, "mode", 0, in ls037v7dw01_probe()
168 if (IS_ERR(lcd->mo_gpio)) { in ls037v7dw01_probe()
170 return PTR_ERR(lcd->mo_gpio); in ls037v7dw01_probe()
173 lcd->lr_gpio = devm_gpiod_get_index(&pdev->dev, "mode", 1, in ls037v7dw01_probe()
175 if (IS_ERR(lcd->lr_gpio)) { in ls037v7dw01_probe()
177 return PTR_ERR(lcd->lr_gpio); in ls037v7dw01_probe()
180 lcd->ud_gpio = devm_gpiod_get_index(&pdev->dev, "mode", 2, in ls037v7dw01_probe()
182 if (IS_ERR(lcd->ud_gpio)) { in ls037v7dw01_probe()
184 return PTR_ERR(lcd->ud_gpio); in ls037v7dw01_probe()
187 drm_panel_init(&lcd->panel, &pdev->dev, &ls037v7dw01_funcs, in ls037v7dw01_probe()
190 drm_panel_add(&lcd->panel); in ls037v7dw01_probe()
197 struct ls037v7dw01_panel *lcd = platform_get_drvdata(pdev); in ls037v7dw01_remove() local
199 drm_panel_remove(&lcd->panel); in ls037v7dw01_remove()
200 drm_panel_disable(&lcd->panel); in ls037v7dw01_remove()
201 drm_panel_unprepare(&lcd->panel); in ls037v7dw01_remove()