Lines Matching +full:reset +full:- +full:assert +full:- +full:ms
1 // SPDX-License-Identifier: GPL-2.0
5 * Found in the Samsung Galaxy Beam GT-I8350 mobile phone.
16 #include <linux/media-bus-format.h>
49 * struct db7430 - state container for a panel controlled by the DB7430
63 /** @reset: reset GPIO line */
64 struct gpio_desc *reset; member
95 struct mipi_dbi *dbi = &db->dbi; in db7430_power_on()
99 ret = regulator_bulk_enable(ARRAY_SIZE(db->regulators), in db7430_power_on()
100 db->regulators); in db7430_power_on()
102 dev_err(db->dev, "failed to enable regulators: %d\n", ret); in db7430_power_on()
107 /* Assert reset >=1 ms */ in db7430_power_on()
108 gpiod_set_value_cansleep(db->reset, 1); in db7430_power_on()
110 /* De-assert reset */ in db7430_power_on()
111 gpiod_set_value_cansleep(db->reset, 0); in db7430_power_on()
112 /* Wait >= 10 ms */ in db7430_power_on()
114 dev_dbg(db->dev, "de-asserted RESET\n"); in db7430_power_on()
170 /* Go into RESET and disable regulators */ in db7430_power_off()
171 gpiod_set_value_cansleep(db->reset, 1); in db7430_power_off()
172 return regulator_bulk_disable(ARRAY_SIZE(db->regulators), in db7430_power_off()
173 db->regulators); in db7430_power_off()
184 struct mipi_dbi *dbi = &db->dbi; in db7430_disable()
202 struct mipi_dbi *dbi = &db->dbi; in db7430_enable()
208 /* NVM (non-volatile memory) load sequence */ in db7430_enable()
227 * db7430_get_modes() - return the mode
238 mode = drm_mode_duplicate(connector->dev, &db7430_480_800_mode); in db7430_get_modes()
240 dev_err(db->dev, "failed to add mode\n"); in db7430_get_modes()
241 return -ENOMEM; in db7430_get_modes()
244 connector->display_info.bpc = 8; in db7430_get_modes()
245 connector->display_info.width_mm = mode->width_mm; in db7430_get_modes()
246 connector->display_info.height_mm = mode->height_mm; in db7430_get_modes()
247 connector->display_info.bus_flags = in db7430_get_modes()
249 drm_display_info_set_bus_formats(&connector->display_info, in db7430_get_modes()
253 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in db7430_get_modes()
270 struct device *dev = &spi->dev; in db7430_probe()
276 return -ENOMEM; in db7430_probe()
277 db->dev = dev; in db7430_probe()
283 db->regulators[0].supply = "vci"; in db7430_probe()
284 db->regulators[1].supply = "vccio"; in db7430_probe()
286 ARRAY_SIZE(db->regulators), in db7430_probe()
287 db->regulators); in db7430_probe()
291 db->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in db7430_probe()
292 if (IS_ERR(db->reset)) { in db7430_probe()
293 ret = PTR_ERR(db->reset); in db7430_probe()
294 return dev_err_probe(dev, ret, "no RESET GPIO\n"); in db7430_probe()
297 ret = mipi_dbi_spi_init(spi, &db->dbi, NULL); in db7430_probe()
301 drm_panel_init(&db->panel, dev, &db7430_drm_funcs, in db7430_probe()
305 ret = drm_panel_of_backlight(&db->panel); in db7430_probe()
311 drm_panel_add(&db->panel); in db7430_probe()
321 drm_panel_remove(&db->panel); in db7430_remove()
326 * so list the different variants here and add per-variant data if needed.
338 .name = "db7430-panel",