-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 229064 b: refs/heads/master c: 7bc4a4c h: refs/heads/master v: v3
- Loading branch information
Linus Torvalds
committed
Jan 11, 2011
1 parent
89b128c
commit e406c3d
Showing
482 changed files
with
41,519 additions
and
23,851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 92f1c008ae79e32b83c0607d184b194f302bb3ee | ||
refs/heads/master: 7bc4a4ce68f8c6d064ea949446852e996526f692 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Kernel driver gpio-i2cmux | ||
|
||
Author: Peter Korsgaard <peter.korsgaard@barco.com> | ||
|
||
Description | ||
----------- | ||
|
||
gpio-i2cmux is an i2c mux driver providing access to I2C bus segments | ||
from a master I2C bus and a hardware MUX controlled through GPIO pins. | ||
|
||
E.G.: | ||
|
||
---------- ---------- Bus segment 1 - - - - - | ||
| | SCL/SDA | |-------------- | | | ||
| |------------| | | ||
| | | | Bus segment 2 | | | ||
| Linux | GPIO 1..N | MUX |--------------- Devices | ||
| |------------| | | | | ||
| | | | Bus segment M | ||
| | | |---------------| | | ||
---------- ---------- - - - - - | ||
|
||
SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M | ||
according to the settings of the GPIO pins 1..N. | ||
|
||
Usage | ||
----- | ||
|
||
gpio-i2cmux uses the platform bus, so you need to provide a struct | ||
platform_device with the platform_data pointing to a struct | ||
gpio_i2cmux_platform_data with the I2C adapter number of the master | ||
bus, the number of bus segments to create and the GPIO pins used | ||
to control it. See include/linux/gpio-i2cmux.h for details. | ||
|
||
E.G. something like this for a MUX providing 4 bus segments | ||
controlled through 3 GPIO pins: | ||
|
||
#include <linux/gpio-i2cmux.h> | ||
#include <linux/platform_device.h> | ||
|
||
static const unsigned myboard_gpiomux_gpios[] = { | ||
AT91_PIN_PC26, AT91_PIN_PC25, AT91_PIN_PC24 | ||
}; | ||
|
||
static const unsigned myboard_gpiomux_values[] = { | ||
0, 1, 2, 3 | ||
}; | ||
|
||
static struct gpio_i2cmux_platform_data myboard_i2cmux_data = { | ||
.parent = 1, | ||
.base_nr = 2, /* optional */ | ||
.values = myboard_gpiomux_values, | ||
.n_values = ARRAY_SIZE(myboard_gpiomux_values), | ||
.gpios = myboard_gpiomux_gpios, | ||
.n_gpios = ARRAY_SIZE(myboard_gpiomux_gpios), | ||
.idle = 4, /* optional */ | ||
}; | ||
|
||
static struct platform_device myboard_i2cmux = { | ||
.name = "gpio-i2cmux", | ||
.id = 0, | ||
.dev = { | ||
.platform_data = &myboard_i2cmux_data, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* include/asm-arm/arch-tegra/include/mach/sdhci.h | ||
* | ||
* Copyright (C) 2009 Palm, Inc. | ||
* Author: Yvonne Yip <y@palm.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 __ASM_ARM_ARCH_TEGRA_SDHCI_H | ||
#define __ASM_ARM_ARCH_TEGRA_SDHCI_H | ||
|
||
#include <linux/mmc/host.h> | ||
|
||
struct tegra_sdhci_platform_data { | ||
int cd_gpio; | ||
int wp_gpio; | ||
int power_gpio; | ||
int is_8bit; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.