linux/drivers/input/keyboard/pinephone-keyboard.c

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright (C) 2021-2022 Samuel Holland <[email protected]>

#include <linux/crc8.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/input/matrix_keypad.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/of.h>
#include <linux/regulator/consumer.h>
#include <linux/types.h>

#define DRV_NAME

#define PPKB_CRC8_POLYNOMIAL

#define PPKB_DEVICE_ID_HI
#define PPKB_DEVICE_ID_HI_VALUE
#define PPKB_DEVICE_ID_LO
#define PPKB_DEVICE_ID_LO_VALUE
#define PPKB_FW_REVISION
#define PPKB_FW_FEATURES
#define PPKB_MATRIX_SIZE
#define PPKB_SCAN_CRC
#define PPKB_SCAN_DATA
#define PPKB_SYS_CONFIG
#define PPKB_SYS_CONFIG_DISABLE_SCAN
#define PPKB_SYS_SMBUS_COMMAND
#define PPKB_SYS_SMBUS_DATA
#define PPKB_SYS_COMMAND
#define PPKB_SYS_COMMAND_SMBUS_READ
#define PPKB_SYS_COMMAND_SMBUS_WRITE

#define PPKB_ROWS
#define PPKB_COLS

/* Size of the scan buffer, including the CRC byte at the beginning. */
#define PPKB_BUF_LEN

static const uint32_t ppkb_keymap[] =;

static const struct matrix_keymap_data ppkb_keymap_data =;

struct pinephone_keyboard {};

static int ppkb_adap_smbus_xfer(struct i2c_adapter *adap, u16 addr,
				unsigned short flags, char read_write,
				u8 command, int size,
				union i2c_smbus_data *data)
{}

static u32 ppkg_adap_functionality(struct i2c_adapter *adap)
{}

static const struct i2c_algorithm ppkb_adap_algo =;

static void ppkb_update(struct i2c_client *client)
{}

static irqreturn_t ppkb_irq_thread(int irq, void *data)
{}

static int ppkb_set_scan(struct i2c_client *client, bool enable)
{}

static int ppkb_open(struct input_dev *input)
{}

static void ppkb_close(struct input_dev *input)
{}

static int ppkb_probe(struct i2c_client *client)
{}

static const struct of_device_id ppkb_of_match[] =;
MODULE_DEVICE_TABLE(of, ppkb_of_match);

static struct i2c_driver ppkb_driver =;
module_i2c_driver();

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