From patchwork Wed Feb 16 13:54:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MAYURESH JANORKAR X-Patchwork-Id: 567381 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1GDPkI3010524 for ; Wed, 16 Feb 2011 13:25:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752844Ab1BPNZp (ORCPT ); Wed, 16 Feb 2011 08:25:45 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:53594 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067Ab1BPNZp (ORCPT ); Wed, 16 Feb 2011 08:25:45 -0500 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1GDPiEe004128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Feb 2011 07:25:44 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id p1GDPf9N011295; Wed, 16 Feb 2011 07:25:41 -0600 (CST) Received: from localhost (ldc.apr.dhcp.ti.com [172.24.137.131]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p1GDPef21524; Wed, 16 Feb 2011 07:25:40 -0600 (CST) From: Mayuresh Janorkar To: tomi.valkeinen@ti.com Cc: linux-omap@vger.kernel.org, Mayuresh Janorkar Subject: [RESEND][PATCH v2] OMAP: DSS: Adding two APIs for panel-taal: check_timings and set_timings Date: Wed, 16 Feb 2011 19:24:42 +0530 Message-Id: <1297864482-16903-1-git-send-email-mayur@ti.com> X-Mailer: git-send-email 1.7.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 16 Feb 2011 13:25:47 +0000 (UTC) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 61026f9..aded08c 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -476,6 +476,31 @@ static void taal_get_timings(struct omap_dss_device *dssdev, *timings = dssdev->panel.timings; } +static void taal_set_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + /* + * TAAL panel's timing struct has only x_res and y_res + * other timing parameters are not set + */ + dssdev->panel.timings.x_res = timings->x_res; + dssdev->panel.timings.y_res = timings->y_res; +} + +static int taal_check_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + /* + * TAAL panel's timing struct has only x_res and y_res + * other timing parameters are not set + */ + if (!timings || timings->x_res != dssdev->panel.timings.x_res || + timings->y_res != dssdev->panel.timings.y_res) + return -EINVAL; + + return 0; +} + static void taal_get_resolution(struct omap_dss_device *dssdev, u16 *xres, u16 *yres) { @@ -1563,6 +1588,8 @@ static struct omap_dss_driver taal_driver = { .memory_read = taal_memory_read, .get_timings = taal_get_timings, + .set_timings = taal_set_timings, + .check_timings = taal_check_timings, .driver = { .name = "taal",