From patchwork Wed Feb 16 03:49:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Courbot X-Patchwork-Id: 565591 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 p1G3nTp7019023 for ; Wed, 16 Feb 2011 03:49:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756455Ab1BPDtd (ORCPT ); Tue, 15 Feb 2011 22:49:33 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:44973 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756341Ab1BPDtc (ORCPT ); Tue, 15 Feb 2011 22:49:32 -0500 Received: by gyb11 with SMTP id 11so418284gyb.19 for ; Tue, 15 Feb 2011 19:49:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=BpH6v3e1FCSRKXGnA/N11h9hlw5hcYiIvcE6F0kDQFU=; b=Xt2idyuHo97OVkVnTNL1U0LgwyjlCf+XkCSaDtRuJ+MH3TbXtwP5li0YJnH3YyCBsW eQitIq64IUoOWDEOi2I0TNJM7r0AZdOpDWqv/PlINcEjggsJWysRnem4eE++wIRxdxuH d6yHVkm15Q3NpzXJGBSMB+NH4uj7I96x/Qhf8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=FUUVeDYBH2zKLtcp7qSXyEpdlWvTYuvloBcVoTxze8Sc16WUWJFiOBz52paEDJ14BV MyPtqvgPNv7bvp+l6lceCF7JsePXEBXNu6dOe6ZvTeZfwGZIVcC7T90e5gCSuoOFJG4t SUdO2aGUguk2cjPUNaov7euxAceoyle+FLU2Q= Received: by 10.150.185.8 with SMTP id i8mr108762ybf.197.1297828172002; Tue, 15 Feb 2011 19:49:32 -0800 (PST) Received: from localhost.localdomain (e0109-114-22-43-241.uqwimax.jp [114.22.43.241]) by mx.google.com with ESMTPS id v8sm515233ybe.1.2011.02.15.19.49.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Feb 2011 19:49:31 -0800 (PST) From: Alexandre Courbot To: Magnus Damm Cc: linux-sh@vger.kernel.org, Alexandre Courbot Subject: [PATCH v2 2/3] sh: mach-ecovec24: support for main lcd backlight Date: Wed, 16 Feb 2011 12:49:02 +0900 Message-Id: <1297828143-11798-3-git-send-email-gnurou@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1297828143-11798-1-git-send-email-gnurou@gmail.com> References: <1297828143-11798-1-git-send-email-gnurou@gmail.com> In-Reply-To: References: 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.6 (demeter1.kernel.org [140.211.167.41]); Wed, 16 Feb 2011 03:49:33 +0000 (UTC) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 701667a..a2c0622 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -261,6 +261,18 @@ const static struct fb_videomode ecovec_dvi_modes[] = { }, }; +static int ecovec24_set_brightness(void *board_data, int brightness) +{ + gpio_set_value(GPIO_PTR1, brightness); + + return 0; +} + +static int ecovec24_get_brightness(void *board_data) +{ + return gpio_get_value(GPIO_PTR1); +} + static struct sh_mobile_lcdc_info lcdc_info = { .ch[0] = { .interface_type = RGB18, @@ -271,6 +283,12 @@ static struct sh_mobile_lcdc_info lcdc_info = { .height = 91, }, .board_cfg = { + .set_brightness = ecovec24_set_brightness, + .get_brightness = ecovec24_get_brightness, + }, + .bl_info = { + .name = "sh_mobile_lcdc_bl", + .max_brightness = 1, }, } };