#include <linux/fwnode.h>
#include <linux/i2c-atr.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#define ATR_MAX_ADAPTERS …
#define ATR_MAX_SYMLINK_LEN …
struct i2c_atr_alias_pair { … };
struct i2c_atr_chan { … };
struct i2c_atr { … };
static struct i2c_atr_alias_pair *
i2c_atr_find_mapping_by_client(const struct list_head *list,
const struct i2c_client *client)
{ … }
static struct i2c_atr_alias_pair *
i2c_atr_find_mapping_by_addr(const struct list_head *list, u16 phys_addr)
{ … }
static int i2c_atr_map_msgs(struct i2c_atr_chan *chan, struct i2c_msg *msgs,
int num)
{ … }
static void i2c_atr_unmap_msgs(struct i2c_atr_chan *chan, struct i2c_msg *msgs,
int num)
{ … }
static int i2c_atr_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num)
{ … }
static int i2c_atr_smbus_xfer(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write, u8 command,
int size, union i2c_smbus_data *data)
{ … }
static u32 i2c_atr_functionality(struct i2c_adapter *adap)
{ … }
static void i2c_atr_lock_bus(struct i2c_adapter *adapter, unsigned int flags)
{ … }
static int i2c_atr_trylock_bus(struct i2c_adapter *adapter, unsigned int flags)
{ … }
static void i2c_atr_unlock_bus(struct i2c_adapter *adapter, unsigned int flags)
{ … }
static const struct i2c_lock_operations i2c_atr_lock_ops = …;
static int i2c_atr_reserve_alias(struct i2c_atr *atr)
{ … }
static void i2c_atr_release_alias(struct i2c_atr *atr, u16 alias)
{ … }
static int i2c_atr_attach_client(struct i2c_adapter *adapter,
const struct i2c_client *client)
{ … }
static void i2c_atr_detach_client(struct i2c_adapter *adapter,
const struct i2c_client *client)
{ … }
static int i2c_atr_bus_notifier_call(struct notifier_block *nb,
unsigned long event, void *device)
{ … }
static int i2c_atr_parse_alias_pool(struct i2c_atr *atr)
{ … }
struct i2c_atr *i2c_atr_new(struct i2c_adapter *parent, struct device *dev,
const struct i2c_atr_ops *ops, int max_adapters)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void i2c_atr_delete(struct i2c_atr *atr)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int i2c_atr_add_adapter(struct i2c_atr *atr, u32 chan_id,
struct device *adapter_parent,
struct fwnode_handle *bus_handle)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void i2c_atr_del_adapter(struct i2c_atr *atr, u32 chan_id)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void i2c_atr_set_driver_data(struct i2c_atr *atr, void *data)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void *i2c_atr_get_driver_data(struct i2c_atr *atr)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;