forked from torvalds/linux
-
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.
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/ker…
…nel/git/wsa/linux Pull i2c new drivers from Wolfram Sang: "Here is a pull request from i2c hoping for the "new driver" rule. Originally, I wanted to send this request during the merge window, but code checkers with very recent additions complained, so a few fixups were needed. So, some more time went by and I merged rc1 to get a stable base" So the "new driver" rule is really about drivers that people absolutely need for the kernel to work on new hardware, which is not so much the case for i2c. So I considered not pulling this, but eventually relented. Just for FYI: the whole (and only) point of "new drivers" is not that new drivers cannot regress things (they can, and they have - by triggering badly tested code on machines that never triggered that code before), but because they can bring to life machines that otherwise wouldn't be useful at all without the drivers. So the new driver rule is for essential things that actual consumers would care about, ie devices like networking or disk drivers that matter to normal people (not server people - they run old kernels anyway, so mainlining new drivers is irrelevant for them). * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: sun6-p2wi: fix call to snprintf i2c: rk3x: add NULL entry to the end of_device_id array i2c: sun6i-p2wi: use proper return value in probe i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support i2c: sunxi: add P2WI DT bindings documentation i2c: rk3x: add driver for Rockchip RK3xxx SoC I2C adapter
- Loading branch information
Showing
6 changed files
with
1,216 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
* Rockchip RK3xxx I2C controller | ||
|
||
This driver interfaces with the native I2C controller present in Rockchip | ||
RK3xxx SoCs. | ||
|
||
Required properties : | ||
|
||
- reg : Offset and length of the register set for the device | ||
- compatible : should be "rockchip,rk3066-i2c", "rockchip,rk3188-i2c" or | ||
"rockchip,rk3288-i2c". | ||
- interrupts : interrupt number | ||
- clocks : parent clock | ||
|
||
Required on RK3066, RK3188 : | ||
|
||
- rockchip,grf : the phandle of the syscon node for the general register | ||
file (GRF) | ||
- on those SoCs an alias with the correct I2C bus ID (bit offset in the GRF) | ||
is also required. | ||
|
||
Optional properties : | ||
|
||
- clock-frequency : SCL frequency to use (in Hz). If omitted, 100kHz is used. | ||
|
||
Example: | ||
|
||
aliases { | ||
i2c0 = &i2c0; | ||
} | ||
|
||
i2c0: i2c@2002d000 { | ||
compatible = "rockchip,rk3188-i2c"; | ||
reg = <0x2002d000 0x1000>; | ||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
rockchip,grf = <&grf>; | ||
|
||
clock-names = "i2c"; | ||
clocks = <&cru PCLK_I2C0>; | ||
}; |
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,41 @@ | ||
|
||
* Allwinner P2WI (Push/Pull 2 Wire Interface) controller | ||
|
||
Required properties : | ||
|
||
- reg : Offset and length of the register set for the device. | ||
- compatible : Should one of the following: | ||
- "allwinner,sun6i-a31-p2wi" | ||
- interrupts : The interrupt line connected to the P2WI peripheral. | ||
- clocks : The gate clk connected to the P2WI peripheral. | ||
- resets : The reset line connected to the P2WI peripheral. | ||
|
||
Optional properties : | ||
|
||
- clock-frequency : Desired P2WI bus clock frequency in Hz. If not set the | ||
default frequency is 100kHz | ||
|
||
A P2WI may contain one child node encoding a P2WI slave device. | ||
|
||
Slave device properties: | ||
Required properties: | ||
- reg : the I2C slave address used during the initialization | ||
process to switch from I2C to P2WI mode | ||
|
||
Example: | ||
|
||
p2wi@01f03400 { | ||
compatible = "allwinner,sun6i-a31-p2wi"; | ||
reg = <0x01f03400 0x400>; | ||
interrupts = <0 39 4>; | ||
clocks = <&apb0_gates 3>; | ||
clock-frequency = <6000000>; | ||
resets = <&apb0_rst 3>; | ||
|
||
axp221: pmic@68 { | ||
compatible = "x-powers,axp221"; | ||
reg = <0x68>; | ||
|
||
/* ... */ | ||
}; | ||
}; |
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.