mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
media: rockchip: vicap distinguish share interrupts
Change-Id: Idaae50c8a1e6a9ea897b0063c4e181866b32e490 Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
This commit is contained in:
@@ -1767,8 +1767,15 @@ static int rkcif_plat_hw_probe(struct platform_device *pdev)
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
if (data->chip_id == CHIP_RV1106_CIF ||
|
||||
data->chip_id == CHIP_RV1103B_CIF) {
|
||||
if (data->chip_id == CHIP_PX30_CIF ||
|
||||
data->chip_id == CHIP_RK1808_CIF ||
|
||||
data->chip_id == CHIP_RV1126_CIF ||
|
||||
data->chip_id == CHIP_RV1126_CIF_LITE ||
|
||||
data->chip_id == CHIP_RK3568_CIF)
|
||||
cif_hw->is_irq_share = true;
|
||||
else
|
||||
cif_hw->is_irq_share = false;
|
||||
if (!cif_hw->is_irq_share) {
|
||||
irq_set_status_flags(irq, IRQ_NOAUTOEN);
|
||||
ret = devm_request_irq(dev, irq, rkcif_irq_handler,
|
||||
0,
|
||||
@@ -1970,8 +1977,7 @@ static int __maybe_unused rkcif_runtime_suspend(struct device *dev)
|
||||
return 0;
|
||||
rkcif_disable_sys_clk(cif_hw);
|
||||
|
||||
if (cif_hw->chip_id == CHIP_RV1106_CIF ||
|
||||
cif_hw->chip_id == CHIP_RV1103B_CIF)
|
||||
if (!cif_hw->is_irq_share)
|
||||
disable_irq(cif_hw->irq);
|
||||
|
||||
return pinctrl_pm_select_sleep_state(dev);
|
||||
@@ -1990,8 +1996,7 @@ static int __maybe_unused rkcif_runtime_resume(struct device *dev)
|
||||
rkcif_enable_sys_clk(cif_hw);
|
||||
rkcif_hw_soft_reset(cif_hw, true);
|
||||
|
||||
if (cif_hw->chip_id == CHIP_RV1106_CIF ||
|
||||
cif_hw->chip_id == CHIP_RV1103B_CIF)
|
||||
if (!cif_hw->is_irq_share)
|
||||
enable_irq(cif_hw->irq);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -167,6 +167,7 @@ struct rkcif_hw {
|
||||
u64 irq_time;
|
||||
bool is_rk3588s2;
|
||||
bool is_in_reset;
|
||||
bool is_irq_share;
|
||||
};
|
||||
|
||||
void rkcif_hw_soft_reset(struct rkcif_hw *cif_hw, bool is_rst_iommu);
|
||||
|
||||
Reference in New Issue
Block a user