From patchwork Wed Nov 17 06:44:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 331191 X-Patchwork-Delegate: lethal@linux-sh.org 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 oAH6gXNt020784 for ; Wed, 17 Nov 2010 06:42:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934551Ab0KQGmD (ORCPT ); Wed, 17 Nov 2010 01:42:03 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:39401 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934513Ab0KQGmB (ORCPT ); Wed, 17 Nov 2010 01:42:01 -0500 Received: by mail-gy0-f174.google.com with SMTP id 4so926463gyh.19 for ; Tue, 16 Nov 2010 22:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=jyYgPE0rLdRA7Q92P9bz3Yk/JaOoFkpSi8qTurd/HaU=; b=hM7kyfa/tU+R9mZEjAdbW9taHk4mxKSqxK0qS4XQaAQ2ERUef2cMWwvV5zYmvgcDD1 W4e9a35bxjtvIGy4PLsKwWlcx7EGAF2toWtVpUZlDc9SbNQRszmyuoq4F5sYPYsbWLP2 U1V7EULMSfRTsYLvA0Sf2VJzQY0QqTA78XQdM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=i10dblxNiJGBfWYACuCp23+IULqJvl2x8Zc9jE4vMbc26qvDDGQ1Xj7fW3+EqM6pPy 8gqBEr4AGQJ23DdiXCQLwKajjcPkvE6pw8e6GKuViUUdxOSAKUqvsYX7HeRloMjws/63 G6uhmdYkiahXsi8U+Koqj3UY2xZQ5FMqxKkKo= Received: by 10.151.98.18 with SMTP id a18mr39762ybm.203.1289976120609; Tue, 16 Nov 2010 22:42:00 -0800 (PST) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id t9sm4468464ybe.9.2010.11.16.22.41.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Nov 2010 22:41:59 -0800 (PST) From: Magnus Damm To: linux-kernel@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org, g.liakhovetski@gmx.de, linux-sh@vger.kernel.org Date: Wed, 17 Nov 2010 15:44:54 +0900 Message-Id: <20101117064454.18139.40718.sendpatchset@t400s> In-Reply-To: <20101117064405.18139.57035.sendpatchset@t400s> References: <20101117064405.18139.57035.sendpatchset@t400s> Subject: [PATCH 05/05] fbdev: sh_mipi_dsi: Allow LCDC board callbacks Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 17 Nov 2010 06:42:34 +0000 (UTC) --- 0008/drivers/video/sh_mipi_dsi.c +++ work/drivers/video/sh_mipi_dsi.c 2010-11-16 17:41:32.000000000 +0900 @@ -50,6 +50,9 @@ struct sh_mipi { void __iomem *linkbase; struct clk *dsit_clk; struct clk *dsip_clk; + void *next_board_data; + void (*next_display_on)(void *board_data, struct fb_info *info); + void (*next_display_off)(void *board_data); }; static struct sh_mipi *mipi_dsi[MAX_SH_MIPI_DSI]; @@ -122,12 +125,18 @@ static void mipi_display_on(void *arg, s struct sh_mipi *mipi = arg; sh_mipi_dsi_enable(mipi, true); + + if (mipi->next_display_on) + mipi->next_display_on(mipi->next_board_data, info); } static void mipi_display_off(void *arg) { struct sh_mipi *mipi = arg; + if (mipi->next_display_off) + mipi->next_display_off(mipi->next_board_data); + sh_mipi_dsi_enable(mipi, false); } @@ -431,6 +440,11 @@ static int __init sh_mipi_probe(struct p mutex_unlock(&array_lock); platform_set_drvdata(pdev, mipi); + /* Save original LCDC callbacks */ + mipi->next_board_data = pdata->lcd_chan->board_cfg.board_data; + mipi->next_display_on = pdata->lcd_chan->board_cfg.display_on; + mipi->next_display_off = pdata->lcd_chan->board_cfg.display_off; + /* Set up LCDC callbacks */ pdata->lcd_chan->board_cfg.board_data = mipi; pdata->lcd_chan->board_cfg.display_on = mipi_display_on;