-
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: 258719 b: refs/heads/master c: a53b8e3 h: refs/heads/master i: 258717: c06f91b 258715: 9783961 258711: 654d789 258703: d7bebcc 258687: c6c2613 v: v3
- Loading branch information
Peter Ujfalusi
committed
Jul 4, 2011
1 parent
b00bd0f
commit 8d2c02f
Showing
9 changed files
with
94 additions
and
50 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: fd1ee39151f397730a2b23d14fb232c098743f4b | ||
refs/heads/master: a53b8e3b995f8b7c8a8c4ef5aa367958e46139b3 |
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
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,46 @@ | ||
/* | ||
* twl-common.c | ||
* | ||
* Copyright (C) 2011 Texas Instruments, Inc.. | ||
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* version 2 as published by the Free Software Foundation. | ||
* | ||
* 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. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA | ||
* | ||
*/ | ||
|
||
#include <linux/i2c.h> | ||
#include <linux/i2c/twl.h> | ||
#include <linux/gpio.h> | ||
|
||
#include <plat/i2c.h> | ||
|
||
#include "twl-common.h" | ||
|
||
static struct i2c_board_info __initdata pmic_i2c_board_info = { | ||
.addr = 0x48, | ||
.flags = I2C_CLIENT_WAKE, | ||
}; | ||
|
||
void __init omap_pmic_init(int bus, u32 clkrate, | ||
const char *pmic_type, int pmic_irq, | ||
struct twl4030_platform_data *pmic_data) | ||
{ | ||
strncpy(pmic_i2c_board_info.type, pmic_type, | ||
sizeof(pmic_i2c_board_info.type)); | ||
pmic_i2c_board_info.irq = pmic_irq; | ||
pmic_i2c_board_info.platform_data = pmic_data; | ||
|
||
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | ||
} |
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,28 @@ | ||
#ifndef __OMAP_PMIC_COMMON__ | ||
#define __OMAP_PMIC_COMMON__ | ||
|
||
struct twl4030_platform_data; | ||
|
||
void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | ||
struct twl4030_platform_data *pmic_data); | ||
|
||
static inline void omap2_pmic_init(const char *pmic_type, | ||
struct twl4030_platform_data *pmic_data) | ||
{ | ||
omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); | ||
} | ||
|
||
static inline void omap3_pmic_init(const char *pmic_type, | ||
struct twl4030_platform_data *pmic_data) | ||
{ | ||
omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); | ||
} | ||
|
||
static inline void omap4_pmic_init(const char *pmic_type, | ||
struct twl4030_platform_data *pmic_data) | ||
{ | ||
/* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */ | ||
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); | ||
} | ||
|
||
#endif /* __OMAP_PMIC_COMMON__ */ |
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