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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Synopsys DesignWare I2C adapter driver (master only).
 *
 * Based on the TI DAVINCI I2C adapter driver.
 *
 * Copyright (C) 2006 Texas Instruments.
 * Copyright (C) 2007 MontaVista Software Inc.
 * Copyright (C) 2009 Provigent Ltd.
 */
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/reset.h>

#include "i2c-designware-core.h"

#define AMD_TIMEOUT_MIN_US
#define AMD_TIMEOUT_MAX_US
#define AMD_MASTERCFG_MASK

static void i2c_dw_configure_fifo_master(struct dw_i2c_dev *dev)
{}

static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev)
{}

/**
 * i2c_dw_init_master() - Initialize the designware I2C master hardware
 * @dev: device private data
 *
 * This functions configures and enables the I2C master.
 * This function is called during I2C init function, and in case of timeout at
 * run time.
 */
static int i2c_dw_init_master(struct dw_i2c_dev *dev)
{}

static void i2c_dw_xfer_init(struct dw_i2c_dev *dev)
{}

static int i2c_dw_check_stopbit(struct dw_i2c_dev *dev)
{}

static int i2c_dw_status(struct dw_i2c_dev *dev)
{}

/*
 * Initiate and continue master read/write transaction with polling
 * based transfer routine afterward write messages into the Tx buffer.
 */
static int amd_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs, int num_msgs)
{}

/*
 * Initiate (and continue) low level master read/write transaction.
 * This function is only called from i2c_dw_isr, and pumping i2c_msg
 * messages into the tx buffer.  Even if the size of i2c_msg data is
 * longer than the size of the tx buffer, it handles everything.
 */
static void
i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
{}

static u8
i2c_dw_recv_len(struct dw_i2c_dev *dev, u8 len)
{}

static void
i2c_dw_read(struct dw_i2c_dev *dev)
{}

static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev)
{}

static void i2c_dw_process_transfer(struct dw_i2c_dev *dev, unsigned int stat)
{}

/*
 * Interrupt service routine. This gets called whenever an I2C master interrupt
 * occurs.
 */
static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id)
{}

static int i2c_dw_wait_transfer(struct dw_i2c_dev *dev)
{}

/*
 * Prepare controller for a transaction and call i2c_dw_xfer_msg.
 */
static int
i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
{}

static const struct i2c_algorithm i2c_dw_algo =;

static const struct i2c_adapter_quirks i2c_dw_quirks =;

void i2c_dw_configure_master(struct dw_i2c_dev *dev)
{}
EXPORT_SYMBOL_GPL();

static void i2c_dw_prepare_recovery(struct i2c_adapter *adap)
{}

static void i2c_dw_unprepare_recovery(struct i2c_adapter *adap)
{}

static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
{}

int i2c_dw_probe_master(struct dw_i2c_dev *dev)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();