#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c/twl4030.h>
-#include <asm/irq.h>
+#include <linux/irq.h>
#include <asm/arch/keypad.h>
#include "twl4030-keypad.h"
static u16 kp_state[MAX_ROWS];
static int n_rows, n_cols;
-static struct device * dbg_dev;
+static struct device *dbg_dev;
static struct input_dev *omap_twl4030kp;
-static int twl4030_kpread(u32 module, u8 * data, u32 reg, u8 num_bytes)
+static int twl4030_kpread(u32 module, u8 *data, u32 reg, u8 num_bytes)
{
int ret;
ret = twl4030_i2c_read(module, data, reg, num_bytes);
if (ret < 0) {
- dev_warn(dbg_dev, "Couldn't read TWL4030 register %X - ret %d[%x]\n",
+ dev_warn(dbg_dev, "Couldn't read TWL4030: %X - ret %d[%x]\n",
reg, ret, ret);
return ret;
}
ret = twl4030_i2c_write_u8(module, data, reg);
if (ret < 0) {
- dev_warn(dbg_dev, "Could not write TWL4030 register %X - ret %d[%x]\n",
+ dev_warn(dbg_dev, "Could not write TWL4030: %X - ret %d[%x]\n",
reg, ret, ret);
return ret;
}
static int omap_kp_is_in_ghost_state(u16 *key_state)
{
int i;
- u16 check = 0;
+ u16 check = 0;
for (i = 0; i < n_rows; i++) {
u16 col = key_state[i];
else {
/* check for any changes */
int ret = omap_kp_read_kp_matrix_state(new_state);
- if (ret < 0) /* panic ... */
+ if (ret < 0) /* panic ... */
return;
if (omap_kp_is_in_ghost_state(new_state))
u8 reg;
int i;
int ret = 0;
- struct omap_kp_platform_data *pdata = pdev->dev.platform_data;
+ struct omap_kp_platform_data *pdata = pdev->dev.platform_data;
/* Get the debug Device */
dbg_dev = &(pdev->dev);
#define KEYP_CTRL_KBD_ON 0x40
-#define KEYP_CTRL_NOAUTORPT (KEYP_CTRL_SOFT_NRST | \
- KEYP_CTRL_SOFTMODEN | \
- KEYP_CTRL_TOE_EN | \
+#define KEYP_CTRL_NOAUTORPT (KEYP_CTRL_SOFT_NRST | \
+ KEYP_CTRL_SOFTMODEN | \
+ KEYP_CTRL_TOE_EN | \
KEYP_CTRL_KBD_ON)
-/* KEYP_DEB, KEYP_LONG_KEY, KEYP_TIMEOUT_x*/
-#define KEYP_PERIOD_US(T, prescale) (T / (31 << (prescale + 1)) - 1)
+/* KEYP_DEB, KEYP_LONG_KEY, KEYP_TIMEOUT_x*/
+#define KEYP_PERIOD_US(T, prescale) (T / (31 << (prescale + 1)) - 1)
/* KEYP_LK_PTV_REG Fields */
#define KEYP_LK_PTV_PTV_SHIFT 5