sii902x           222 drivers/gpu/drm/bridge/sii902x.c static inline struct sii902x *bridge_to_sii902x(struct drm_bridge *bridge)
sii902x           224 drivers/gpu/drm/bridge/sii902x.c 	return container_of(bridge, struct sii902x, bridge);
sii902x           227 drivers/gpu/drm/bridge/sii902x.c static inline struct sii902x *connector_to_sii902x(struct drm_connector *con)
sii902x           229 drivers/gpu/drm/bridge/sii902x.c 	return container_of(con, struct sii902x, connector);
sii902x           232 drivers/gpu/drm/bridge/sii902x.c static void sii902x_reset(struct sii902x *sii902x)
sii902x           234 drivers/gpu/drm/bridge/sii902x.c 	if (!sii902x->reset_gpio)
sii902x           237 drivers/gpu/drm/bridge/sii902x.c 	gpiod_set_value(sii902x->reset_gpio, 1);
sii902x           242 drivers/gpu/drm/bridge/sii902x.c 	gpiod_set_value(sii902x->reset_gpio, 0);
sii902x           248 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = connector_to_sii902x(connector);
sii902x           251 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           253 drivers/gpu/drm/bridge/sii902x.c 	regmap_read(sii902x->regmap, SII902X_INT_STATUS, &status);
sii902x           255 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           272 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = connector_to_sii902x(connector);
sii902x           278 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           280 drivers/gpu/drm/bridge/sii902x.c 	edid = drm_get_edid(connector, sii902x->i2cmux->adapter[0]);
sii902x           295 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_update_bits(sii902x->regmap, SII902X_SYS_CTRL_DATA,
sii902x           303 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           323 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = bridge_to_sii902x(bridge);
sii902x           325 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           327 drivers/gpu/drm/bridge/sii902x.c 	regmap_update_bits(sii902x->regmap, SII902X_SYS_CTRL_DATA,
sii902x           331 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           336 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = bridge_to_sii902x(bridge);
sii902x           338 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           340 drivers/gpu/drm/bridge/sii902x.c 	regmap_update_bits(sii902x->regmap, SII902X_PWR_STATE_CTRL,
sii902x           343 drivers/gpu/drm/bridge/sii902x.c 	regmap_update_bits(sii902x->regmap, SII902X_SYS_CTRL_DATA,
sii902x           346 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           353 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = bridge_to_sii902x(bridge);
sii902x           354 drivers/gpu/drm/bridge/sii902x.c 	struct regmap *regmap = sii902x->regmap;
sii902x           373 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           380 drivers/gpu/drm/bridge/sii902x.c 						       &sii902x->connector, adj);
sii902x           398 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           403 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = bridge_to_sii902x(bridge);
sii902x           407 drivers/gpu/drm/bridge/sii902x.c 	drm_connector_helper_add(&sii902x->connector,
sii902x           411 drivers/gpu/drm/bridge/sii902x.c 		dev_err(&sii902x->i2c->dev,
sii902x           416 drivers/gpu/drm/bridge/sii902x.c 	ret = drm_connector_init(drm, &sii902x->connector,
sii902x           422 drivers/gpu/drm/bridge/sii902x.c 	if (sii902x->i2c->irq > 0)
sii902x           423 drivers/gpu/drm/bridge/sii902x.c 		sii902x->connector.polled = DRM_CONNECTOR_POLL_HPD;
sii902x           425 drivers/gpu/drm/bridge/sii902x.c 		sii902x->connector.polled = DRM_CONNECTOR_POLL_CONNECT;
sii902x           427 drivers/gpu/drm/bridge/sii902x.c 	drm_connector_attach_encoder(&sii902x->connector, bridge->encoder);
sii902x           439 drivers/gpu/drm/bridge/sii902x.c static int sii902x_mute(struct sii902x *sii902x, bool mute)
sii902x           441 drivers/gpu/drm/bridge/sii902x.c 	struct device *dev = &sii902x->i2c->dev;
sii902x           447 drivers/gpu/drm/bridge/sii902x.c 	return regmap_update_bits(sii902x->regmap,
sii902x           496 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = dev_get_drvdata(dev);
sii902x           567 drivers/gpu/drm/bridge/sii902x.c 	ret = clk_prepare_enable(sii902x->audio.mclk);
sii902x           573 drivers/gpu/drm/bridge/sii902x.c 	if (sii902x->audio.mclk) {
sii902x           574 drivers/gpu/drm/bridge/sii902x.c 		mclk_rate = clk_get_rate(sii902x->audio.mclk);
sii902x           582 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           584 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap,
sii902x           590 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap, SII902X_TPI_I2S_INPUT_CONFIG_REG,
sii902x           595 drivers/gpu/drm/bridge/sii902x.c 	for (i = 0; i < ARRAY_SIZE(sii902x->audio.i2s_fifo_sequence) &&
sii902x           596 drivers/gpu/drm/bridge/sii902x.c 		    sii902x->audio.i2s_fifo_sequence[i]; i++)
sii902x           597 drivers/gpu/drm/bridge/sii902x.c 		regmap_write(sii902x->regmap,
sii902x           599 drivers/gpu/drm/bridge/sii902x.c 			     sii902x->audio.i2s_fifo_sequence[i]);
sii902x           601 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap, SII902X_TPI_AUDIO_CONFIG_BYTE3_REG,
sii902x           606 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_bulk_write(sii902x->regmap, SII902X_TPI_I2S_STRM_HDR_BASE,
sii902x           621 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_bulk_write(sii902x->regmap,
sii902x           629 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap, SII902X_IND_SET_PAGE, 0x02);
sii902x           633 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap, SII902X_IND_OFFSET, 0x24);
sii902x           637 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap, SII902X_IND_VALUE, 0x02);
sii902x           643 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           646 drivers/gpu/drm/bridge/sii902x.c 		clk_disable_unprepare(sii902x->audio.mclk);
sii902x           656 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = dev_get_drvdata(dev);
sii902x           658 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           660 drivers/gpu/drm/bridge/sii902x.c 	regmap_write(sii902x->regmap, SII902X_TPI_AUDIO_CONFIG_BYTE2_REG,
sii902x           663 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           665 drivers/gpu/drm/bridge/sii902x.c 	clk_disable_unprepare(sii902x->audio.mclk);
sii902x           671 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = dev_get_drvdata(dev);
sii902x           673 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           675 drivers/gpu/drm/bridge/sii902x.c 	sii902x_mute(sii902x, enable);
sii902x           677 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           685 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = dev_get_drvdata(dev);
sii902x           687 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           689 drivers/gpu/drm/bridge/sii902x.c 	memcpy(buf, sii902x->connector.eld,
sii902x           690 drivers/gpu/drm/bridge/sii902x.c 	       min(sizeof(sii902x->connector.eld), len));
sii902x           692 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           725 drivers/gpu/drm/bridge/sii902x.c static int sii902x_audio_codec_init(struct sii902x *sii902x,
sii902x           775 drivers/gpu/drm/bridge/sii902x.c 		sii902x->audio.i2s_fifo_sequence[i] |= audio_fifo_id[i] |
sii902x           778 drivers/gpu/drm/bridge/sii902x.c 	sii902x->audio.mclk = devm_clk_get_optional(dev, "mclk");
sii902x           779 drivers/gpu/drm/bridge/sii902x.c 	if (IS_ERR(sii902x->audio.mclk)) {
sii902x           781 drivers/gpu/drm/bridge/sii902x.c 			__func__, PTR_ERR(sii902x->audio.mclk));
sii902x           782 drivers/gpu/drm/bridge/sii902x.c 		return PTR_ERR(sii902x->audio.mclk);
sii902x           785 drivers/gpu/drm/bridge/sii902x.c 	sii902x->audio.pdev = platform_device_register_data(
sii902x           789 drivers/gpu/drm/bridge/sii902x.c 	return PTR_ERR_OR_ZERO(sii902x->audio.pdev);
sii902x           812 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = data;
sii902x           815 drivers/gpu/drm/bridge/sii902x.c 	mutex_lock(&sii902x->mutex);
sii902x           817 drivers/gpu/drm/bridge/sii902x.c 	regmap_read(sii902x->regmap, SII902X_INT_STATUS, &status);
sii902x           818 drivers/gpu/drm/bridge/sii902x.c 	regmap_write(sii902x->regmap, SII902X_INT_STATUS, status);
sii902x           820 drivers/gpu/drm/bridge/sii902x.c 	mutex_unlock(&sii902x->mutex);
sii902x           822 drivers/gpu/drm/bridge/sii902x.c 	if ((status & SII902X_HOTPLUG_EVENT) && sii902x->bridge.dev)
sii902x           823 drivers/gpu/drm/bridge/sii902x.c 		drm_helper_hpd_irq_event(sii902x->bridge.dev);
sii902x           842 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = i2c_mux_priv(mux);
sii902x           843 drivers/gpu/drm/bridge/sii902x.c 	struct device *dev = &sii902x->i2c->dev;
sii902x           848 drivers/gpu/drm/bridge/sii902x.c 	ret = sii902x_update_bits_unlocked(sii902x->i2c, SII902X_SYS_CTRL_DATA,
sii902x           857 drivers/gpu/drm/bridge/sii902x.c 		ret = sii902x_read_unlocked(sii902x->i2c, SII902X_SYS_CTRL_DATA,
sii902x           869 drivers/gpu/drm/bridge/sii902x.c 	return sii902x_write_unlocked(sii902x->i2c, SII902X_SYS_CTRL_DATA,
sii902x           887 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = i2c_mux_priv(mux);
sii902x           888 drivers/gpu/drm/bridge/sii902x.c 	struct device *dev = &sii902x->i2c->dev;
sii902x           908 drivers/gpu/drm/bridge/sii902x.c 		ret = sii902x_read_unlocked(sii902x->i2c, SII902X_SYS_CTRL_DATA,
sii902x           917 drivers/gpu/drm/bridge/sii902x.c 	ret = sii902x_update_bits_unlocked(sii902x->i2c, SII902X_SYS_CTRL_DATA,
sii902x           926 drivers/gpu/drm/bridge/sii902x.c 		ret = sii902x_read_unlocked(sii902x->i2c, SII902X_SYS_CTRL_DATA,
sii902x           954 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x;
sii902x           965 drivers/gpu/drm/bridge/sii902x.c 	sii902x = devm_kzalloc(dev, sizeof(*sii902x), GFP_KERNEL);
sii902x           966 drivers/gpu/drm/bridge/sii902x.c 	if (!sii902x)
sii902x           969 drivers/gpu/drm/bridge/sii902x.c 	sii902x->i2c = client;
sii902x           970 drivers/gpu/drm/bridge/sii902x.c 	sii902x->regmap = devm_regmap_init_i2c(client, &sii902x_regmap_config);
sii902x           971 drivers/gpu/drm/bridge/sii902x.c 	if (IS_ERR(sii902x->regmap))
sii902x           972 drivers/gpu/drm/bridge/sii902x.c 		return PTR_ERR(sii902x->regmap);
sii902x           974 drivers/gpu/drm/bridge/sii902x.c 	sii902x->reset_gpio = devm_gpiod_get_optional(dev, "reset",
sii902x           976 drivers/gpu/drm/bridge/sii902x.c 	if (IS_ERR(sii902x->reset_gpio)) {
sii902x           978 drivers/gpu/drm/bridge/sii902x.c 			PTR_ERR(sii902x->reset_gpio));
sii902x           979 drivers/gpu/drm/bridge/sii902x.c 		return PTR_ERR(sii902x->reset_gpio);
sii902x           982 drivers/gpu/drm/bridge/sii902x.c 	mutex_init(&sii902x->mutex);
sii902x           984 drivers/gpu/drm/bridge/sii902x.c 	sii902x_reset(sii902x);
sii902x           986 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_write(sii902x->regmap, SII902X_REG_TPI_RQB, 0x0);
sii902x           990 drivers/gpu/drm/bridge/sii902x.c 	ret = regmap_bulk_read(sii902x->regmap, SII902X_REG_CHIPID(0),
sii902x          1004 drivers/gpu/drm/bridge/sii902x.c 	regmap_read(sii902x->regmap, SII902X_INT_STATUS, &status);
sii902x          1005 drivers/gpu/drm/bridge/sii902x.c 	regmap_write(sii902x->regmap, SII902X_INT_STATUS, status);
sii902x          1008 drivers/gpu/drm/bridge/sii902x.c 		regmap_write(sii902x->regmap, SII902X_INT_ENABLE,
sii902x          1014 drivers/gpu/drm/bridge/sii902x.c 						sii902x);
sii902x          1019 drivers/gpu/drm/bridge/sii902x.c 	sii902x->bridge.funcs = &sii902x_bridge_funcs;
sii902x          1020 drivers/gpu/drm/bridge/sii902x.c 	sii902x->bridge.of_node = dev->of_node;
sii902x          1021 drivers/gpu/drm/bridge/sii902x.c 	sii902x->bridge.timings = &default_sii902x_timings;
sii902x          1022 drivers/gpu/drm/bridge/sii902x.c 	drm_bridge_add(&sii902x->bridge);
sii902x          1024 drivers/gpu/drm/bridge/sii902x.c 	sii902x_audio_codec_init(sii902x, dev);
sii902x          1026 drivers/gpu/drm/bridge/sii902x.c 	i2c_set_clientdata(client, sii902x);
sii902x          1028 drivers/gpu/drm/bridge/sii902x.c 	sii902x->i2cmux = i2c_mux_alloc(client->adapter, dev,
sii902x          1032 drivers/gpu/drm/bridge/sii902x.c 	if (!sii902x->i2cmux)
sii902x          1035 drivers/gpu/drm/bridge/sii902x.c 	sii902x->i2cmux->priv = sii902x;
sii902x          1036 drivers/gpu/drm/bridge/sii902x.c 	return i2c_mux_add_adapter(sii902x->i2cmux, 0, 0, 0);
sii902x          1042 drivers/gpu/drm/bridge/sii902x.c 	struct sii902x *sii902x = i2c_get_clientdata(client);
sii902x          1044 drivers/gpu/drm/bridge/sii902x.c 	i2c_mux_del_adapters(sii902x->i2cmux);
sii902x          1045 drivers/gpu/drm/bridge/sii902x.c 	drm_bridge_remove(&sii902x->bridge);