Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242477
b: refs/heads/master
c: 0b4cf18
h: refs/heads/master
i:
  242475: 0686a49
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Ralf Baechle committed Mar 25, 2011
1 parent 8082686 commit b774a5e
Show file tree
Hide file tree
Showing 2 changed files with 25 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: 1bbf28756149a0aa0e3c8a74cea9bbe715639027
refs/heads/master: 0b4cf1813f54d708b18c639260fc13dc3d922e96
24 changes: 24 additions & 0 deletions trunk/arch/mips/jz4740/board-qi_lb60.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/spi/spi_gpio.h>
#include <linux/power_supply.h>
#include <linux/power/jz4740-battery.h>
#include <linux/power/gpio-charger.h>

#include <asm/mach-jz4740/jz4740_fb.h>
#include <asm/mach-jz4740/jz4740_mmc.h>
Expand Down Expand Up @@ -396,6 +397,28 @@ static struct platform_device qi_lb60_pwm_beeper = {
},
};

/* charger */
static char *qi_lb60_batteries[] = {
"battery",
};

static struct gpio_charger_platform_data qi_lb60_charger_pdata = {
.name = "usb",
.type = POWER_SUPPLY_TYPE_USB,
.gpio = JZ_GPIO_PORTD(28),
.gpio_active_low = 1,
.supplied_to = qi_lb60_batteries,
.num_supplicants = ARRAY_SIZE(qi_lb60_batteries),
};

static struct platform_device qi_lb60_charger_device = {
.name = "gpio-charger",
.dev = {
.platform_data = &qi_lb60_charger_pdata,
},
};


static struct platform_device *jz_platform_devices[] __initdata = {
&jz4740_udc_device,
&jz4740_mmc_device,
Expand All @@ -410,6 +433,7 @@ static struct platform_device *jz_platform_devices[] __initdata = {
&jz4740_adc_device,
&qi_lb60_gpio_keys,
&qi_lb60_pwm_beeper,
&qi_lb60_charger_device,
};

static void __init board_gpio_setup(void)
Expand Down

0 comments on commit b774a5e

Please sign in to comment.