From patchwork Tue Jan 19 14:29:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 73890 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0JEZgW6021334 for ; Tue, 19 Jan 2010 14:35:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751548Ab0ASOfl (ORCPT ); Tue, 19 Jan 2010 09:35:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751373Ab0ASOfl (ORCPT ); Tue, 19 Jan 2010 09:35:41 -0500 Received: from fg-out-1718.google.com ([72.14.220.159]:51467 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750703Ab0ASOfk (ORCPT ); Tue, 19 Jan 2010 09:35:40 -0500 Received: by fg-out-1718.google.com with SMTP id 16so437909fgg.1 for ; Tue, 19 Jan 2010 06:35:38 -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 :subject; bh=DvSjnM8xXXy6icI8M3j83ESKCv7Vm5oiLKMxYshb+ds=; b=rf5vtMQkrSh8ufK5SrE2ASpSMZCVp87vS00isYdy0qtYBIRENRkFC+f5fpKqT+whVp 1K+DNq/poOWHpU7gMgTAIC1EniTErtO+BDDBabshdGscw/l0c23WlQEis3TJrL5+54PN Z6G7pVZAKVM0+K8YIRKfZs6+kSY+IeNHR9kgM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=o+p2NqKccqLq00PdqvdvGXwTcnourUNS/fBSZBwwfMQsAUMpLuU82f5J6tDr5EUCEm MyED3Bv9ylaYbMdvgedvBu1lPKIv8Qq1/ly4fV7nz/bmWOkWXcqWCXxPTDFLlmBiex+E Zpt4vKyzgX6AyH0n1t1oVMdyeuzcyEIZPOiFg= Received: by 10.87.46.5 with SMTP id y5mr10049965fgj.2.1263911737868; Tue, 19 Jan 2010 06:35:37 -0800 (PST) Received: from rxone.opensource.se (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 15sm3016801fxm.2.2010.01.19.06.35.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 19 Jan 2010 06:35:36 -0800 (PST) From: Magnus Damm To: linux-input@vger.kernel.org Cc: lethal@linux-sh.org, Magnus Damm , dmitry.torokhov@gmail.com, linux-sh@vger.kernel.org Date: Tue, 19 Jan 2010 23:29:14 +0900 Message-Id: <20100119142914.18659.97781.sendpatchset@rxone.opensource.se> Subject: [PATCH] input: update sh_keysc driver with mode 4 and mode 5 support Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org --- 0001/drivers/input/keyboard/sh_keysc.c +++ work/drivers/input/keyboard/sh_keysc.c 2010-01-19 16:29:17.000000000 +0900 @@ -36,6 +36,8 @@ static const struct { [SH_KEYSC_MODE_1] = { 0, 6, 5 }, [SH_KEYSC_MODE_2] = { 1, 5, 6 }, [SH_KEYSC_MODE_3] = { 2, 4, 7 }, + [SH_KEYSC_MODE_4] = { 3, 6, 6 }, + [SH_KEYSC_MODE_5] = { 4, 6, 7 }, }; struct sh_keysc_priv { @@ -122,8 +124,6 @@ static irqreturn_t sh_keysc_isr(int irq, return IRQ_HANDLED; } -#define res_size(res) ((res)->end - (res)->start + 1) - static int __devinit sh_keysc_probe(struct platform_device *pdev) { struct sh_keysc_priv *priv; @@ -164,7 +164,7 @@ static int __devinit sh_keysc_probe(stru memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata)); pdata = &priv->pdata; - priv->iomem_base = ioremap_nocache(res->start, res_size(res)); + priv->iomem_base = ioremap_nocache(res->start, resource_size(res)); if (priv->iomem_base == NULL) { dev_err(&pdev->dev, "failed to remap I/O memory\n"); error = -ENXIO; --- 0001/include/linux/input/sh_keysc.h +++ work/include/linux/input/sh_keysc.h 2010-01-19 16:29:17.000000000 +0900 @@ -1,10 +1,11 @@ #ifndef __SH_KEYSC_H__ #define __SH_KEYSC_H__ -#define SH_KEYSC_MAXKEYS 30 +#define SH_KEYSC_MAXKEYS 42 struct sh_keysc_info { - enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode; + enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3, + SH_KEYSC_MODE_4, SH_KEYSC_MODE_5 } mode; int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */ int delay; int kycr2_delay;