linux/drivers/i2c/busses/i2c-rzv2m.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Driver for the Renesas RZ/V2M I2C unit
 *
 * Copyright (C) 2016-2022 Renesas Electronics Corporation
 */

#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/i2c.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>

/* Register offsets */
#define IICB0DAT
#define IICB0CTL0
#define IICB0TRG
#define IICB0STR0
#define IICB0CTL1
#define IICB0WL
#define IICB0WH

/* IICB0CTL0 */
#define IICB0IICE
#define IICB0SLWT
#define IICB0SLAC

/* IICB0TRG */
#define IICB0WRET
#define IICB0STT
#define IICB0SPT

/* IICB0STR0 */
#define IICB0SSAC
#define IICB0SSBS
#define IICB0SSSP

/* IICB0CTL1 */
#define IICB0MDSC
#define IICB0SLSE

struct rzv2m_i2c_priv {};

enum bcr_index {};

struct bitrate_config {};

static const struct bitrate_config bitrate_configs[] =;

static inline void bit_setl(void __iomem *addr, u32 val)
{}

static inline void bit_clrl(void __iomem *addr, u32 val)
{}

static irqreturn_t rzv2m_i2c_tia_irq_handler(int this_irq, void *dev_id)
{}

/* Calculate IICB0WL and IICB0WH */
static int rzv2m_i2c_clock_calculate(struct device *dev,
				     struct rzv2m_i2c_priv *priv)
{}

static void rzv2m_i2c_init(struct rzv2m_i2c_priv *priv)
{}

static int rzv2m_i2c_write_with_ack(struct rzv2m_i2c_priv *priv, u32 data)
{}

static int rzv2m_i2c_read_with_ack(struct rzv2m_i2c_priv *priv, u8 *data,
				   bool last)
{}

static int rzv2m_i2c_send(struct rzv2m_i2c_priv *priv, struct i2c_msg *msg,
			  unsigned int *count)
{}

static int rzv2m_i2c_receive(struct rzv2m_i2c_priv *priv, struct i2c_msg *msg,
			     unsigned int *count)
{}

static int rzv2m_i2c_send_address(struct rzv2m_i2c_priv *priv,
				  struct i2c_msg *msg)
{}

static int rzv2m_i2c_stop_condition(struct rzv2m_i2c_priv *priv)
{}

static int rzv2m_i2c_xfer_msg(struct rzv2m_i2c_priv *priv,
			      struct i2c_msg *msg, int stop)
{}

static int rzv2m_i2c_xfer(struct i2c_adapter *adap,
			  struct i2c_msg *msgs, int num)
{}

static u32 rzv2m_i2c_func(struct i2c_adapter *adap)
{}

static int rzv2m_i2c_disable(struct device *dev, struct rzv2m_i2c_priv *priv)
{}

static const struct i2c_adapter_quirks rzv2m_i2c_quirks =;

static struct i2c_algorithm rzv2m_i2c_algo =;

static int rzv2m_i2c_probe(struct platform_device *pdev)
{}

static void rzv2m_i2c_remove(struct platform_device *pdev)
{}

static int rzv2m_i2c_suspend(struct device *dev)
{}

static int rzv2m_i2c_resume(struct device *dev)
{}

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

static const struct dev_pm_ops rzv2m_i2c_pm_ops =;

static struct platform_driver rzv2m_i2c_driver =;
module_platform_driver();

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