linux/drivers/input/rmi4/rmi_smbus.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015 - 2016 Red Hat, Inc
 * Copyright (c) 2011, 2012 Synaptics Incorporated
 * Copyright (c) 2011 Unixphere
 */

#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kconfig.h>
#include <linux/lockdep.h>
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/rmi.h>
#include <linux/slab.h>
#include "rmi_driver.h"

#define SMB_PROTOCOL_VERSION_ADDRESS
#define SMB_MAX_COUNT
#define RMI_SMB2_MAP_SIZE
#define RMI_SMB2_MAP_FLAGS_WE

struct mapping_table_entry {};

struct rmi_smb_xport {};

static int rmi_smb_get_version(struct rmi_smb_xport *rmi_smb)
{}

/* SMB block write - wrapper over ic2_smb_write_block */
static int smb_block_write(struct rmi_transport_dev *xport,
			      u8 commandcode, const void *buf, size_t len)
{}

/*
 * The function to get command code for smbus operations and keeps
 * records to the driver mapping table
 */
static int rmi_smb_get_command_code(struct rmi_transport_dev *xport,
		u16 rmiaddr, int bytecount, bool isread, u8 *commandcode)
{}

static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,
				const void *databuff, size_t len)
{}

/* SMB block read - wrapper over ic2_smb_read_block */
static int smb_block_read(struct rmi_transport_dev *xport,
			     u8 commandcode, void *buf, size_t len)
{}

static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,
			      void *databuff, size_t len)
{}

static void rmi_smb_clear_state(struct rmi_smb_xport *rmi_smb)
{}

static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb)
{}

static int rmi_smb_reset(struct rmi_transport_dev *xport, u16 reset_addr)
{}

static const struct rmi_transport_ops rmi_smb_ops =;

static int rmi_smb_probe(struct i2c_client *client)
{}

static void rmi_smb_remove(struct i2c_client *client)
{}

static int rmi_smb_suspend(struct device *dev)
{}

static int rmi_smb_runtime_suspend(struct device *dev)
{}

static int rmi_smb_resume(struct device *dev)
{}

static int rmi_smb_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops rmi_smb_pm =;

static const struct i2c_device_id rmi_id[] =;
MODULE_DEVICE_TABLE(i2c, rmi_id);

static struct i2c_driver rmi_smb_driver =;

module_i2c_driver();

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