#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <soc/tegra/bpmp-abi.h>
#include <soc/tegra/bpmp.h>
#define SERIALI2C_HDR_SIZE …
struct tegra_bpmp_i2c { … };
static void tegra_bpmp_xlate_flags(u16 flags, u16 *out)
{ … }
static void tegra_bpmp_serialize_i2c_msg(struct tegra_bpmp_i2c *i2c,
struct mrq_i2c_request *request,
struct i2c_msg *msgs,
unsigned int num)
{ … }
static int tegra_bpmp_i2c_deserialize(struct tegra_bpmp_i2c *i2c,
struct mrq_i2c_response *response,
struct i2c_msg *msgs,
unsigned int num)
{ … }
static int tegra_bpmp_i2c_msg_len_check(struct i2c_msg *msgs, unsigned int num)
{ … }
static int tegra_bpmp_i2c_msg_xfer(struct tegra_bpmp_i2c *i2c,
struct mrq_i2c_request *request,
struct mrq_i2c_response *response,
bool atomic)
{ … }
static int tegra_bpmp_i2c_xfer_common(struct i2c_adapter *adapter,
struct i2c_msg *msgs, int num,
bool atomic)
{ … }
static int tegra_bpmp_i2c_xfer(struct i2c_adapter *adapter,
struct i2c_msg *msgs, int num)
{ … }
static int tegra_bpmp_i2c_xfer_atomic(struct i2c_adapter *adapter,
struct i2c_msg *msgs, int num)
{ … }
static u32 tegra_bpmp_i2c_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm tegra_bpmp_i2c_algo = …;
static int tegra_bpmp_i2c_probe(struct platform_device *pdev)
{ … }
static void tegra_bpmp_i2c_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id tegra_bpmp_i2c_of_match[] = …;
MODULE_DEVICE_TABLE(of, tegra_bpmp_i2c_of_match);
static struct platform_driver tegra_bpmp_i2c_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;