Lines Matching +full:120 +full:- +full:db

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
89 static int db7430_power_on(struct db7430 *db) in db7430_power_on() argument
91 struct mipi_dbi *dbi = &db->dbi; in db7430_power_on()
95 ret = regulator_bulk_enable(ARRAY_SIZE(db->regulators), in db7430_power_on()
96 db->regulators); in db7430_power_on()
98 dev_err(db->dev, "failed to enable regulators: %d\n", ret); in db7430_power_on()
104 gpiod_set_value_cansleep(db->reset, 1); in db7430_power_on()
106 /* De-assert reset */ in db7430_power_on()
107 gpiod_set_value_cansleep(db->reset, 0); in db7430_power_on()
110 dev_dbg(db->dev, "de-asserted RESET\n"); in db7430_power_on()
164 static int db7430_power_off(struct db7430 *db) in db7430_power_off() argument
167 gpiod_set_value_cansleep(db->reset, 1); in db7430_power_off()
168 return regulator_bulk_disable(ARRAY_SIZE(db->regulators), in db7430_power_off()
169 db->regulators); in db7430_power_off()
179 struct db7430 *db = to_db7430(panel); in db7430_disable() local
180 struct mipi_dbi *dbi = &db->dbi; in db7430_disable()
185 msleep(120); in db7430_disable()
197 struct db7430 *db = to_db7430(panel); in db7430_enable() local
198 struct mipi_dbi *dbi = &db->dbi; in db7430_enable()
204 /* NVM (non-volatile memory) load sequence */ in db7430_enable()
223 * db7430_get_modes() - return the mode
230 struct db7430 *db = to_db7430(panel); in db7430_get_modes() local
234 mode = drm_mode_duplicate(connector->dev, &db7430_480_800_mode); in db7430_get_modes()
236 dev_err(db->dev, "failed to add mode\n"); in db7430_get_modes()
237 return -ENOMEM; in db7430_get_modes()
240 connector->display_info.bpc = 8; in db7430_get_modes()
241 connector->display_info.width_mm = mode->width_mm; in db7430_get_modes()
242 connector->display_info.height_mm = mode->height_mm; in db7430_get_modes()
243 connector->display_info.bus_flags = in db7430_get_modes()
245 drm_display_info_set_bus_formats(&connector->display_info, in db7430_get_modes()
249 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in db7430_get_modes()
266 struct device *dev = &spi->dev; in db7430_probe()
267 struct db7430 *db; in db7430_probe() local
270 db = devm_kzalloc(dev, sizeof(*db), GFP_KERNEL); in db7430_probe()
271 if (!db) in db7430_probe()
272 return -ENOMEM; in db7430_probe()
273 db->dev = dev; in db7430_probe()
279 db->regulators[0].supply = "vci"; in db7430_probe()
280 db->regulators[1].supply = "vccio"; in db7430_probe()
282 ARRAY_SIZE(db->regulators), in db7430_probe()
283 db->regulators); in db7430_probe()
287 db->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in db7430_probe()
288 if (IS_ERR(db->reset)) { in db7430_probe()
289 ret = PTR_ERR(db->reset); in db7430_probe()
293 ret = mipi_dbi_spi_init(spi, &db->dbi, NULL); in db7430_probe()
297 drm_panel_init(&db->panel, dev, &db7430_drm_funcs, in db7430_probe()
301 ret = drm_panel_of_backlight(&db->panel); in db7430_probe()
305 spi_set_drvdata(spi, db); in db7430_probe()
307 drm_panel_add(&db->panel); in db7430_probe()
315 struct db7430 *db = spi_get_drvdata(spi); in db7430_remove() local
317 drm_panel_remove(&db->panel); in db7430_remove()
322 * so list the different variants here and add per-variant data if needed.
341 .name = "db7430-panel",