Lines Matching refs:ldb
48 struct ldb base;
62 static inline struct imx8qm_ldb *base_to_imx8qm_ldb(struct ldb *base) in base_to_imx8qm_ldb()
84 struct ldb *ldb = ldb_ch->ldb; in imx8qm_ldb_bridge_atomic_check() local
87 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_atomic_check()
131 struct ldb *ldb = ldb_ch->ldb; in imx8qm_ldb_bridge_mode_set() local
134 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_mode_set()
172 ldb->ldb_ctrl |= LDB_DI0_VS_POL_ACT_LOW; in imx8qm_ldb_bridge_mode_set()
174 ldb->ldb_ctrl |= LDB_DI1_VS_POL_ACT_LOW; in imx8qm_ldb_bridge_mode_set()
182 ldb->ldb_ctrl |= LDB_CH0_DATA_WIDTH_24BIT; in imx8qm_ldb_bridge_mode_set()
184 ldb->ldb_ctrl |= LDB_CH1_DATA_WIDTH_24BIT; in imx8qm_ldb_bridge_mode_set()
191 regmap_update_bits(ldb->regmap, SS_CTRL, CH_VSYNC_M(chno), 0); in imx8qm_ldb_bridge_mode_set()
193 regmap_update_bits(ldb->regmap, SS_CTRL, in imx8qm_ldb_bridge_mode_set()
197 regmap_update_bits(ldb->regmap, SS_CTRL, CH_HSYNC_M(chno), 0); in imx8qm_ldb_bridge_mode_set()
199 regmap_update_bits(ldb->regmap, SS_CTRL, in imx8qm_ldb_bridge_mode_set()
208 struct ldb *ldb = ldb_ch->ldb; in imx8qm_ldb_bridge_atomic_enable() local
211 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_atomic_enable()
221 ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; in imx8qm_ldb_bridge_atomic_enable()
222 ldb->ldb_ctrl |= LDB_CH0_MODE_EN_TO_DI0; in imx8qm_ldb_bridge_atomic_enable()
225 ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK; in imx8qm_ldb_bridge_atomic_enable()
226 ldb->ldb_ctrl |= LDB_CH1_MODE_EN_TO_DI0; in imx8qm_ldb_bridge_atomic_enable()
255 struct ldb *ldb = ldb_ch->ldb; in imx8qm_ldb_bridge_atomic_disable() local
258 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_atomic_disable()
443 struct ldb *ldb; in imx8qm_ldb_probe() local
473 ldb = &imx8qm_ldb->base; in imx8qm_ldb_probe()
474 ldb->dev = dev; in imx8qm_ldb_probe()
475 ldb->ctrl_reg = 0xe0; in imx8qm_ldb_probe()
478 ldb->channel[i] = &imx8qm_ldb->channel[i].base; in imx8qm_ldb_probe()
480 ret = ldb_init_helper(ldb); in imx8qm_ldb_probe()
484 if (ldb->available_ch_cnt == 0) { in imx8qm_ldb_probe()
489 if (ldb->available_ch_cnt == 2) { in imx8qm_ldb_probe()
490 port1 = of_graph_get_port_by_id(ldb->channel[0]->np, 1); in imx8qm_ldb_probe()
491 port2 = of_graph_get_port_by_id(ldb->channel[1]->np, 1); in imx8qm_ldb_probe()
523 ret = ldb_find_next_bridge_helper(ldb); in imx8qm_ldb_probe()
530 ldb_add_bridge_helper(ldb, &imx8qm_ldb_bridge_funcs); in imx8qm_ldb_probe()
538 struct ldb *ldb = &imx8qm_ldb->base; in imx8qm_ldb_remove() local
540 ldb_remove_bridge_helper(ldb); in imx8qm_ldb_remove()
555 struct ldb *ldb = &imx8qm_ldb->base; in imx8qm_ldb_runtime_resume() local
558 regmap_write(ldb->regmap, ldb->ctrl_reg, 0); in imx8qm_ldb_runtime_resume()