linux/drivers/i2c/i2c-mux.c

/*
 * Multiplexed I2C bus driver.
 *
 * Copyright (c) 2008-2009 Rodolfo Giometti <[email protected]>
 * Copyright (c) 2008-2009 Eurotech S.p.A. <[email protected]>
 * Copyright (c) 2009-2010 NSN GmbH & Co KG <[email protected]>
 *
 * Simplifies access to complex multiplexed I2C bus topologies, by presenting
 * each multiplexed bus segment as an additional I2C adapter.
 * Supports multi-level mux'ing (mux behind a mux).
 *
 * Based on:
 *	i2c-virt.c from Kumar Gala <[email protected]>
 *	i2c-virtual.c from Ken Harrenstien, Copyright (c) 2004 Google, Inc.
 *	i2c-virtual.c from Brian Kuschak <[email protected]>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#include <linux/acpi.h>
#include <linux/i2c.h>
#include <linux/i2c-mux.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/sysfs.h>

/* multiplexer per channel data */
struct i2c_mux_priv {};

static int __i2c_mux_master_xfer(struct i2c_adapter *adap,
				 struct i2c_msg msgs[], int num)
{}

static int i2c_mux_master_xfer(struct i2c_adapter *adap,
			       struct i2c_msg msgs[], int num)
{}

static int __i2c_mux_smbus_xfer(struct i2c_adapter *adap,
				u16 addr, unsigned short flags,
				char read_write, u8 command,
				int size, union i2c_smbus_data *data)
{}

static int i2c_mux_smbus_xfer(struct i2c_adapter *adap,
			      u16 addr, unsigned short flags,
			      char read_write, u8 command,
			      int size, union i2c_smbus_data *data)
{}

/* Return the parent's functionality */
static u32 i2c_mux_functionality(struct i2c_adapter *adap)
{}

static void i2c_mux_lock_bus(struct i2c_adapter *adapter, unsigned int flags)
{}

static int i2c_mux_trylock_bus(struct i2c_adapter *adapter, unsigned int flags)
{}

static void i2c_mux_unlock_bus(struct i2c_adapter *adapter, unsigned int flags)
{}

static void i2c_parent_lock_bus(struct i2c_adapter *adapter,
				unsigned int flags)
{}

static int i2c_parent_trylock_bus(struct i2c_adapter *adapter,
				  unsigned int flags)
{}

static void i2c_parent_unlock_bus(struct i2c_adapter *adapter,
				  unsigned int flags)
{}

struct i2c_adapter *i2c_root_adapter(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent,
				   struct device *dev, int max_adapters,
				   int sizeof_priv, u32 flags,
				   int (*select)(struct i2c_mux_core *, u32),
				   int (*deselect)(struct i2c_mux_core *, u32))
{}
EXPORT_SYMBOL_GPL();

static const struct i2c_lock_operations i2c_mux_lock_ops =;

static const struct i2c_lock_operations i2c_parent_lock_ops =;

int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
			u32 force_nr, u32 chan_id)
{}
EXPORT_SYMBOL_GPL();

void i2c_mux_del_adapters(struct i2c_mux_core *muxc)
{}
EXPORT_SYMBOL_GPL();

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