Lines Matching refs:rad
267 struct rad_panel *rad = to_rad_panel(panel); in rad_panel_prepare() local
270 if (rad->prepared) in rad_panel_prepare()
273 ret = regulator_bulk_enable(rad->num_supplies, rad->supplies); in rad_panel_prepare()
277 if (rad->reset) { in rad_panel_prepare()
278 gpiod_set_value_cansleep(rad->reset, 1); in rad_panel_prepare()
280 gpiod_set_value_cansleep(rad->reset, 0); in rad_panel_prepare()
284 rad->prepared = true; in rad_panel_prepare()
291 struct rad_panel *rad = to_rad_panel(panel); in rad_panel_unprepare() local
294 if (!rad->prepared) in rad_panel_unprepare()
302 if (rad->reset) { in rad_panel_unprepare()
303 gpiod_set_value_cansleep(rad->reset, 1); in rad_panel_unprepare()
305 gpiod_set_value_cansleep(rad->reset, 0); in rad_panel_unprepare()
308 ret = regulator_bulk_disable(rad->num_supplies, rad->supplies); in rad_panel_unprepare()
312 rad->prepared = false; in rad_panel_unprepare()
319 struct rad_panel *rad = to_rad_panel(panel); in rad_panel_enable() local
320 struct mipi_dsi_device *dsi = rad->dsi; in rad_panel_enable()
325 if (rad->enabled) in rad_panel_enable()
390 backlight_enable(rad->backlight); in rad_panel_enable()
392 rad->enabled = true; in rad_panel_enable()
397 gpiod_set_value_cansleep(rad->reset, 1); in rad_panel_enable()
404 struct rad_panel *rad = to_rad_panel(panel); in rad_panel_disable() local
405 struct mipi_dsi_device *dsi = rad->dsi; in rad_panel_disable()
409 if (!rad->enabled) in rad_panel_disable()
414 backlight_disable(rad->backlight); in rad_panel_disable()
432 rad->enabled = false; in rad_panel_disable()
467 struct rad_panel *rad = mipi_dsi_get_drvdata(dsi); in rad_bl_get_brightness() local
471 if (!rad->prepared) in rad_bl_get_brightness()
488 struct rad_panel *rad = mipi_dsi_get_drvdata(dsi); in rad_bl_update_status() local
491 if (!rad->prepared) in rad_bl_update_status()
521 static int rad_init_regulators(struct rad_panel *rad) in rad_init_regulators() argument
523 struct device *dev = &rad->dsi->dev; in rad_init_regulators()
526 rad->num_supplies = ARRAY_SIZE(rad_supply_names); in rad_init_regulators()
527 rad->supplies = devm_kcalloc(dev, rad->num_supplies, in rad_init_regulators()
528 sizeof(*rad->supplies), GFP_KERNEL); in rad_init_regulators()
529 if (!rad->supplies) in rad_init_regulators()
532 for (i = 0; i < rad->num_supplies; i++) in rad_init_regulators()
533 rad->supplies[i].supply = rad_supply_names[i]; in rad_init_regulators()
535 return devm_regulator_bulk_get(dev, rad->num_supplies, rad->supplies); in rad_init_regulators()
621 struct rad_panel *rad = mipi_dsi_get_drvdata(dsi); in rad_panel_remove() local
629 drm_panel_remove(&rad->panel); in rad_panel_remove()
634 struct rad_panel *rad = mipi_dsi_get_drvdata(dsi); in rad_panel_shutdown() local
636 rad_panel_disable(&rad->panel); in rad_panel_shutdown()
637 rad_panel_unprepare(&rad->panel); in rad_panel_shutdown()