[ar71xx] fix GPIO function select bit definitions (based on a patch by Jonas <jmajau...
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1088-fix-charging-deassert-host-power-1a-detect.patch.patch
1 From f78f3a4decb7e67b5349a2c088449342398d2114 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:01 +0100
4 Subject: [PATCH] fix-charging-deassert-host-power-1a-detect.patch
5
6 We don't take care to stop driving generated USB host power even
7 when we have a 1A charger connected on the same pins.
8
9 Signed-off-by: Andy Green <andy@openmoko.com>
10 ---
11 drivers/i2c/chips/pcf50633.c | 9 +++++++++
12 1 files changed, 9 insertions(+), 0 deletions(-)
13
14 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
15 index 91b9ac3..c14fad0 100644
16 --- a/drivers/i2c/chips/pcf50633.c
17 +++ b/drivers/i2c/chips/pcf50633.c
18 @@ -523,6 +523,15 @@ static void configure_pmu_for_charger(struct pcf50633_data *pcf,
19 break;
20 case CHARGER_TYPE_1A:
21 __reg_write(pcf, PCF50633_REG_MBCC7, PCF50633_MBCC7_USB_1000mA);
22 + /*
23 + * stop GPO / EN_HOSTUSB power driving out on the same
24 + * USB power pins we have a 1A charger on right now!
25 + */
26 + dev_info(&pcf->client.dev, "Charger -> CHARGER_TYPE_1A\n");
27 + __reg_write(pcf, PCF50633_GPO - PCF50633_GPIO1 +
28 + PCF50633_REG_GPIO1CFG,
29 + __reg_read(pcf, PCF50633_GPO - PCF50633_GPIO1 +
30 + PCF50633_REG_GPIO1CFG) & 0xf0);
31 break;
32 }
33 }
34 --
35 1.5.6.3
36
This page took 0.047278 seconds and 5 git commands to generate.