Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260637
b: refs/heads/master
c: a140b92
h: refs/heads/master
i:
  260635: 1fb32e8
v: v3
  • Loading branch information
MyungJoo Ham authored and Kukjin Kim committed Jul 20, 2011
1 parent c9290b4 commit d07ad60
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29dee863d5626a35354bb23d652011e457c935a4
refs/heads/master: a140b92ef398153c85ee1c697db0a1be210e9677
33 changes: 33 additions & 0 deletions trunk/arch/arm/mach-exynos4/mach-nuri.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
#include <linux/input.h>
#include <linux/i2c.h>
#include <linux/i2c/atmel_mxt_ts.h>
#include <linux/i2c-gpio.h>
#include <linux/gpio_keys.h>
#include <linux/gpio.h>
#include <linux/power/max17042_battery.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/mfd/max8997.h>
Expand Down Expand Up @@ -955,6 +957,29 @@ static struct i2c_board_info i2c5_devs[] __initdata = {
},
};

static struct max17042_platform_data nuri_battery_platform_data = {
};

/* GPIO I2C 9 (Fuel Gauge) */
static struct i2c_gpio_platform_data i2c9_gpio_data = {
.sda_pin = EXYNOS4_GPY4(0), /* XM0ADDR_8 */
.scl_pin = EXYNOS4_GPY4(1), /* XM0ADDR_9 */
};
static struct platform_device i2c9_gpio = {
.name = "i2c-gpio",
.id = 9,
.dev = {
.platform_data = &i2c9_gpio_data,
},
};
enum { I2C9_MAX17042};
static struct i2c_board_info i2c9_devs[] __initdata = {
[I2C9_MAX17042] = {
I2C_BOARD_INFO("max17042", 0x36),
.platform_data = &nuri_battery_platform_data,
},
};

static void __init nuri_power_init(void)
{
int gpio;
Expand All @@ -967,6 +992,11 @@ static void __init nuri_power_init(void)
gpio_request(gpio, "AP_PMIC_IRQ");
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);

gpio = EXYNOS4_GPX2(3);
gpio_request(gpio, "FUEL_ALERT");
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
}

/* USB EHCI */
Expand All @@ -990,6 +1020,7 @@ static struct platform_device *nuri_devices[] __initdata = {
&s3c_device_timer[0],
&s5p_device_ehci,
&s3c_device_i2c3,
&i2c9_gpio,

/* NURI Devices */
&nuri_gpio_keys,
Expand All @@ -1016,6 +1047,8 @@ static void __init nuri_machine_init(void)
s3c_i2c5_set_platdata(NULL);
i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));

nuri_ehci_init();
clk_xusbxti.rate = 24000000;
Expand Down

0 comments on commit d07ad60

Please sign in to comment.