linux/drivers/i2c/busses/i2c-at91-master.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  i2c Support for Atmel's AT91 Two-Wire Interface (TWI)
 *
 *  Copyright (C) 2011 Weinmann Medical GmbH
 *  Author: Nikolaus Voss <[email protected]>
 *
 *  Evolved from original work by:
 *  Copyright (C) 2004 Rick Bronson
 *  Converted to 2.6 by Andrew Victor <[email protected]>
 *
 *  Borrowed heavily from original work by:
 *  Copyright (C) 2000 Philip Edelbrock <[email protected]>
 */

#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)
{}

/*
 * Calculate symmetric clock as stated in datasheet:
 * twi_clk = F_MAIN / (2 * (cdiv * (1 << ckdiv) + offset))
 */
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)
{}

/*
 * The hardware can handle at most two messages concatenated by a
 * repeated start via it's internal address feature.
 */
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)
{}