#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/greybus.h>
#include "gbphy.h"
struct gb_i2c_device { … };
static u32 gb_i2c_functionality_map(u32 gb_i2c_functionality)
{ … }
static int gb_i2c_device_setup(struct gb_i2c_device *gb_i2c_dev)
{ … }
static u16 gb_i2c_transfer_op_flags_map(u16 flags)
{ … }
static void
gb_i2c_fill_transfer_op(struct gb_i2c_transfer_op *op, struct i2c_msg *msg)
{ … }
static struct gb_operation *
gb_i2c_operation_create(struct gb_connection *connection,
struct i2c_msg *msgs, u32 msg_count)
{ … }
static void gb_i2c_decode_response(struct i2c_msg *msgs, u32 msg_count,
struct gb_i2c_transfer_response *response)
{ … }
static bool gb_i2c_expected_transfer_error(int errno)
{ … }
static int gb_i2c_transfer_operation(struct gb_i2c_device *gb_i2c_dev,
struct i2c_msg *msgs, u32 msg_count)
{ … }
static int gb_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int msg_count)
{ … }
static u32 gb_i2c_functionality(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm gb_i2c_algorithm = …;
static int gb_i2c_probe(struct gbphy_device *gbphy_dev,
const struct gbphy_device_id *id)
{ … }
static void gb_i2c_remove(struct gbphy_device *gbphy_dev)
{ … }
static const struct gbphy_device_id gb_i2c_id_table[] = …;
MODULE_DEVICE_TABLE(gbphy, gb_i2c_id_table);
static struct gbphy_driver i2c_driver = …;
module_gbphy_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;