linux/drivers/input/misc/mma8450.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Driver for Freescale's 3-Axis Accelerometer MMA8450
 *
 *  Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/mod_devicetable.h>

#define MMA8450_DRV_NAME

#define MODE_CHANGE_DELAY_MS
#define POLL_INTERVAL
#define POLL_INTERVAL_MAX

/* register definitions */
#define MMA8450_STATUS
#define MMA8450_STATUS_ZXYDR

#define MMA8450_OUT_X8
#define MMA8450_OUT_Y8
#define MMA8450_OUT_Z8

#define MMA8450_OUT_X_LSB
#define MMA8450_OUT_X_MSB
#define MMA8450_OUT_Y_LSB
#define MMA8450_OUT_Y_MSB
#define MMA8450_OUT_Z_LSB
#define MMA8450_OUT_Z_MSB

#define MMA8450_XYZ_DATA_CFG

#define MMA8450_CTRL_REG1
#define MMA8450_CTRL_REG2

static int mma8450_read(struct i2c_client *c, unsigned int off)
{}

static int mma8450_write(struct i2c_client *c, unsigned int off, u8 v)
{}

static int mma8450_read_block(struct i2c_client *c, unsigned int off,
			      u8 *buf, size_t size)
{}

static void mma8450_poll(struct input_dev *input)
{}

/* Initialize the MMA8450 chip */
static int mma8450_open(struct input_dev *input)
{}

static void mma8450_close(struct input_dev *input)
{}

/*
 * I2C init/probing/exit functions
 */
static int mma8450_probe(struct i2c_client *c)
{}

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

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

static struct i2c_driver mma8450_driver =;

module_i2c_driver();

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