summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-08-09 21:27:01 +0200
committerArnd Bergmann <arnd@arndb.de>2022-04-21 15:00:52 +0200
commit81ad0f5bc476505781b1398be52a81eda3ee9798 (patch)
tree5e54a3453a3e6953bbfbe54462c82f5824b45dcb /drivers/video/fbdev
parent0768fb6709343679e55f7135e2ed2c432e4500d8 (diff)
fbdev: omap: pass irqs as resource
To avoid relying on the mach/irqs.h header, stop using OMAP_LCDC_IRQ and INT_1610_SoSSI_MATCH directly in the driver code, but instead pass these as resources. Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/omap/lcdc.c6
-rw-r--r--drivers/video/fbdev/omap/omapfb.h2
-rw-r--r--drivers/video/fbdev/omap/omapfb_main.c16
-rw-r--r--drivers/video/fbdev/omap/sossi.c2
4 files changed, 21 insertions, 5 deletions
diff --git a/drivers/video/fbdev/omap/lcdc.c b/drivers/video/fbdev/omap/lcdc.c
index d9a23f6cf7fc..d9731d12bd72 100644
--- a/drivers/video/fbdev/omap/lcdc.c
+++ b/drivers/video/fbdev/omap/lcdc.c
@@ -713,7 +713,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
}
clk_enable(lcdc.lcd_ck);
- r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
+ r = request_irq(fbdev->int_irq, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
if (r) {
dev_err(fbdev->dev, "unable to get IRQ\n");
goto fail2;
@@ -744,7 +744,7 @@ fail5:
fail4:
omap_free_lcd_dma();
fail3:
- free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
+ free_irq(fbdev->int_irq, lcdc.fbdev);
fail2:
clk_disable(lcdc.lcd_ck);
fail1:
@@ -759,7 +759,7 @@ static void omap_lcdc_cleanup(void)
free_palette_ram();
free_fbmem();
omap_free_lcd_dma();
- free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
+ free_irq(lcdc.fbdev->int_irq, lcdc.fbdev);
clk_disable(lcdc.lcd_ck);
clk_put(lcdc.lcd_ck);
}
diff --git a/drivers/video/fbdev/omap/omapfb.h b/drivers/video/fbdev/omap/omapfb.h
index d930152c289c..313a051fe7a4 100644
--- a/drivers/video/fbdev/omap/omapfb.h
+++ b/drivers/video/fbdev/omap/omapfb.h
@@ -204,6 +204,8 @@ struct omapfb_device {
struct lcd_panel *panel; /* LCD panel */
const struct lcd_ctrl *ctrl; /* LCD controller */
const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
+ int ext_irq;
+ int int_irq;
struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
interface */
struct device *dev;
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 083388a4ceeb..b8fd509f11e4 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1624,7 +1624,7 @@ static int omapfb_do_probe(struct platform_device *pdev,
init_state = 0;
- if (pdev->num_resources != 0) {
+ if (pdev->num_resources != 2) {
dev_err(&pdev->dev, "probed for an unknown device\n");
r = -ENODEV;
goto cleanup;
@@ -1643,6 +1643,20 @@ static int omapfb_do_probe(struct platform_device *pdev,
r = -ENOMEM;
goto cleanup;
}
+ fbdev->int_irq = platform_get_irq(pdev, 0);
+ if (!fbdev->int_irq) {
+ dev_err(&pdev->dev, "unable to get irq\n");
+ r = ENXIO;
+ goto cleanup;
+ }
+
+ fbdev->ext_irq = platform_get_irq(pdev, 1);
+ if (!fbdev->ext_irq) {
+ dev_err(&pdev->dev, "unable to get irq\n");
+ r = ENXIO;
+ goto cleanup;
+ }
+
init_state++;
fbdev->dev = &pdev->dev;
diff --git a/drivers/video/fbdev/omap/sossi.c b/drivers/video/fbdev/omap/sossi.c
index d3c755b293ea..ade9d452254c 100644
--- a/drivers/video/fbdev/omap/sossi.c
+++ b/drivers/video/fbdev/omap/sossi.c
@@ -639,7 +639,7 @@ static int sossi_init(struct omapfb_device *fbdev)
l &= ~(1 << 31); /* REORDERING */
sossi_write_reg(SOSSI_INIT1_REG, l);
- if ((r = request_irq(INT_1610_SoSSI_MATCH, sossi_match_irq,
+ if ((r = request_irq(fbdev->ext_irq, sossi_match_irq,
IRQ_TYPE_EDGE_FALLING,
"sossi_match", sossi.fbdev->dev)) < 0) {
dev_err(sossi.fbdev->dev, "can't get SoSSI match IRQ\n");