Received: by 10.213.65.68 with SMTP id h4csp219580imn; Fri, 16 Mar 2018 00:25:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELuhIhRsgcJFJS06NYU9bzIqkfmMQwK74UmBXiGY3ctEtPV8q9RAjBamPfRNRhcqJgFlFiCI X-Received: by 10.99.55.70 with SMTP id g6mr673068pgn.284.1521185136624; Fri, 16 Mar 2018 00:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521185136; cv=none; d=google.com; s=arc-20160816; b=K+482fkks+krsf9S/aCLMNoYJPaRnUSpDLBO3XgwWAD4wTs8JfVJb0XnsW7zEKorxY bGdAym0z8OV2rmiHm1LFA5X+wiQZP76FpVfPYtdmDDG5iK498L6SIMAnk81VBU/Q5jXR MuF/AGo1ekihvWExlrYY6Kw4byXIOoboPMr/qolavYSZ0QgGwJpyy3baJ9GJeEKgm8We IiK91vqvd4eNBU2F02m5hRaBuJ/UabCGxASR0Zk0hwu+LhTk3kvHbjctsukRZjwxJTVa O89J9XzO8RYn8BHwgj8iIbGVVcjau/Tw1hm5SkjRhjdHLqM5xKnEarcYG7A6iRl+7bvc BOPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=VUGmYv1wYVRYiWyDnm28g1KHYg6SSD7aDBsNjEs+QCI=; b=aMh6hmho6hBAkx7mttSQaSs0K44hYEVJWlRtE1Fj/TcGNz+TsbCIWrvOmSKUn4ZII/ 9EXPd4PWrnolx/tjqFSUw1dcv/M3xSc5Oh2vxgFFauDvpYCP/Z/lVu+7uJGGpRWv0cn2 jre79ADAprHYqN8tTjN9Bv5ncIHLmiPXUBWZc+jCPVTdL0y9jkVmwKgP09glIrIba2WA +41yBDFQzVn3teXgekAIgE84jyyJe6T2WQdFNLSU/ChSgvJ0HMaXF2DNRv3oihbAphnc 1gAqYwXVhC6hAypG4kThsce/C2NVmXs/1Ff3KqbUZwKvzvMeyPnUIMTu6hK1+3ZI/DXg 5EpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-com header.b=Dvykoz6g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si4612829pgp.150.2018.03.16.00.25.22; Fri, 16 Mar 2018 00:25:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-com header.b=Dvykoz6g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368AbeCPHXJ (ORCPT + 99 others); Fri, 16 Mar 2018 03:23:09 -0400 Received: from mail-dm3nam03on0061.outbound.protection.outlook.com ([104.47.41.61]:40064 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753113AbeCPHRc (ORCPT ); Fri, 16 Mar 2018 03:17:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.onmicrosoft.com; s=selector1-analog-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VUGmYv1wYVRYiWyDnm28g1KHYg6SSD7aDBsNjEs+QCI=; b=Dvykoz6gpqmtx5Sih9euotRSmUcLbnrjRSg+yFjC+m71BLZQw8E9JmlJBeBBFj65Pf26ix9WzdM9q+C0bZ62Jt73g+B4YGqH1PRyH8Bb5KBVNlSs9DEdMt602/UIo+VX0zx1y0gFPWvx8sAcIZMibBhw2aKS+LAWNn43X/SukKs= Received: from BN3PR03CA0073.namprd03.prod.outlook.com (10.167.1.161) by BN6PR03MB2609.namprd03.prod.outlook.com (10.173.143.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.14; Fri, 16 Mar 2018 07:17:30 +0000 Received: from BN1AFFO11FD023.protection.gbl (2a01:111:f400:7c10::163) by BN3PR03CA0073.outlook.office365.com (2a01:111:e400:7a4d::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.567.14 via Frontend Transport; Fri, 16 Mar 2018 07:17:30 +0000 Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=analog.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=analog.com; Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.55 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.55; helo=nwd2mta1.analog.com; Received: from nwd2mta1.analog.com (137.71.25.55) by BN1AFFO11FD023.mail.protection.outlook.com (10.58.52.83) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.527.18 via Frontend Transport; Fri, 16 Mar 2018 07:17:30 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id w2G7HTrm031913 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Fri, 16 Mar 2018 00:17:29 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS7.ad.analog.com (10.64.69.107) with Microsoft SMTP Server id 14.3.301.0; Fri, 16 Mar 2018 03:17:29 -0400 Received: from aaron-OptiPlex-9010.ad.analog.com ([10.99.24.134]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id w2G7HHtu022199; Fri, 16 Mar 2018 03:17:28 -0400 From: Aaron Wu To: CC: Subject: [Blackfin removal] [PATCH 09/28] input: Remove Blackfin input support Date: Fri, 16 Mar 2018 15:08:07 +0800 Message-ID: <1521184106-24475-7-git-send-email-aaron.wu@analog.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521184106-24475-1-git-send-email-aaron.wu@analog.com> References: <1521184106-24475-1-git-send-email-aaron.wu@analog.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.55;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(39380400002)(346002)(39860400002)(396003)(2980300002)(438002)(50944005)(189003)(199004)(6666003)(72206003)(106002)(50226002)(8676002)(47776003)(107886003)(7696005)(8936002)(336012)(51416003)(2950100002)(36756003)(6916009)(6306002)(478600001)(426003)(76176011)(4326008)(966005)(59450400001)(5660300001)(77096007)(2906002)(316002)(26005)(186003)(48376002)(356003)(106466001)(7636002)(2351001)(305945005)(16586007)(86362001)(50466002)(575784001)(246002)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR03MB2609;H:nwd2mta1.analog.com;FPR:;SPF:Pass;PTR:nwd2mail10.analog.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD023;1:qhSlmMtnBmFVsuaRcw1iG87qY8GCb4bBAJSZJh+c+0B0bDUO6XuKq/0/0mr770BlH71HeBZba3f6JB85nv06FoU4g7XuH2CtCXL6Ij1krByqk+cB7xUUBKdwnISAGW4b X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f222ff4b-d970-4313-646d-08d58b0dfad6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060);SRVR:BN6PR03MB2609; X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2609;3:6oGqdDhlayQ3MdhBAUK+Ex+kF6AoMl4Ou6O7wN1i6CUWFkZtSm4Kbu8IlQsnLvmGl6vGvzQUKjVnsX/Wz51RiDLE0uZq4tYt6L0IBRZmd/U5jubJbFwNr3F7yFbOCJ16+CW1a1CuB4CuLUyeURl/NIut85zF8L8jDz0K+msm/ohAlYTuwJGwx7DRQ2BXmTVIKJbGV8yw+eNbHPKAOWz0F6vayPhKyoHO1zE2/EdtXWsrIMjq7yWfIhqK+nwFK19higV9jtxM5H+GiMGSTbbLfEGGmWbNzxJkIWKA2PEIQjzG+Z6i2dJ3QqQCSATdAHqVvAjvehk/uTCgjkM1RF3O6w==;25:JGal6yZOkERDm6zreTomJ8AeFa8pcgCCnJ3Ky+rxq7fz6PTr8ScHZE6zVrIqmz7K77wJ+fbv6AUfHOFH8ZHVQ+LgKiJz8yDsM8rOFqtazhtt0O6+f6jqGzjY3z6hxNrET5OOVbLdQL2DFSmRswa5OblXC/SfLBSjHSz2ESTyNhkfanAXwUuLzM4jOd1fvqqYnfxPykUSkqGg4hT76/QYxKuc4cM0tu6ESM2jVuQYoRalkziDoj885tKdyWG38/5CPRLZ5vUw7dx28pil2RJoTSWHO0mvgsgYHdtz1d6NeW1+eVJGsHHj2K0USdki8saa5Yx6dCpnO8bKuKHJtk5WDw==;31:1SWu9RBb4VbN4ghDmyxC089qLcJwA3ZWdVbrgznBXnOC9QTABbNVW1ps4YB4HtStF2Y9fbt/hMY99caK5IU//NRZfZoSL8ZV08wAm/Jcivmzx6IwQvk24gd0CJrY9U/q6Bs3zS59qBikfdOoWxxU34sC6tBjdP0OstcJ7zm2QGaUeeeXPxyYog2WmyyxEV/xdv+V3y6lLGiXAJfnwgRWARtpbfOCg26ZdzreOIaqWc0= X-MS-TrafficTypeDiagnostic: BN6PR03MB2609: X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2609;20:8FhA0hlavbVvRargx4j7wbGoP+kuJPI0eL9IsrlblA9sRKgfiSioviDojsHedyUO+X/D+p9WfXxOPRBYTAdRi2N5c+vLuEdKBRUQbNk9AqFLIBgXYg6OE72fO1MhgGoY7JjpI8fODpX3yQOjbDYE5JYDRd+/BaJNvIaMlJdRHCFfLCAHETQtMIz61qtCozFDc1JwpkOosiRO+Nb/IXu12D/Vfbhuq36GJ3pxAhbEy14yXmfBCqXUiZzGbmNWuIWO/Uj7t4Iu09PCpvmHtF3ln93uxQsdGTTJYzfv2sYYL+7fJzPnkDu93jVyoFXziweP750oxqY8Iyjy1r4DTGqorErFOrURc3wU5W9UdIjSVyQxXMn/mc64qLmjbH9BZC8odvSX+o6RSqxQ7OSIJZL7cdzbVRcPYvwaF6mqHqcF91V0BqkCN/IGbmIa4OLCc+bdYXesCci94RS6A6tThK+kre0k60jaZr4rnFlvbh7VqNA7qf4QkZYEhyoMiZdUZGUG;4:mz3kqjvg+shuY/bzcWE7C6I59r/H5/yWarnCd8UVB3yLm1KlB8M+d/BuVJYtt9Vburku7RJbpadkmxOaprlnTSBdcCMZKvgYevlrhQqixrHuyEz4TG/DMLHzhpbnT1rfY8gcvRraHvK7PQ7e9CpqjpjUApCA6wCv7jb5hZslTa7G21vfD8x9QB3laeRenFsGGSJgaBbTlyIpo2BmObbUG6Fo4d/g2Pndq5ZilNhjf4ZYOJGj/I7yOp5aMsczZgFp/O92cJ2euJu+FCO9JoMiGjUgJBJJ3ZzQZyaYi5McwGfhPcrM8zAo7vp3U/uzZxvt X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(232431446821674); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93004095)(3231221)(944501244)(52105095)(3002001)(10201501046)(6055026)(6041310)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011);SRVR:BN6PR03MB2609;BCL:0;PCL:0;RULEID:;SRVR:BN6PR03MB2609; X-Forefront-PRVS: 0613912E23 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR03MB2609;23:1VomIN1aqpynJ1lV6tr6mlJRvrDZes/OHcZdzVnaz?= =?us-ascii?Q?GHKZaohk+JAvdgr13+Q7VFJIrUjdz1hWZRlPxA5Bwi2LrAJvk8Qc1WgFN6+0?= =?us-ascii?Q?OH0VfqPIpOrhx+Rv9qjArhv75Dfw7C4/DSgkVHR6gIcxlyBPyAZMfZq2deC1?= =?us-ascii?Q?liRnqSbjfSEuCxgI+wITptXJv5b6O7vgp9fQuQFaUabHvDowY/JYP355N8xH?= =?us-ascii?Q?PVgAeAaokJBNgplN3QwWFeINPzOBA+k+70C72TFRTJWJZlJaO0eJbEuI5qx7?= =?us-ascii?Q?ghJ1wWvkmkXm5EHgncD4NKIf4hKMEs376f2Oexj0x8pqZGsrZEI4gEq3FTXN?= =?us-ascii?Q?UyFsKJdL7opzrSC/uqRn3ixfctESYLP+ItuldwSxB6J14iAs95NP/rf1we0B?= =?us-ascii?Q?MtC5F+SirtftMhThwISB8dT3kHQJvU4C7e36CYDDUmq7KpSOK21HHUa7hKsV?= =?us-ascii?Q?6ukQql35AgYbeYzFoOsVPusmqdBHSfulsmHem/cLxHxLrikjvD56Ahash6LK?= =?us-ascii?Q?DXjHfnyDqdtIIqswtnBWrrGZHo8I7whidueI/oIUaQdcf60+LLFvFDzNbB6t?= =?us-ascii?Q?Ixj5zDU1WuVfjfkmKCHYBa3ulzsLYAWA4onB+ZpfU/dM4m9YHtm5iaZcKoti?= =?us-ascii?Q?8l7O2XSH+DWBLPRo0hBGCj8szMZ3Z3IxgszV6rBaRD8ReNIyY9gVXf4c5HWR?= =?us-ascii?Q?OcNbVKM8838Ck5UcuksmOPw/w2+CbkAppN/Yd8asqHrHY8xVyKGhGzBu8fDk?= =?us-ascii?Q?tsdlmLJpfFP4Mmb7zrzZfcihYL29ZnZV6ARtiZ2hRihAeHyGZOdt0rovk1Zj?= =?us-ascii?Q?hrycbNEKCUY5YTYf6yjPk7g2rVwx0Vccpg1RD7oYObAjD94UuEZKoezi8w95?= =?us-ascii?Q?8Nc2Ec1180xIdWHJt5jx9vrd3Hkf/NyIdq3AOqPEU4IA+Oqouy+HduyhdpAg?= =?us-ascii?Q?irhjcbPAEaIXi6E3u7h0hNajF7FwUfHEPsPWfyF/cG+YTS17TvraTp/K/Ig3?= =?us-ascii?Q?QMKZPxJYU4D9JQjF3X3Gf5HU+Tim3qEOjbyZEo49RSY1AYtzFYKrTvdHu4WV?= =?us-ascii?Q?erbA9205IPAQ0bNPf4vF6uIkiD94wI8AV/4uwXdRE9eUhzkNVNPZcDGxZ/LV?= =?us-ascii?Q?zYZkAuwUvs=3D?= X-Microsoft-Antispam-Message-Info: ivBcPyk5q0Z9u09R7txE4M/1HZJWwTblGWyvZYavKkU0JwA9LPHFtvyMyFYf8h9TcyS/sfKrYsyPP0f2O1U0YJirHs9IRgEbaB7Vw5ocKFF3olStyq7zBVvLbCysGCyXi72cToPwyKv+i1PEQr9wB2G5tG7XJF/vTnaylQ0MoKVV1RQX47ZWaglt992/1k/z X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2609;6:CI2fpMDjRmaU6JaG++SEgu9SqF4xlWIG5B532xdefy6pBkC5TGsDhdO9Ol5SDbXwFcKEmjugYTt8EOl2IjvoqAhVA4w6sqOSoT9hSGOaM8wW0XmT9g9C1cGA4Gjoxk0qWdPq7anSA1BdBu5Fi5ltO/BROmlcnaQQaW9y6NwtUGikC4w7XrDLuLRke89A0UbFJba9Ac+77WrBgGrURwObBNYpPwPC/zz7ZhMmXGTjBYweH0/JM0BDeGqQ34A9qyMRHTuH4XFu5pguQ7iDU0Xg98fcKYs9qPg8xkyunClaqCieFsxK2AhZzgWxsCZAgv5W7K1VZkmzcPdMZnhPuUI2zzlHl7Wepf8d7I3Miq4Ib9g=;5:ezHgl/3qGYnuOG1ixtOofiNrhEnuSQ6UxpHJGAedhyOtZVzwtPqh4aGPjf2/MOStvc34zsSx5xjlYPkIxn35mbFMcAq4A9Y6gKPNn93CSUczc+ZnqpdYP8RiERsRgPTm9o2B31jGfKXj/1pzPPOMcG/0PhzcnyD15ilwp+X35qI=;24:7MtGCRQzWgsn3h0OIfwjxNznC//DDLVBJOaTLCyCBb4t5ihGJw/qvndAOgT1cIO8UZfvLAHyS2UCYd3ij0imkHVPSAVljIxuxNRGpS6sHHc=;7:N0oNQjoPoOFCSL3e4vw1SpvVQmv4gdTjA9z3OOO44S+Y+1uOHRWmqs5HB/1Ld3LPGEc8ZfoFkUjwmk/A6TmZFjxKwika5f0lhSOFo4CFsRJKXIcTvcRFbc7TrIh19zNf7O+ASgx+y9jUUwclMPCHqOtfoVwKyh8/p1Y+JYxqeL5UdqOaol1ANHLfVrRzcXMQb1QHCcLQc5vm0FXc0o6Ig0SYqtkc6jljJ6DFGrEg7jrrdGDSAcx0G7AJdojXeU+9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2018 07:17:30.0891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f222ff4b-d970-4313-646d-08d58b0dfad6 X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2609 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Aaron Wu Remove Blackfin input support --- drivers/input/keyboard/Kconfig | 9 - drivers/input/keyboard/Makefile | 1 - drivers/input/keyboard/bf54x-keys.c | 396 ------------------------------ drivers/input/misc/Kconfig | 9 - drivers/input/misc/Makefile | 1 - drivers/input/misc/bfin_rotary.c | 294 ---------------------- include/linux/platform_data/bfin_rotary.h | 117 --------- 7 files changed, 827 deletions(-) delete mode 100644 drivers/input/keyboard/bf54x-keys.c delete mode 100644 drivers/input/misc/bfin_rotary.c delete mode 100644 include/linux/platform_data/bfin_rotary.h diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 4c4ab1c..2b469cc 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -157,15 +157,6 @@ config KEYBOARD_QT2160 This driver can also be built as a module. If so, the module will be called qt2160. -config KEYBOARD_BFIN - tristate "Blackfin BF54x keypad support" - depends on (BF54x && !BF544) - help - Say Y here if you want to use the BF54x keypad. - - To compile this driver as a module, choose M here: the - module will be called bf54x-keys. - config KEYBOARD_CLPS711X tristate "CLPS711X Keypad support" depends on OF_GPIO && (ARCH_CLPS711X || COMPILE_TEST) diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index 526e682..8fab920 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -13,7 +13,6 @@ obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o -obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX) += cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X) += clps711x-keypad.o obj-$(CONFIG_KEYBOARD_CROS_EC) += cros_ec_keyb.o diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c deleted file mode 100644 index 8a07a42..0000000 --- a/drivers/input/keyboard/bf54x-keys.c +++ /dev/null @@ -1,396 +0,0 @@ -/* - * File: drivers/input/keyboard/bf54x-keys.c - * Based on: - * Author: Michael Hennerich - * - * Created: - * Description: keypad driver for Analog Devices Blackfin BF54x Processors - * - * - * Modified: - * Copyright 2007-2008 Analog Devices Inc. - * - * Bugs: Enter bugs at http://blackfin.uclinux.org/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see the file COPYING, or write - * to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define DRV_NAME "bf54x-keys" -#define TIME_SCALE 100 /* 100 ns */ -#define MAX_MULT (0xFF * TIME_SCALE) -#define MAX_RC 8 /* Max Row/Col */ - -static const u16 per_rows[] = { - P_KEY_ROW7, - P_KEY_ROW6, - P_KEY_ROW5, - P_KEY_ROW4, - P_KEY_ROW3, - P_KEY_ROW2, - P_KEY_ROW1, - P_KEY_ROW0, - 0 -}; - -static const u16 per_cols[] = { - P_KEY_COL7, - P_KEY_COL6, - P_KEY_COL5, - P_KEY_COL4, - P_KEY_COL3, - P_KEY_COL2, - P_KEY_COL1, - P_KEY_COL0, - 0 -}; - -struct bf54x_kpad { - struct input_dev *input; - int irq; - unsigned short lastkey; - unsigned short *keycode; - struct timer_list timer; - unsigned int keyup_test_jiffies; - unsigned short kpad_msel; - unsigned short kpad_prescale; - unsigned short kpad_ctl; -}; - -static inline int bfin_kpad_find_key(struct bf54x_kpad *bf54x_kpad, - struct input_dev *input, u16 keyident) -{ - u16 i; - - for (i = 0; i < input->keycodemax; i++) - if (bf54x_kpad->keycode[i + input->keycodemax] == keyident) - return bf54x_kpad->keycode[i]; - return -1; -} - -static inline void bfin_keycodecpy(unsigned short *keycode, - const unsigned int *pdata_kc, - unsigned short keymapsize) -{ - unsigned int i; - - for (i = 0; i < keymapsize; i++) { - keycode[i] = pdata_kc[i] & 0xffff; - keycode[i + keymapsize] = pdata_kc[i] >> 16; - } -} - -static inline u16 bfin_kpad_get_prescale(u32 timescale) -{ - u32 sclk = get_sclk(); - - return ((((sclk / 1000) * timescale) / 1024) - 1); -} - -static inline u16 bfin_kpad_get_keypressed(struct bf54x_kpad *bf54x_kpad) -{ - return (bfin_read_KPAD_STAT() & KPAD_PRESSED); -} - -static inline void bfin_kpad_clear_irq(void) -{ - bfin_write_KPAD_STAT(0xFFFF); - bfin_write_KPAD_ROWCOL(0xFFFF); -} - -static void bfin_kpad_timer(struct timer_list *t) -{ - struct bf54x_kpad *bf54x_kpad = from_timer(bf54x_kpad, t, timer); - - if (bfin_kpad_get_keypressed(bf54x_kpad)) { - /* Try again later */ - mod_timer(&bf54x_kpad->timer, - jiffies + bf54x_kpad->keyup_test_jiffies); - return; - } - - input_report_key(bf54x_kpad->input, bf54x_kpad->lastkey, 0); - input_sync(bf54x_kpad->input); - - /* Clear IRQ Status */ - - bfin_kpad_clear_irq(); - enable_irq(bf54x_kpad->irq); -} - -static irqreturn_t bfin_kpad_isr(int irq, void *dev_id) -{ - struct platform_device *pdev = dev_id; - struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); - struct input_dev *input = bf54x_kpad->input; - int key; - u16 rowcol = bfin_read_KPAD_ROWCOL(); - - key = bfin_kpad_find_key(bf54x_kpad, input, rowcol); - - input_report_key(input, key, 1); - input_sync(input); - - if (bfin_kpad_get_keypressed(bf54x_kpad)) { - disable_irq_nosync(bf54x_kpad->irq); - bf54x_kpad->lastkey = key; - mod_timer(&bf54x_kpad->timer, - jiffies + bf54x_kpad->keyup_test_jiffies); - } else { - input_report_key(input, key, 0); - input_sync(input); - - bfin_kpad_clear_irq(); - } - - return IRQ_HANDLED; -} - -static int bfin_kpad_probe(struct platform_device *pdev) -{ - struct bf54x_kpad *bf54x_kpad; - struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev); - struct input_dev *input; - int i, error; - - if (!pdata->rows || !pdata->cols || !pdata->keymap) { - dev_err(&pdev->dev, "no rows, cols or keymap from pdata\n"); - return -EINVAL; - } - - if (!pdata->keymapsize || - pdata->keymapsize > (pdata->rows * pdata->cols)) { - dev_err(&pdev->dev, "invalid keymapsize\n"); - return -EINVAL; - } - - bf54x_kpad = kzalloc(sizeof(struct bf54x_kpad), GFP_KERNEL); - if (!bf54x_kpad) - return -ENOMEM; - - platform_set_drvdata(pdev, bf54x_kpad); - - /* Allocate memory for keymap followed by private LUT */ - bf54x_kpad->keycode = kmalloc(pdata->keymapsize * - sizeof(unsigned short) * 2, GFP_KERNEL); - if (!bf54x_kpad->keycode) { - error = -ENOMEM; - goto out; - } - - if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT || - !pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) { - dev_warn(&pdev->dev, - "invalid platform debounce/columndrive time\n"); - bfin_write_KPAD_MSEL(0xFF0); /* Default MSEL */ - } else { - bfin_write_KPAD_MSEL( - ((pdata->debounce_time / TIME_SCALE) - & DBON_SCALE) | - (((pdata->coldrive_time / TIME_SCALE) << 8) - & COLDRV_SCALE)); - - } - - if (!pdata->keyup_test_interval) - bf54x_kpad->keyup_test_jiffies = msecs_to_jiffies(50); - else - bf54x_kpad->keyup_test_jiffies = - msecs_to_jiffies(pdata->keyup_test_interval); - - if (peripheral_request_list((u16 *)&per_rows[MAX_RC - pdata->rows], - DRV_NAME)) { - dev_err(&pdev->dev, "requesting peripherals failed\n"); - error = -EFAULT; - goto out0; - } - - if (peripheral_request_list((u16 *)&per_cols[MAX_RC - pdata->cols], - DRV_NAME)) { - dev_err(&pdev->dev, "requesting peripherals failed\n"); - error = -EFAULT; - goto out1; - } - - bf54x_kpad->irq = platform_get_irq(pdev, 0); - if (bf54x_kpad->irq < 0) { - error = -ENODEV; - goto out2; - } - - error = request_irq(bf54x_kpad->irq, bfin_kpad_isr, - 0, DRV_NAME, pdev); - if (error) { - dev_err(&pdev->dev, "unable to claim irq %d\n", - bf54x_kpad->irq); - goto out2; - } - - input = input_allocate_device(); - if (!input) { - error = -ENOMEM; - goto out3; - } - - bf54x_kpad->input = input; - - input->name = pdev->name; - input->phys = "bf54x-keys/input0"; - input->dev.parent = &pdev->dev; - - input->id.bustype = BUS_HOST; - input->id.vendor = 0x0001; - input->id.product = 0x0001; - input->id.version = 0x0100; - - input->keycodesize = sizeof(unsigned short); - input->keycodemax = pdata->keymapsize; - input->keycode = bf54x_kpad->keycode; - - bfin_keycodecpy(bf54x_kpad->keycode, pdata->keymap, pdata->keymapsize); - - /* setup input device */ - __set_bit(EV_KEY, input->evbit); - - if (pdata->repeat) - __set_bit(EV_REP, input->evbit); - - for (i = 0; i < input->keycodemax; i++) - if (bf54x_kpad->keycode[i] <= KEY_MAX) - __set_bit(bf54x_kpad->keycode[i], input->keybit); - __clear_bit(KEY_RESERVED, input->keybit); - - error = input_register_device(input); - if (error) { - dev_err(&pdev->dev, "unable to register input device\n"); - goto out4; - } - - /* Init Keypad Key Up/Release test timer */ - - timer_setup(&bf54x_kpad->timer, bfin_kpad_timer, 0); - - bfin_write_KPAD_PRESCALE(bfin_kpad_get_prescale(TIME_SCALE)); - - bfin_write_KPAD_CTL((((pdata->cols - 1) << 13) & KPAD_COLEN) | - (((pdata->rows - 1) << 10) & KPAD_ROWEN) | - (2 & KPAD_IRQMODE)); - - bfin_write_KPAD_CTL(bfin_read_KPAD_CTL() | KPAD_EN); - - device_init_wakeup(&pdev->dev, 1); - - return 0; - -out4: - input_free_device(input); -out3: - free_irq(bf54x_kpad->irq, pdev); -out2: - peripheral_free_list((u16 *)&per_cols[MAX_RC - pdata->cols]); -out1: - peripheral_free_list((u16 *)&per_rows[MAX_RC - pdata->rows]); -out0: - kfree(bf54x_kpad->keycode); -out: - kfree(bf54x_kpad); - - return error; -} - -static int bfin_kpad_remove(struct platform_device *pdev) -{ - struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev); - struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); - - del_timer_sync(&bf54x_kpad->timer); - free_irq(bf54x_kpad->irq, pdev); - - input_unregister_device(bf54x_kpad->input); - - peripheral_free_list((u16 *)&per_rows[MAX_RC - pdata->rows]); - peripheral_free_list((u16 *)&per_cols[MAX_RC - pdata->cols]); - - kfree(bf54x_kpad->keycode); - kfree(bf54x_kpad); - - return 0; -} - -#ifdef CONFIG_PM -static int bfin_kpad_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); - - bf54x_kpad->kpad_msel = bfin_read_KPAD_MSEL(); - bf54x_kpad->kpad_prescale = bfin_read_KPAD_PRESCALE(); - bf54x_kpad->kpad_ctl = bfin_read_KPAD_CTL(); - - if (device_may_wakeup(&pdev->dev)) - enable_irq_wake(bf54x_kpad->irq); - - return 0; -} - -static int bfin_kpad_resume(struct platform_device *pdev) -{ - struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); - - bfin_write_KPAD_MSEL(bf54x_kpad->kpad_msel); - bfin_write_KPAD_PRESCALE(bf54x_kpad->kpad_prescale); - bfin_write_KPAD_CTL(bf54x_kpad->kpad_ctl); - - if (device_may_wakeup(&pdev->dev)) - disable_irq_wake(bf54x_kpad->irq); - - return 0; -} -#else -# define bfin_kpad_suspend NULL -# define bfin_kpad_resume NULL -#endif - -static struct platform_driver bfin_kpad_device_driver = { - .driver = { - .name = DRV_NAME, - }, - .probe = bfin_kpad_probe, - .remove = bfin_kpad_remove, - .suspend = bfin_kpad_suspend, - .resume = bfin_kpad_resume, -}; -module_platform_driver(bfin_kpad_device_driver); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Michael Hennerich "); -MODULE_DESCRIPTION("Keypad driver for BF54x Processors"); -MODULE_ALIAS("platform:bf54x-keys"); diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 62a1312..e9770f5 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -655,15 +655,6 @@ config INPUT_DM355EVM To compile this driver as a module, choose M here: the module will be called dm355evm_keys. -config INPUT_BFIN_ROTARY - tristate "Blackfin Rotary support" - depends on BF54x || BF52x - help - Say Y here if you want to use the Blackfin Rotary. - - To compile this driver as a module, choose M here: the - module will be called bfin-rotary. - config INPUT_WM831X_ON tristate "WM831X ON pin" depends on MFD_WM831X diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index a8f61af..eb9c6c3 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -19,7 +19,6 @@ obj-$(CONFIG_INPUT_ARIZONA_HAPTICS) += arizona-haptics.o obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o obj-$(CONFIG_INPUT_ATMEL_CAPTOUCH) += atmel_captouch.o -obj-$(CONFIG_INPUT_BFIN_ROTARY) += bfin_rotary.o obj-$(CONFIG_INPUT_BMA150) += bma150.o obj-$(CONFIG_INPUT_CM109) += cm109.o obj-$(CONFIG_INPUT_CMA3000) += cma3000_d0x.o diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c deleted file mode 100644 index 799ce3d..0000000 --- a/drivers/input/misc/bfin_rotary.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Rotary counter driver for Analog Devices Blackfin Processors - * - * Copyright 2008-2009 Analog Devices Inc. - * Licensed under the GPL-2 or later. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define CNT_CONFIG_OFF 0 /* CNT Config Offset */ -#define CNT_IMASK_OFF 4 /* CNT Interrupt Mask Offset */ -#define CNT_STATUS_OFF 8 /* CNT Status Offset */ -#define CNT_COMMAND_OFF 12 /* CNT Command Offset */ -#define CNT_DEBOUNCE_OFF 16 /* CNT Debounce Offset */ -#define CNT_COUNTER_OFF 20 /* CNT Counter Offset */ -#define CNT_MAX_OFF 24 /* CNT Maximum Count Offset */ -#define CNT_MIN_OFF 28 /* CNT Minimum Count Offset */ - -struct bfin_rot { - struct input_dev *input; - void __iomem *base; - int irq; - unsigned int up_key; - unsigned int down_key; - unsigned int button_key; - unsigned int rel_code; - - unsigned short mode; - unsigned short debounce; - - unsigned short cnt_config; - unsigned short cnt_imask; - unsigned short cnt_debounce; -}; - -static void report_key_event(struct input_dev *input, int keycode) -{ - /* simulate a press-n-release */ - input_report_key(input, keycode, 1); - input_sync(input); - input_report_key(input, keycode, 0); - input_sync(input); -} - -static void report_rotary_event(struct bfin_rot *rotary, int delta) -{ - struct input_dev *input = rotary->input; - - if (rotary->up_key) { - report_key_event(input, - delta > 0 ? rotary->up_key : rotary->down_key); - } else { - input_report_rel(input, rotary->rel_code, delta); - input_sync(input); - } -} - -static irqreturn_t bfin_rotary_isr(int irq, void *dev_id) -{ - struct bfin_rot *rotary = dev_id; - int delta; - - switch (readw(rotary->base + CNT_STATUS_OFF)) { - - case ICII: - break; - - case UCII: - case DCII: - delta = readl(rotary->base + CNT_COUNTER_OFF); - if (delta) - report_rotary_event(rotary, delta); - break; - - case CZMII: - report_key_event(rotary->input, rotary->button_key); - break; - - default: - break; - } - - writew(W1LCNT_ZERO, rotary->base + CNT_COMMAND_OFF); /* Clear COUNTER */ - writew(-1, rotary->base + CNT_STATUS_OFF); /* Clear STATUS */ - - return IRQ_HANDLED; -} - -static int bfin_rotary_open(struct input_dev *input) -{ - struct bfin_rot *rotary = input_get_drvdata(input); - unsigned short val; - - if (rotary->mode & ROT_DEBE) - writew(rotary->debounce & DPRESCALE, - rotary->base + CNT_DEBOUNCE_OFF); - - writew(rotary->mode & ~CNTE, rotary->base + CNT_CONFIG_OFF); - - val = UCIE | DCIE; - if (rotary->button_key) - val |= CZMIE; - writew(val, rotary->base + CNT_IMASK_OFF); - - writew(rotary->mode | CNTE, rotary->base + CNT_CONFIG_OFF); - - return 0; -} - -static void bfin_rotary_close(struct input_dev *input) -{ - struct bfin_rot *rotary = input_get_drvdata(input); - - writew(0, rotary->base + CNT_CONFIG_OFF); - writew(0, rotary->base + CNT_IMASK_OFF); -} - -static void bfin_rotary_free_action(void *data) -{ - peripheral_free_list(data); -} - -static int bfin_rotary_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - const struct bfin_rotary_platform_data *pdata = dev_get_platdata(dev); - struct bfin_rot *rotary; - struct resource *res; - struct input_dev *input; - int error; - - /* Basic validation */ - if ((pdata->rotary_up_key && !pdata->rotary_down_key) || - (!pdata->rotary_up_key && pdata->rotary_down_key)) { - return -EINVAL; - } - - if (pdata->pin_list) { - error = peripheral_request_list(pdata->pin_list, - dev_name(dev)); - if (error) { - dev_err(dev, "requesting peripherals failed: %d\n", - error); - return error; - } - - error = devm_add_action_or_reset(dev, bfin_rotary_free_action, - pdata->pin_list); - if (error) { - dev_err(dev, "setting cleanup action failed: %d\n", - error); - return error; - } - } - - rotary = devm_kzalloc(dev, sizeof(struct bfin_rot), GFP_KERNEL); - if (!rotary) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rotary->base = devm_ioremap_resource(dev, res); - if (IS_ERR(rotary->base)) - return PTR_ERR(rotary->base); - - input = devm_input_allocate_device(dev); - if (!input) - return -ENOMEM; - - rotary->input = input; - - rotary->up_key = pdata->rotary_up_key; - rotary->down_key = pdata->rotary_down_key; - rotary->button_key = pdata->rotary_button_key; - rotary->rel_code = pdata->rotary_rel_code; - - rotary->mode = pdata->mode; - rotary->debounce = pdata->debounce; - - input->name = pdev->name; - input->phys = "bfin-rotary/input0"; - input->dev.parent = dev; - - input_set_drvdata(input, rotary); - - input->id.bustype = BUS_HOST; - input->id.vendor = 0x0001; - input->id.product = 0x0001; - input->id.version = 0x0100; - - input->open = bfin_rotary_open; - input->close = bfin_rotary_close; - - if (rotary->up_key) { - __set_bit(EV_KEY, input->evbit); - __set_bit(rotary->up_key, input->keybit); - __set_bit(rotary->down_key, input->keybit); - } else { - __set_bit(EV_REL, input->evbit); - __set_bit(rotary->rel_code, input->relbit); - } - - if (rotary->button_key) { - __set_bit(EV_KEY, input->evbit); - __set_bit(rotary->button_key, input->keybit); - } - - /* Quiesce the device before requesting irq */ - bfin_rotary_close(input); - - rotary->irq = platform_get_irq(pdev, 0); - if (rotary->irq < 0) { - dev_err(dev, "No rotary IRQ specified\n"); - return -ENOENT; - } - - error = devm_request_irq(dev, rotary->irq, bfin_rotary_isr, - 0, dev_name(dev), rotary); - if (error) { - dev_err(dev, "unable to claim irq %d; error %d\n", - rotary->irq, error); - return error; - } - - error = input_register_device(input); - if (error) { - dev_err(dev, "unable to register input device (%d)\n", error); - return error; - } - - platform_set_drvdata(pdev, rotary); - device_init_wakeup(dev, 1); - - return 0; -} - -static int __maybe_unused bfin_rotary_suspend(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct bfin_rot *rotary = platform_get_drvdata(pdev); - - rotary->cnt_config = readw(rotary->base + CNT_CONFIG_OFF); - rotary->cnt_imask = readw(rotary->base + CNT_IMASK_OFF); - rotary->cnt_debounce = readw(rotary->base + CNT_DEBOUNCE_OFF); - - if (device_may_wakeup(&pdev->dev)) - enable_irq_wake(rotary->irq); - - return 0; -} - -static int __maybe_unused bfin_rotary_resume(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct bfin_rot *rotary = platform_get_drvdata(pdev); - - writew(rotary->cnt_debounce, rotary->base + CNT_DEBOUNCE_OFF); - writew(rotary->cnt_imask, rotary->base + CNT_IMASK_OFF); - writew(rotary->cnt_config & ~CNTE, rotary->base + CNT_CONFIG_OFF); - - if (device_may_wakeup(&pdev->dev)) - disable_irq_wake(rotary->irq); - - if (rotary->cnt_config & CNTE) - writew(rotary->cnt_config, rotary->base + CNT_CONFIG_OFF); - - return 0; -} - -static SIMPLE_DEV_PM_OPS(bfin_rotary_pm_ops, - bfin_rotary_suspend, bfin_rotary_resume); - -static struct platform_driver bfin_rotary_device_driver = { - .probe = bfin_rotary_probe, - .driver = { - .name = "bfin-rotary", - .pm = &bfin_rotary_pm_ops, - }, -}; -module_platform_driver(bfin_rotary_device_driver); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Michael Hennerich "); -MODULE_DESCRIPTION("Rotary Counter driver for Blackfin Processors"); -MODULE_ALIAS("platform:bfin-rotary"); diff --git a/include/linux/platform_data/bfin_rotary.h b/include/linux/platform_data/bfin_rotary.h deleted file mode 100644 index 9882937..0000000 --- a/include/linux/platform_data/bfin_rotary.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * board initialization should put one of these structures into platform_data - * and place the bfin-rotary onto platform_bus named "bfin-rotary". - * - * Copyright 2008-2010 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ - -#ifndef _BFIN_ROTARY_H -#define _BFIN_ROTARY_H - -/* mode bitmasks */ -#define ROT_QUAD_ENC CNTMODE_QUADENC /* quadrature/grey code encoder mode */ -#define ROT_BIN_ENC CNTMODE_BINENC /* binary encoder mode */ -#define ROT_UD_CNT CNTMODE_UDCNT /* rotary counter mode */ -#define ROT_DIR_CNT CNTMODE_DIRCNT /* direction counter mode */ - -#define ROT_DEBE DEBE /* Debounce Enable */ - -#define ROT_CDGINV CDGINV /* CDG Pin Polarity Invert */ -#define ROT_CUDINV CUDINV /* CUD Pin Polarity Invert */ -#define ROT_CZMINV CZMINV /* CZM Pin Polarity Invert */ - -struct bfin_rotary_platform_data { - /* set rotary UP KEY_### or BTN_### in case you prefer - * bfin-rotary to send EV_KEY otherwise set 0 - */ - unsigned int rotary_up_key; - /* set rotary DOWN KEY_### or BTN_### in case you prefer - * bfin-rotary to send EV_KEY otherwise set 0 - */ - unsigned int rotary_down_key; - /* set rotary BUTTON KEY_### or BTN_### */ - unsigned int rotary_button_key; - /* set rotary Relative Axis REL_### in case you prefer - * bfin-rotary to send EV_REL otherwise set 0 - */ - unsigned int rotary_rel_code; - unsigned short debounce; /* 0..17 */ - unsigned short mode; - unsigned short pm_wakeup; - unsigned short *pin_list; -}; - -/* CNT_CONFIG bitmasks */ -#define CNTE (1 << 0) /* Counter Enable */ -#define DEBE (1 << 1) /* Debounce Enable */ -#define CDGINV (1 << 4) /* CDG Pin Polarity Invert */ -#define CUDINV (1 << 5) /* CUD Pin Polarity Invert */ -#define CZMINV (1 << 6) /* CZM Pin Polarity Invert */ -#define CNTMODE_SHIFT 8 -#define CNTMODE (0x7 << CNTMODE_SHIFT) /* Counter Operating Mode */ -#define ZMZC (1 << 1) /* CZM Zeroes Counter Enable */ -#define BNDMODE_SHIFT 12 -#define BNDMODE (0x3 << BNDMODE_SHIFT) /* Boundary register Mode */ -#define INPDIS (1 << 15) /* CUG and CDG Input Disable */ - -#define CNTMODE_QUADENC (0 << CNTMODE_SHIFT) /* quadrature encoder mode */ -#define CNTMODE_BINENC (1 << CNTMODE_SHIFT) /* binary encoder mode */ -#define CNTMODE_UDCNT (2 << CNTMODE_SHIFT) /* up/down counter mode */ -#define CNTMODE_DIRCNT (4 << CNTMODE_SHIFT) /* direction counter mode */ -#define CNTMODE_DIRTMR (5 << CNTMODE_SHIFT) /* direction timer mode */ - -#define BNDMODE_COMP (0 << BNDMODE_SHIFT) /* boundary compare mode */ -#define BNDMODE_ZERO (1 << BNDMODE_SHIFT) /* boundary compare and zero mode */ -#define BNDMODE_CAPT (2 << BNDMODE_SHIFT) /* boundary capture mode */ -#define BNDMODE_AEXT (3 << BNDMODE_SHIFT) /* boundary auto-extend mode */ - -/* CNT_IMASK bitmasks */ -#define ICIE (1 << 0) /* Illegal Gray/Binary Code Interrupt Enable */ -#define UCIE (1 << 1) /* Up count Interrupt Enable */ -#define DCIE (1 << 2) /* Down count Interrupt Enable */ -#define MINCIE (1 << 3) /* Min Count Interrupt Enable */ -#define MAXCIE (1 << 4) /* Max Count Interrupt Enable */ -#define COV31IE (1 << 5) /* Bit 31 Overflow Interrupt Enable */ -#define COV15IE (1 << 6) /* Bit 15 Overflow Interrupt Enable */ -#define CZEROIE (1 << 7) /* Count to Zero Interrupt Enable */ -#define CZMIE (1 << 8) /* CZM Pin Interrupt Enable */ -#define CZMEIE (1 << 9) /* CZM Error Interrupt Enable */ -#define CZMZIE (1 << 10) /* CZM Zeroes Counter Interrupt Enable */ - -/* CNT_STATUS bitmasks */ -#define ICII (1 << 0) /* Illegal Gray/Binary Code Interrupt Identifier */ -#define UCII (1 << 1) /* Up count Interrupt Identifier */ -#define DCII (1 << 2) /* Down count Interrupt Identifier */ -#define MINCII (1 << 3) /* Min Count Interrupt Identifier */ -#define MAXCII (1 << 4) /* Max Count Interrupt Identifier */ -#define COV31II (1 << 5) /* Bit 31 Overflow Interrupt Identifier */ -#define COV15II (1 << 6) /* Bit 15 Overflow Interrupt Identifier */ -#define CZEROII (1 << 7) /* Count to Zero Interrupt Identifier */ -#define CZMII (1 << 8) /* CZM Pin Interrupt Identifier */ -#define CZMEII (1 << 9) /* CZM Error Interrupt Identifier */ -#define CZMZII (1 << 10) /* CZM Zeroes Counter Interrupt Identifier */ - -/* CNT_COMMAND bitmasks */ -#define W1LCNT 0xf /* Load Counter Register */ -#define W1LMIN 0xf0 /* Load Min Register */ -#define W1LMAX 0xf00 /* Load Max Register */ -#define W1ZMONCE (1 << 12) /* Enable CZM Clear Counter Once */ - -#define W1LCNT_ZERO (1 << 0) /* write 1 to load CNT_COUNTER with zero */ -#define W1LCNT_MIN (1 << 2) /* write 1 to load CNT_COUNTER from CNT_MIN */ -#define W1LCNT_MAX (1 << 3) /* write 1 to load CNT_COUNTER from CNT_MAX */ - -#define W1LMIN_ZERO (1 << 4) /* write 1 to load CNT_MIN with zero */ -#define W1LMIN_CNT (1 << 5) /* write 1 to load CNT_MIN from CNT_COUNTER */ -#define W1LMIN_MAX (1 << 7) /* write 1 to load CNT_MIN from CNT_MAX */ - -#define W1LMAX_ZERO (1 << 8) /* write 1 to load CNT_MAX with zero */ -#define W1LMAX_CNT (1 << 9) /* write 1 to load CNT_MAX from CNT_COUNTER */ -#define W1LMAX_MIN (1 << 10) /* write 1 to load CNT_MAX from CNT_MIN */ - -/* CNT_DEBOUNCE bitmasks */ -#define DPRESCALE 0xf /* Load Counter Register */ - -#endif -- 2.7.4