Loading drivers/video/msm/mdss/mhl_sii8334.c +16 −12 Original line number Diff line number Diff line Loading @@ -399,19 +399,22 @@ static int mhl_sii_config(struct mhl_tx_ctrl *mhl_ctrl, bool on) client = mhl_ctrl->i2c_handle; mutex_lock(&mhl_ctrl->sii_config_lock); if (on && !mhl_ctrl->irq_req_done) { rc = mhl_vreg_config(mhl_ctrl, 1); if (rc) { pr_err("%s: vreg init failed [%d]\n", __func__, rc); return -ENODEV; rc = -ENODEV; goto vreg_config_error; } rc = mhl_gpio_config(mhl_ctrl, 1); if (rc) { pr_err("%s: gpio init failed [%d]\n", __func__, rc); return -ENODEV; rc = -ENODEV; goto vreg_config_error; } rc = request_threaded_irq(mhl_ctrl->i2c_handle->irq, NULL, Loading @@ -420,9 +423,12 @@ static int mhl_sii_config(struct mhl_tx_ctrl *mhl_ctrl, bool on) if (rc) { pr_err("%s: request_threaded_irq failed, status: %d\n", __func__, rc); return -ENODEV; rc = -ENODEV; goto vreg_config_error; } else { mhl_ctrl->irq_req_done = true; /* wait for i2c interrupt line to be activated */ msleep(100); } } else if (!on && mhl_ctrl->irq_req_done) { free_irq(mhl_ctrl->i2c_handle->irq, mhl_ctrl); Loading @@ -431,6 +437,8 @@ static int mhl_sii_config(struct mhl_tx_ctrl *mhl_ctrl, bool on) mhl_ctrl->irq_req_done = false; } vreg_config_error: mutex_unlock(&mhl_ctrl->sii_config_lock); return rc; } Loading Loading @@ -472,17 +480,12 @@ static int mhl_sii_device_discovery(void *data, int id, flush_work(&mhl_ctrl->mhl_intr_work); if (!mhl_ctrl->irq_req_done) { rc = mhl_sii_config(mhl_ctrl, true); if (rc) { pr_err("%s: Failed to config vreg/gpio\n", __func__); return rc; } /* wait for i2c interrupt line to be activated */ msleep(100); } if (!mhl_ctrl->disc_enabled) { spin_lock_irqsave(&mhl_ctrl->lock, flags); mhl_ctrl->tx_powered_off = false; Loading Loading @@ -1866,6 +1869,7 @@ static int mhl_i2c_probe(struct i2c_client *client, init_completion(&mhl_ctrl->rgnd_done); mutex_init(&mhl_ctrl->sii_config_lock); mhl_ctrl->mhl_psy.name = "ext-vbus"; Loading include/linux/mhl_8334.h +5 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,11 @@ struct mhl_tx_ctrl { int wr_burst_pending; struct completion req_write_done; spinlock_t lock; /* * Lock between mhl_sii_config and * mhl_sii_device_discovery functions */ struct mutex sii_config_lock; bool tx_powered_off; uint8_t dwnstream_hpd; bool mhl_det_discon; Loading Loading
drivers/video/msm/mdss/mhl_sii8334.c +16 −12 Original line number Diff line number Diff line Loading @@ -399,19 +399,22 @@ static int mhl_sii_config(struct mhl_tx_ctrl *mhl_ctrl, bool on) client = mhl_ctrl->i2c_handle; mutex_lock(&mhl_ctrl->sii_config_lock); if (on && !mhl_ctrl->irq_req_done) { rc = mhl_vreg_config(mhl_ctrl, 1); if (rc) { pr_err("%s: vreg init failed [%d]\n", __func__, rc); return -ENODEV; rc = -ENODEV; goto vreg_config_error; } rc = mhl_gpio_config(mhl_ctrl, 1); if (rc) { pr_err("%s: gpio init failed [%d]\n", __func__, rc); return -ENODEV; rc = -ENODEV; goto vreg_config_error; } rc = request_threaded_irq(mhl_ctrl->i2c_handle->irq, NULL, Loading @@ -420,9 +423,12 @@ static int mhl_sii_config(struct mhl_tx_ctrl *mhl_ctrl, bool on) if (rc) { pr_err("%s: request_threaded_irq failed, status: %d\n", __func__, rc); return -ENODEV; rc = -ENODEV; goto vreg_config_error; } else { mhl_ctrl->irq_req_done = true; /* wait for i2c interrupt line to be activated */ msleep(100); } } else if (!on && mhl_ctrl->irq_req_done) { free_irq(mhl_ctrl->i2c_handle->irq, mhl_ctrl); Loading @@ -431,6 +437,8 @@ static int mhl_sii_config(struct mhl_tx_ctrl *mhl_ctrl, bool on) mhl_ctrl->irq_req_done = false; } vreg_config_error: mutex_unlock(&mhl_ctrl->sii_config_lock); return rc; } Loading Loading @@ -472,17 +480,12 @@ static int mhl_sii_device_discovery(void *data, int id, flush_work(&mhl_ctrl->mhl_intr_work); if (!mhl_ctrl->irq_req_done) { rc = mhl_sii_config(mhl_ctrl, true); if (rc) { pr_err("%s: Failed to config vreg/gpio\n", __func__); return rc; } /* wait for i2c interrupt line to be activated */ msleep(100); } if (!mhl_ctrl->disc_enabled) { spin_lock_irqsave(&mhl_ctrl->lock, flags); mhl_ctrl->tx_powered_off = false; Loading Loading @@ -1866,6 +1869,7 @@ static int mhl_i2c_probe(struct i2c_client *client, init_completion(&mhl_ctrl->rgnd_done); mutex_init(&mhl_ctrl->sii_config_lock); mhl_ctrl->mhl_psy.name = "ext-vbus"; Loading
include/linux/mhl_8334.h +5 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,11 @@ struct mhl_tx_ctrl { int wr_burst_pending; struct completion req_write_done; spinlock_t lock; /* * Lock between mhl_sii_config and * mhl_sii_device_discovery functions */ struct mutex sii_config_lock; bool tx_powered_off; uint8_t dwnstream_hpd; bool mhl_det_discon; Loading