From patchwork Tue Oct 28 00:02:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5167561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7A15F9F349 for ; Tue, 28 Oct 2014 00:08:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E1D32020E for ; Tue, 28 Oct 2014 00:08:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5CA8201DD for ; Tue, 28 Oct 2014 00:08:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XiuIR-0007OX-By; Tue, 28 Oct 2014 00:05:59 +0000 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XiuFk-0004BP-18 for linux-arm-kernel@lists.infradead.org; Tue, 28 Oct 2014 00:03:13 +0000 Received: by mail-wg0-f47.google.com with SMTP id a1so3156660wgh.18 for ; Mon, 27 Oct 2014 17:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B88IhdDXsdejrvZXX2DTltcKlsgYmPwXlOKYnJRFXUw=; b=LR0mIARM1XX2hKCKxOc3V4u4+9E8hYq9iMI/wlNyPQdt7vqiiEBSViSIYvZRyb/zbn Ttl0tVciJzBYN598RkG9TRFasAAK72FLF1lqdtdTrM9ccdtAJbsP0PwYqjXhO5O/NT4y Nxr8OoPYwuI8SmD94gTk3w2ZNkoYRbmY97VitotCgq0niHL2DyrNnUSsSjpf9vSDxqU4 6Y0KSs73Gh9ve5l4hYkXCltvdarZPrBWXGQhEUMY/RRbco7WJRcgMoI3DsXljSaCiHFe PW7OClNwmwMHIlpDoi8wnWMXsAjfGsVWGKn0pF7g/F8/EXQ4yml5LtL8pGZyfmruSTJ9 FAwQ== X-Received: by 10.180.39.145 with SMTP id p17mr24121791wik.32.1414454569088; Mon, 27 Oct 2014 17:02:49 -0700 (PDT) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id fq1sm13495340wib.12.2014.10.27.17.02.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Oct 2014 17:02:48 -0700 (PDT) From: Dmitry Eremin-Solenikov To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, linux-spi@vger.kernel.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 10/15] ARM: pxa: poodle: use new LoCoMo driver Date: Tue, 28 Oct 2014 03:02:03 +0300 Message-Id: <1414454528-24240-11-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1414454528-24240-1-git-send-email-dbaryshkov@gmail.com> References: <1414454528-24240-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141027_170312_258220_5802C878 X-CRM114-Status: GOOD ( 16.21 ) X-Spam-Score: -0.8 (/) Cc: Alexandre Courbot , Bryan Wu , Russell King , Samuel Ortiz , Lee Jones , Linus Walleij , Dmitry Torokhov , Liam Girdwood , Haojian Zhuang , Mark Brown , Andrea Adami , Jingoo Han , Richard Purdie , Robert Jarzmik , Daniel Mack X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Convert poodle to use new mfd-based LoCoMo driver. Signed-off-by: Dmitry Eremin-Solenikov --- arch/arm/mach-pxa/Kconfig | 1 - arch/arm/mach-pxa/include/mach/poodle.h | 14 +++++++++----- arch/arm/mach-pxa/poodle.c | 19 +++++++++++++++---- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index e6690a4..1da3e8f 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -473,7 +473,6 @@ config MACH_POODLE bool "Enable Sharp SL-5600 (Poodle) Support" depends on PXA_SHARPSL select PXA25x - select SHARP_LOCOMO config MACH_CORGI bool "Enable Sharp SL-C700 (Corgi) Support" diff --git a/arch/arm/mach-pxa/include/mach/poodle.h b/arch/arm/mach-pxa/include/mach/poodle.h index b56b193..e8eb51e 100644 --- a/arch/arm/mach-pxa/include/mach/poodle.h +++ b/arch/arm/mach-pxa/include/mach/poodle.h @@ -81,11 +81,15 @@ #define POODLE_GPIO_L_LCLK (POODLE_SCOOP_GPIO_BASE + 10) #define POODLE_GPIO_HS_OUT (POODLE_SCOOP_GPIO_BASE + 11) -#define POODLE_LOCOMO_GPIO_AMP_ON LOCOMO_GPIO(8) -#define POODLE_LOCOMO_GPIO_MUTE_L LOCOMO_GPIO(10) -#define POODLE_LOCOMO_GPIO_MUTE_R LOCOMO_GPIO(11) -#define POODLE_LOCOMO_GPIO_232VCC_ON LOCOMO_GPIO(12) -#define POODLE_LOCOMO_GPIO_JK_B LOCOMO_GPIO(13) +#define POODLE_LOCOMO_GPIO_BASE (PXA_NR_BUILTIN_GPIO + 12) +#define POODLE_GPIO_LCD_VSHA_ON (POODLE_LOCOMO_GPIO_BASE + 4) +#define POODLE_GPIO_LCD_VSHD_ON (POODLE_LOCOMO_GPIO_BASE + 5) +#define POODLE_GPIO_LCD_VEE_ON (POODLE_LOCOMO_GPIO_BASE + 6) +#define POODLE_GPIO_LCD_MOD (POODLE_LOCOMO_GPIO_BASE + 7) +#define POODLE_GPIO_AMP_ON (POODLE_LOCOMO_GPIO_BASE + 8) +#define POODLE_GPIO_FL_VR (POODLE_LOCOMO_GPIO_BASE + 9) +#define POODLE_GPIO_MUTE_L (POODLE_LOCOMO_GPIO_BASE + 10) +#define POODLE_GPIO_MUTE_R (POODLE_LOCOMO_GPIO_BASE + 11) #define POODLE_NR_IRQS (IRQ_BOARD_START + 4) /* 4 for LoCoMo */ diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 1319916..3041d83 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -48,7 +49,6 @@ #include #include -#include #include #include "generic.h" @@ -178,7 +178,17 @@ static struct resource locomo_resources[] = { }; static struct locomo_platform_data locomo_info = { - .irq_base = IRQ_BOARD_START, + .gpio_data = { + .gpio_base = POODLE_LOCOMO_GPIO_BASE, + }, + .bl_data = { + .comadj = 118, + .gpio_lcd_vsha_on = POODLE_GPIO_LCD_VSHA_ON, + .gpio_lcd_vshd_on = POODLE_GPIO_LCD_VSHD_ON, + .gpio_lcd_vee_on = POODLE_GPIO_LCD_VEE_ON, + .gpio_lcd_mod = POODLE_GPIO_LCD_MOD, + .gpio_fl_vr = POODLE_GPIO_FL_VR, + }, }; struct platform_device poodle_locomo_device = { @@ -191,8 +201,6 @@ struct platform_device poodle_locomo_device = { }, }; -EXPORT_SYMBOL(poodle_locomo_device); - #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) static struct pxa2xx_spi_master poodle_spi_info = { .num_chipselect = 1, @@ -444,6 +452,9 @@ static void __init poodle_init(void) platform_scoop_config = &poodle_pcmcia_config; + if (sharpsl_param.comadj != -1) + locomo_info.bl_data.comadj = sharpsl_param.comadj; + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret) pr_warning("poodle: Unable to register LoCoMo device\n");