#include <linux/bits.h>
#include <linux/completion.h>
#include <linux/device.h>
#include <linux/iopoll.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/units.h>
#define I2C_LS2X_PRER …
#define I2C_LS2X_CTR …
#define I2C_LS2X_TXR …
#define I2C_LS2X_RXR …
#define I2C_LS2X_CR …
#define I2C_LS2X_SR …
#define LS2X_CR_START …
#define LS2X_CR_STOP …
#define LS2X_CR_READ …
#define LS2X_CR_WRITE …
#define LS2X_CR_ACK …
#define LS2X_CR_IACK …
#define LS2X_SR_NOACK …
#define LS2X_SR_BUSY …
#define LS2X_SR_AL …
#define LS2X_SR_TIP …
#define LS2X_SR_IF …
#define LS2X_CTR_EN …
#define LS2X_CTR_IEN …
#define LS2X_CTR_MST …
#define CTR_FREQ_MASK …
#define CTR_READY_MASK …
#define LS2X_I2C_PCLK_FREQ …
#define LS2X_I2C_FREQ_STD …
struct ls2x_i2c_priv { … };
static irqreturn_t ls2x_i2c_isr(int this_irq, void *dev_id)
{ … }
static void ls2x_i2c_adjust_bus_speed(struct ls2x_i2c_priv *priv)
{ … }
static void ls2x_i2c_init(struct ls2x_i2c_priv *priv)
{ … }
static int ls2x_i2c_xfer_byte(struct ls2x_i2c_priv *priv, u8 txdata, u8 *rxdatap)
{ … }
static int ls2x_i2c_send_byte(struct ls2x_i2c_priv *priv, u8 txdata)
{ … }
static int ls2x_i2c_stop(struct ls2x_i2c_priv *priv)
{ … }
static int ls2x_i2c_start(struct ls2x_i2c_priv *priv, struct i2c_msg *msgs)
{ … }
static int ls2x_i2c_rx(struct ls2x_i2c_priv *priv, struct i2c_msg *msg)
{ … }
static int ls2x_i2c_tx(struct ls2x_i2c_priv *priv, struct i2c_msg *msg)
{ … }
static int ls2x_i2c_xfer_one(struct ls2x_i2c_priv *priv,
struct i2c_msg *msg, bool stop)
{ … }
static int ls2x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
{ … }
static unsigned int ls2x_i2c_func(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm ls2x_i2c_algo = …;
static int ls2x_i2c_probe(struct platform_device *pdev)
{ … }
static int ls2x_i2c_suspend(struct device *dev)
{ … }
static int ls2x_i2c_resume(struct device *dev)
{ … }
static DEFINE_RUNTIME_DEV_PM_OPS(ls2x_i2c_pm_ops,
ls2x_i2c_suspend, ls2x_i2c_resume, NULL);
static const struct of_device_id ls2x_i2c_id_table[] = …;
MODULE_DEVICE_TABLE(of, ls2x_i2c_id_table);
static const struct acpi_device_id ls2x_i2c_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, ls2x_i2c_acpi_match);
static struct platform_driver ls2x_i2c_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;