From patchwork Thu Aug 29 13:31:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2851388 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 31C64BF546 for ; Thu, 29 Aug 2013 13:33:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3B852030E for ; Thu, 29 Aug 2013 13:33:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BBBA2020A for ; Thu, 29 Aug 2013 13:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754580Ab3H2Nc0 (ORCPT ); Thu, 29 Aug 2013 09:32:26 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:48899 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754636Ab3H2NcX (ORCPT ); Thu, 29 Aug 2013 09:32:23 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7TDWN5V012223; Thu, 29 Aug 2013 08:32:23 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7TDWNiZ017781; Thu, 29 Aug 2013 08:32:23 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Thu, 29 Aug 2013 08:32:22 -0500 Received: from deskari.tieu.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7TDW75G015728; Thu, 29 Aug 2013 08:32:21 -0500 From: Tomi Valkeinen To: , CC: Archit Taneja , Tomi Valkeinen Subject: [PATCH 10/15] OMAPDSS: SDI: remove code related to old panel model Date: Thu, 29 Aug 2013 16:31:55 +0300 Message-ID: <1377783120-14001-11-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com> References: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that the old panel drivers have been removed, we can remove the old-model API and related code from the DSS encoder drivers. This patch removes the code from the SDI driver. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/sdi.c | 105 ++++-------------------------------------- include/video/omapdss.h | 6 --- 2 files changed, 8 insertions(+), 103 deletions(-) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 82b64e3..b327688 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -124,7 +124,7 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) dss_mgr_set_lcd_config(mgr, &sdi.mgr_config); } -int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) +static int sdi_display_enable(struct omap_dss_device *dssdev) { struct omap_dss_device *out = &sdi.output; struct omap_video_timings *t = &sdi.timings; @@ -211,9 +211,8 @@ err_get_dispc: err_reg_enable: return r; } -EXPORT_SYMBOL(omapdss_sdi_display_enable); -void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) +static void sdi_display_disable(struct omap_dss_device *dssdev) { struct omap_overlay_manager *mgr = sdi.output.manager; @@ -225,14 +224,12 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) regulator_disable(sdi.vdds_sdi_reg); } -EXPORT_SYMBOL(omapdss_sdi_display_disable); -void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, +static void sdi_set_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { sdi.timings = *timings; } -EXPORT_SYMBOL(omapdss_sdi_set_timings); static void sdi_get_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) @@ -254,11 +251,10 @@ static int sdi_check_timings(struct omap_dss_device *dssdev, return 0; } -void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) +static void sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) { sdi.datapairs = datapairs; } -EXPORT_SYMBOL(omapdss_sdi_set_datapairs); static int sdi_init_regulator(void) { @@ -278,77 +274,6 @@ static int sdi_init_regulator(void) return 0; } -static struct omap_dss_device *sdi_find_dssdev(struct platform_device *pdev) -{ - struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = omapdss_get_default_display_name(); - struct omap_dss_device *def_dssdev; - int i; - - def_dssdev = NULL; - - for (i = 0; i < pdata->num_devices; ++i) { - struct omap_dss_device *dssdev = pdata->devices[i]; - - if (dssdev->type != OMAP_DISPLAY_TYPE_SDI) - continue; - - if (def_dssdev == NULL) - def_dssdev = dssdev; - - if (def_disp_name != NULL && - strcmp(dssdev->name, def_disp_name) == 0) { - def_dssdev = dssdev; - break; - } - } - - return def_dssdev; -} - -static int sdi_probe_pdata(struct platform_device *sdidev) -{ - struct omap_dss_device *plat_dssdev; - struct omap_dss_device *dssdev; - int r; - - plat_dssdev = sdi_find_dssdev(sdidev); - - if (!plat_dssdev) - return 0; - - dssdev = dss_alloc_and_init_device(&sdidev->dev); - if (!dssdev) - return -ENOMEM; - - dss_copy_device_pdata(dssdev, plat_dssdev); - - r = sdi_init_regulator(); - if (r) { - DSSERR("device %s init failed: %d\n", dssdev->name, r); - dss_put_device(dssdev); - return r; - } - - r = omapdss_output_set_device(&sdi.output, dssdev); - if (r) { - DSSERR("failed to connect output to new device: %s\n", - dssdev->name); - dss_put_device(dssdev); - return r; - } - - r = dss_add_device(dssdev); - if (r) { - DSSERR("device %s register failed: %d\n", dssdev->name, r); - omapdss_output_unset_device(&sdi.output); - dss_put_device(dssdev); - return r; - } - - return 0; -} - static int sdi_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { @@ -396,14 +321,14 @@ static const struct omapdss_sdi_ops sdi_ops = { .connect = sdi_connect, .disconnect = sdi_disconnect, - .enable = omapdss_sdi_display_enable, - .disable = omapdss_sdi_display_disable, + .enable = sdi_display_enable, + .disable = sdi_display_disable, .check_timings = sdi_check_timings, - .set_timings = omapdss_sdi_set_timings, + .set_timings = sdi_set_timings, .get_timings = sdi_get_timings, - .set_datapairs = omapdss_sdi_set_datapairs, + .set_datapairs = sdi_set_datapairs, }; static void sdi_init_output(struct platform_device *pdev) @@ -430,29 +355,15 @@ static void __exit sdi_uninit_output(struct platform_device *pdev) static int omap_sdi_probe(struct platform_device *pdev) { - int r; - sdi.pdev = pdev; sdi_init_output(pdev); - if (pdev->dev.platform_data) { - r = sdi_probe_pdata(pdev); - if (r) - goto err_probe; - } - return 0; - -err_probe: - sdi_uninit_output(pdev); - return r; } static int __exit omap_sdi_remove(struct platform_device *pdev) { - dss_unregister_child_devices(&pdev->dev); - sdi_uninit_output(pdev); return 0; diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 6d7297f..3395804 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -987,12 +987,6 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) -int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); -void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); -void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, - struct omap_video_timings *timings); -void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs); - int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),