hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/input/keyboard/ep93xx_keypad.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for the Cirrus EP93xx matrix keypad controller.
34 *
45 * Copyright (c) 2008 H Hartley Sweeten <hsweeten@visionengravers.com>
56 *
67 * Based on the pxa27x matrix keypad controller by Rodolfo Giometti.
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 *
129 * NOTE:
1310 *
....@@ -27,8 +24,7 @@
2724 #include <linux/io.h>
2825 #include <linux/input/matrix_keypad.h>
2926 #include <linux/slab.h>
30
-
31
-#include <mach/hardware.h>
27
+#include <linux/soc/cirrus/ep93xx.h>
3228 #include <linux/platform_data/keypad-ep93xx.h>
3329
3430 /*
....@@ -137,10 +133,7 @@
137133 struct ep93xx_keypad_platform_data *pdata = keypad->pdata;
138134 unsigned int val = 0;
139135
140
- if (pdata->flags & EP93XX_KEYPAD_KDIV)
141
- clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV4);
142
- else
143
- clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV16);
136
+ clk_set_rate(keypad->clk, pdata->clk_rate);
144137
145138 if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY)
146139 val |= KEY_INIT_DIS3KY;