#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include "i2c-at91.h"
void at91_init_twi_bus_master(struct at91_twi_dev *dev)
{ … }
static void at91_calc_twi_clock(struct at91_twi_dev *dev)
{ … }
static void at91_twi_dma_cleanup(struct at91_twi_dev *dev)
{ … }
static void at91_twi_write_next_byte(struct at91_twi_dev *dev)
{ … }
static void at91_twi_write_data_dma_callback(void *data)
{ … }
static void at91_twi_write_data_dma(struct at91_twi_dev *dev)
{ … }
static void at91_twi_read_next_byte(struct at91_twi_dev *dev)
{ … }
static void at91_twi_read_data_dma_callback(void *data)
{ … }
static void at91_twi_read_data_dma(struct at91_twi_dev *dev)
{ … }
static irqreturn_t atmel_twi_interrupt(int irq, void *dev_id)
{ … }
static int at91_do_twi_transfer(struct at91_twi_dev *dev)
{ … }
static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
{ … }
static const struct i2c_adapter_quirks at91_twi_quirks = …;
static u32 at91_twi_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm at91_twi_algorithm = …;
static int at91_twi_configure_dma(struct at91_twi_dev *dev, u32 phy_addr)
{ … }
static int at91_init_twi_recovery_gpio(struct platform_device *pdev,
struct at91_twi_dev *dev)
{ … }
static int at91_twi_recover_bus_cmd(struct i2c_adapter *adap)
{ … }
static int at91_init_twi_recovery_info(struct platform_device *pdev,
struct at91_twi_dev *dev)
{ … }
int at91_twi_probe_master(struct platform_device *pdev,
u32 phy_addr, struct at91_twi_dev *dev)
{ … }