linux/drivers/input/keyboard/tc3589x-keypad.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) ST-Ericsson SA 2010
 *
 * Author: Jayeeta Banerjee <[email protected]>
 * Author: Sundar Iyer <[email protected]>
 *
 * TC35893 MFD Keypad Controller driver
 */

#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/platform_device.h>
#include <linux/input/matrix_keypad.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/mfd/tc3589x.h>
#include <linux/device.h>

/* Maximum supported keypad matrix row/columns size */
#define TC3589x_MAX_KPROW
#define TC3589x_MAX_KPCOL

/* keypad related Constants */
#define TC3589x_MAX_DEBOUNCE_SETTLE
#define DEDICATED_KEY_VAL

/* Pull up/down masks */
#define TC3589x_NO_PULL_MASK
#define TC3589x_PULL_DOWN_MASK
#define TC3589x_PULL_UP_MASK
#define TC3589x_PULLUP_ALL_MASK
#define TC3589x_IO_PULL_VAL(index, mask)

/* Bit masks for IOCFG register */
#define IOCFG_BALLCFG
#define IOCFG_IG

#define KP_EVCODE_COL_MASK
#define KP_EVCODE_ROW_MASK
#define KP_RELEASE_EVT_MASK

#define KP_ROW_SHIFT

#define KP_NO_VALID_KEY_MASK

/* bit masks for RESTCTRL register */
#define TC3589x_KBDRST
#define TC3589x_IRQRST
#define TC3589x_RESET_ALL

/* KBDMFS register bit mask */
#define TC3589x_KBDMFS_EN

/* CLKEN register bitmask */
#define KPD_CLK_EN

/* RSTINTCLR register bit mask */
#define IRQ_CLEAR

/* bit masks for keyboard interrupts*/
#define TC3589x_EVT_LOSS_INT
#define TC3589x_EVT_INT
#define TC3589x_KBD_LOSS_INT
#define TC3589x_KBD_INT

/* bit masks for keyboard interrupt clear*/
#define TC3589x_EVT_INT_CLR
#define TC3589x_KBD_INT_CLR

/**
 * struct tc3589x_keypad_platform_data - platform specific keypad data
 * @keymap_data:        matrix scan code table for keycodes
 * @krow:               mask for available rows, value is 0xFF
 * @kcol:               mask for available columns, value is 0xFF
 * @debounce_period:    platform specific debounce time
 * @settle_time:        platform specific settle down time
 * @irqtype:            type of interrupt, falling or rising edge
 * @enable_wakeup:      specifies if keypad event can wake up system from sleep
 * @no_autorepeat:      flag for auto repetition
 */
struct tc3589x_keypad_platform_data {};

/**
 * struct tc_keypad - data structure used by keypad driver
 * @tc3589x:    pointer to tc35893
 * @input:      pointer to input device object
 * @board:      keypad platform device
 * @krow:	number of rows
 * @kcol:	number of columns
 * @keymap:     matrix scan code table for keycodes
 * @keypad_stopped: holds keypad status
 */
struct tc_keypad {};

static int tc3589x_keypad_init_key_hardware(struct tc_keypad *keypad)
{}

#define TC35893_DATA_REGS
#define TC35893_KEYCODE_FIFO_EMPTY
#define TC35893_KEYCODE_FIFO_CLEAR
#define TC35893_KEYPAD_ROW_SHIFT

static irqreturn_t tc3589x_keypad_irq(int irq, void *dev)
{}

static int tc3589x_keypad_enable(struct tc_keypad *keypad)
{}

static int tc3589x_keypad_disable(struct tc_keypad *keypad)
{}

static int tc3589x_keypad_open(struct input_dev *input)
{}

static void tc3589x_keypad_close(struct input_dev *input)
{}

static const struct tc3589x_keypad_platform_data *
tc3589x_keypad_of_probe(struct device *dev)
{}

static int tc3589x_keypad_probe(struct platform_device *pdev)
{}

static int tc3589x_keypad_suspend(struct device *dev)
{}

static int tc3589x_keypad_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(tc3589x_keypad_dev_pm_ops,
				tc3589x_keypad_suspend, tc3589x_keypad_resume);

static struct platform_driver tc3589x_keypad_driver =;
module_platform_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_ALIAS();