this adds support for dynamically reprogramming the I2C controller's pin mux on transaction boundaries to enable one controller to be registered as multiple I2C bus adapters with the kernel. this allows platform designers an additional tool to resolve clock rate, I/O voltage and electrical loading restrictions between the platform's peripherals. the i2c-tegra platform data is extended to support this; platforms which use this feature should pass in the number of busses which should be created for each controller, the starting adapter number to use and the clock rate and pin mux for each virtual bus. Change-Id: I57a96deb7b7b793222ec3f8cc3a941917a023609 Signed-off-by: Gary King <gking@nvidia.com>
34 lines
961 B
C
34 lines
961 B
C
/*
|
|
* drivers/i2c/busses/i2c-tegra.c
|
|
*
|
|
* Copyright (C) 2010 Google, Inc.
|
|
* Author: Colin Cross <ccross@android.com>
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef _LINUX_I2C_TEGRA_H
|
|
#define _LINUX_I2C_TEGRA_H
|
|
|
|
#include <mach/pinmux.h>
|
|
|
|
#define TEGRA_I2C_MAX_BUS 3
|
|
|
|
struct tegra_i2c_platform_data {
|
|
int adapter_nr;
|
|
int bus_count;
|
|
const struct tegra_pingroup_config *bus_mux[TEGRA_I2C_MAX_BUS];
|
|
int bus_mux_len[TEGRA_I2C_MAX_BUS];
|
|
unsigned long bus_clk_rate[TEGRA_I2C_MAX_BUS];
|
|
bool is_dvc;
|
|
};
|
|
|
|
#endif /* _LINUX_I2C_TEGRA_H */
|