mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
misc: cec: add worker handler for resume
HDMI CEC needs 1 sec delay for reset hardware in resume Adding work handler for CEC init Bug 1283088 Change-Id: I4498584ec93c1a5eefddfad9966cb5a1e7776e6e Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/228332 (cherry picked from commit 596245cee4b2c239843c2f920d83c21721af2ffb) Signed-off-by: Xia Yang <xiay@nvidia.com> Reviewed-on: http://git-master/r/346038 Reviewed-on: http://git-master/r/1164138 (cherry picked from commit f62afdb0cb72a087442db6ed450b52925d20f9b6)
This commit is contained in:
committed by
Prafull Suryawanshi
parent
b268d2ef29
commit
a8422afe1a
@@ -234,7 +234,14 @@ static void tegra_cec_init(struct tegra_cec *cec)
|
||||
cec->cec_base + TEGRA_CEC_INT_MASK);
|
||||
}
|
||||
|
||||
static int __devinit tegra_cec_probe(struct platform_device *pdev)
|
||||
static void tegra_cec_init_worker(struct work_struct *work)
|
||||
{
|
||||
struct tegra_cec *cec = container_of(work, struct tegra_cec, work);
|
||||
|
||||
tegra_cec_init(cec);
|
||||
}
|
||||
|
||||
static int tegra_cec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct tegra_cec *cec;
|
||||
struct resource *res;
|
||||
@@ -298,7 +305,8 @@ static int __devinit tegra_cec_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, cec);
|
||||
/* clear out the hardware. */
|
||||
|
||||
tegra_cec_init(cec);
|
||||
INIT_WORK(&cec->work, tegra_cec_init_worker);
|
||||
schedule_work(&cec->work);
|
||||
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
|
||||
@@ -340,6 +348,7 @@ static int tegra_cec_remove(struct platform_device *pdev)
|
||||
clk_put(cec->clk);
|
||||
|
||||
misc_deregister(&cec->misc_dev);
|
||||
cancel_work_sync(&cec->work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -356,10 +365,11 @@ static int tegra_cec_suspend(struct platform_device *pdev, pm_message_t state)
|
||||
|
||||
static int tegra_cec_resume(struct platform_device *pdev)
|
||||
{
|
||||
|
||||
struct tegra_cec *cec = platform_get_drvdata(pdev);
|
||||
|
||||
clk_enable(cec->clk);
|
||||
tegra_cec_init(cec);
|
||||
schedule_work(&cec->work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,7 @@ struct tegra_cec {
|
||||
unsigned int rx_wake;
|
||||
unsigned int tx_wake;
|
||||
unsigned short rx_buffer;
|
||||
struct work_struct work;
|
||||
};
|
||||
static int tegra_cec_remove(struct platform_device *pdev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user