| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for the Cirrus EP93xx matrix keypad controller. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2008 H Hartley Sweeten <hsweeten@visionengravers.com> |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 11 | 8 | * |
|---|
| 12 | 9 | * NOTE: |
|---|
| 13 | 10 | * |
|---|
| .. | .. |
|---|
| 27 | 24 | #include <linux/io.h> |
|---|
| 28 | 25 | #include <linux/input/matrix_keypad.h> |
|---|
| 29 | 26 | #include <linux/slab.h> |
|---|
| 30 | | - |
|---|
| 31 | | -#include <mach/hardware.h> |
|---|
| 27 | +#include <linux/soc/cirrus/ep93xx.h> |
|---|
| 32 | 28 | #include <linux/platform_data/keypad-ep93xx.h> |
|---|
| 33 | 29 | |
|---|
| 34 | 30 | /* |
|---|
| .. | .. |
|---|
| 137 | 133 | struct ep93xx_keypad_platform_data *pdata = keypad->pdata; |
|---|
| 138 | 134 | unsigned int val = 0; |
|---|
| 139 | 135 | |
|---|
| 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); |
|---|
| 144 | 137 | |
|---|
| 145 | 138 | if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY) |
|---|
| 146 | 139 | val |= KEY_INIT_DIS3KY; |
|---|