Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2524260yba; Mon, 15 Apr 2019 13:33:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf2MwSONTpZU86y9xCJ/tKRNZ9DiTfzaxFFeJFDi9DUc8KMXOoY4tEW2A4Gqk/DKHJgf8J X-Received: by 2002:a17:902:b715:: with SMTP id d21mr79268926pls.103.1555360388534; Mon, 15 Apr 2019 13:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555360388; cv=none; d=google.com; s=arc-20160816; b=vZ2azAb9GX4ntb4L/xEcdnLz4UhbCGwhcL7wbW834y9DPv/fqo/AWd9BPdPbdMWLTz 8n3ygZBVGZbb+eHDOqWoVwuUctAhcO7IwHFT0UoWz5BX2SqwfUJM78ytSYbmTMkNU37d jthTf9xQoXkajIcZ0+neRjKhrqgAizDSiFg3Zp/NwmgoKoO9ntxbZ85+mVdk7EQwrGg5 pBCH1ohN3jKfMjIL4SfmY9Ulxt+FcdXKTgSAn+F5fAOk7UE5kavn4kz2YpIzYkkSUEFh pnXJyjjUb/YjNTlVHRcQqvrf0SeAhXAJKLpmkj5CsVNsIUgSLqqmZV2IIzRsjJLSvUqL AoGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=K5sbHRF5M/YO8cBNgxHoKYdl90vp1O+ktqB9hksy+yo=; b=AKSnJDgTK+mDup4HsrWH8XjfeZs5AOTEvp8nxbW66Jt/+o7HOKqJoOUy60OBKmHRUO XGt35wtmKDNYyxwAglB90Kw8iltScfHR413E9MejIutBMImJy2zQ+Oh12kPnQsCJZMwT jpWEj9QNkedp2V79oTzjN9hiqiFLu6oNcfZn4DSefTpOtPuv6WK+dhLhZ9YzmIAWW2fm WoEMP/RqQtBW0epvjdoyuYlCeUNe7rl5UgKN0HH0fJJF58lrPPtS6582UBoHSC9iSHVo I5N2xcqV5KGvnO1HbKVcfVNHJS51V0kxJr4sPYy1tPPWtFSrL1kIGEcxh1wdkTLboRB3 6uAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 1si48632867plw.390.2019.04.15.13.32.52; Mon, 15 Apr 2019 13:33:08 -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; 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 S1730229AbfDOT2p (ORCPT + 99 others); Mon, 15 Apr 2019 15:28:45 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:45297 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729063AbfDOT2m (ORCPT ); Mon, 15 Apr 2019 15:28:42 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MhDEq-1gcueH0N0s-00eLtE; Mon, 15 Apr 2019 21:28:35 +0200 From: Arnd Bergmann To: Hartley Sweeten , Alexander Sverdlin Cc: Linus Walleij , Arnd Bergmann , Dmitry Torokhov , Stefan Agner , Enric Balletbo i Serra , Guenter Roeck , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] ARM: ep93xx: keypad: stop using mach/platform.h Date: Mon, 15 Apr 2019 21:25:24 +0200 Message-Id: <20190415192734.935387-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415192734.935387-1-arnd@arndb.de> References: <20190415192734.935387-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:Dz9JsujkkUgk8Frvv9ud7TM/8N/2eXNKu9k/iheacQOv6Lia4mu Fhs4U0hadKRMyQ3rmWoXQy/8RCMxp+AawzJ6kyQQPfFJCU6LtCcrtBCaj6P8W5Md4RP2qGd JoP6V1JHr4wOsQjFDtEBcFCtM9WHVqyUXKefQeWIsKjrpAtS5y32oay1hWAwS3HB+R3uGf6 O9Dv2XjPEZjo08N3aLDsQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:oX+RErlzxHA=:bofT5AK8lN0WLeiMfzF+Td +p1V42yb+a4im/yfKUfui6LNgsAYR4hlTsva/ZIPGQ6pLgGsEh17rT3XvPSKeXMh5pCEiINoA ogMvXqWbe4HpfDCnJriFsCTJ4us1LM/Nu4mjIJ5pAeGKe8p83Jh4j15Zn7UJulPCnLqwffifF OCDEIB22roZhBSu8w/Tqr6e3Q/NdsqSKlcshOlHE4bSkYMPnQB8i7ka/xhoQoqPdYiDyEjXis 8QI1eOuqnfhTp9T/tgdJZ+lEvzBKQv8G/tnaIRjnpl1+zrbHI3H1c91w6xrWo4wVypVwV7Mn3 AKBQg3+m8JSWlKMmTtIhL2NHQoD4xlDmpcrhXrOAAHwT/tSibIuXo0hRmyUkTn+15d3t7AuXn RmutzCfpdJmAT1gyB8QuV7y9Orcil5bioRFZ6qQccvBBbhfEahXh6EiXhzDCi4K0Jbg7R0IdO myv6IQsfZgRSrcAIifIwRXhEf83YTxVqeldpIkef0c5PrI8fwwAsQjbQ7/9gcUxYIFrfERGrP Z0n3Sj7ZwMv0TkPVkcUakJA8xPFqkeueCp0fi3MNQCiiX3l3aA12BoudNUjIDF0BPLlB6QOqf XnOP2bSUaET4rrdJ55uccAoADnHfLzqJ4cQQvW++7sY61IS5QxP3dyUHG+fDAZVEr9oDHCI5h 9TczqdpR1oCjqW5+tDbMMJuPL7ZhgVSvWkFDRjZ+B/g+7YflA2ZbPMY29oCfa+h+VZxjDewwz otSmwr0mb6oMfCwUqHmnNg4wPGb3rdI0+IBqlg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can communicate the clock rate using platform data rather than setting a flag to use a particular value in the driver, which is cleaner and avoids the dependency. No platform in the kernel currently defines the ep93xx keypad device structure, so this is a rather pointless excercise. Any out of tree users are probably dead now, but if not, they have to change their platform code to match the new platform_data structure. Signed-off-by: Arnd Bergmann --- drivers/input/keyboard/Kconfig | 2 +- drivers/input/keyboard/ep93xx_keypad.c | 5 +---- include/linux/platform_data/keypad-ep93xx.h | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a878351f1643..b373f3274542 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -194,7 +194,7 @@ config KEYBOARD_LKKBD config KEYBOARD_EP93XX tristate "EP93xx Matrix Keypad support" - depends on ARCH_EP93XX + depends on ARCH_EP93XX || COMPILE_TEST select INPUT_MATRIXKMAP help Say Y here to enable the matrix keypad on the Cirrus EP93XX. diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index f77b295e0123..71472f6257c0 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -137,10 +137,7 @@ static void ep93xx_keypad_config(struct ep93xx_keypad *keypad) struct ep93xx_keypad_platform_data *pdata = keypad->pdata; unsigned int val = 0; - if (pdata->flags & EP93XX_KEYPAD_KDIV) - clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV4); - else - clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV16); + clk_set_rate(keypad->clk, pdata->clk_rate); if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY) val |= KEY_INIT_DIS3KY; diff --git a/include/linux/platform_data/keypad-ep93xx.h b/include/linux/platform_data/keypad-ep93xx.h index 0e36818e3680..3054fced8509 100644 --- a/include/linux/platform_data/keypad-ep93xx.h +++ b/include/linux/platform_data/keypad-ep93xx.h @@ -9,8 +9,7 @@ struct matrix_keymap_data; #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ -#define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ -#define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ +#define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */ /** * struct ep93xx_keypad_platform_data - platform specific device structure @@ -24,6 +23,7 @@ struct ep93xx_keypad_platform_data { unsigned int debounce; unsigned int prescale; unsigned int flags; + unsigned int clk_rate; }; #define EP93XX_MATRIX_ROWS (8) -- 2.20.0