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()
150 return dev_err_probe(&pdev->dev, PTR_ERR(lcd->vdd), in ls037v7dw01_probe()
153 lcd->ini_gpio = devm_gpiod_get(&pdev->dev, "enable", GPIOD_OUT_LOW); in ls037v7dw01_probe()
154 if (IS_ERR(lcd->ini_gpio)) in ls037v7dw01_probe()
155 return dev_err_probe(&pdev->dev, PTR_ERR(lcd->ini_gpio), in ls037v7dw01_probe()
158 lcd->resb_gpio = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW); in ls037v7dw01_probe()
159 if (IS_ERR(lcd->resb_gpio)) in ls037v7dw01_probe()
160 return dev_err_probe(&pdev->dev, PTR_ERR(lcd->resb_gpio), in ls037v7dw01_probe()
163 lcd->mo_gpio = devm_gpiod_get_index(&pdev->dev, "mode", 0, in ls037v7dw01_probe()
165 if (IS_ERR(lcd->mo_gpio)) { in ls037v7dw01_probe()
167 return PTR_ERR(lcd->mo_gpio); in ls037v7dw01_probe()
170 lcd->lr_gpio = devm_gpiod_get_index(&pdev->dev, "mode", 1, in ls037v7dw01_probe()
172 if (IS_ERR(lcd->lr_gpio)) { in ls037v7dw01_probe()
174 return PTR_ERR(lcd->lr_gpio); in ls037v7dw01_probe()
177 lcd->ud_gpio = devm_gpiod_get_index(&pdev->dev, "mode", 2, in ls037v7dw01_probe()
179 if (IS_ERR(lcd->ud_gpio)) { in ls037v7dw01_probe()
181 return PTR_ERR(lcd->ud_gpio); in ls037v7dw01_probe()
184 drm_panel_init(&lcd->panel, &pdev->dev, &ls037v7dw01_funcs, in ls037v7dw01_probe()
187 drm_panel_add(&lcd->panel); in ls037v7dw01_probe()
194 struct ls037v7dw01_panel *lcd = platform_get_drvdata(pdev); in ls037v7dw01_remove() local
196 drm_panel_remove(&lcd->panel); in ls037v7dw01_remove()
197 drm_panel_disable(&lcd->panel); in ls037v7dw01_remove()
198 drm_panel_unprepare(&lcd->panel); in ls037v7dw01_remove()