[adm5120] add USB drivers for the NFS-101U/WU profiles
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1071-suspend-prelim1.patch.patch
1 From a3ce0f5da32538cdf96c1dc1d6dc8b7452b096d2 Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Sun, 13 Apr 2008 07:23:59 +0100
4 Subject: [PATCH] suspend-prelim1.patch
5
6 ---
7 drivers/i2c/chips/pcf50633.c | 5 +++++
8 drivers/i2c/i2c-core.c | 13 ++++++++++++-
9 drivers/mfd/glamo/glamo-core.c | 2 ++
10 3 files changed, 19 insertions(+), 1 deletions(-)
11
12 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
13 index fc1262e..e23c540 100644
14 --- a/drivers/i2c/chips/pcf50633.c
15 +++ b/drivers/i2c/chips/pcf50633.c
16 @@ -1901,6 +1901,9 @@ static int pcf50633_suspend(struct device *dev, pm_message_t state)
17 }
18 }
19
20 + /* turn off the backlight */
21 + __reg_write(pcf, PCF50633_REG_LEDENA, 0x00);
22 +
23 pcf->standby_regs.int1m = __reg_read(pcf, PCF50633_REG_INT1M);
24 pcf->standby_regs.int2m = __reg_read(pcf, PCF50633_REG_INT2M);
25 pcf->standby_regs.int3m = __reg_read(pcf, PCF50633_REG_INT3M);
26 @@ -1925,6 +1928,8 @@ static int pcf50633_resume(struct device *dev)
27
28 mutex_lock(&pcf->lock);
29
30 + __reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
31 +
32 /* Resume all saved registers that don't "survive" standby state */
33 __reg_write(pcf, PCF50633_REG_INT1M, pcf->standby_regs.int1m);
34 __reg_write(pcf, PCF50633_REG_INT2M, pcf->standby_regs.int2m);
35 diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
36 index 2c802de..405c957 100644
37 --- a/drivers/i2c/i2c-core.c
38 +++ b/drivers/i2c/i2c-core.c
39 @@ -1,4 +1,3 @@
40 -/* i2c-core.c - a device driver for the iic-bus interface */
41 /* ------------------------------------------------------------------------- */
42 /* Copyright (C) 1995-99 Simon G. Vogl
43
44 @@ -136,10 +135,16 @@ static int i2c_device_suspend(struct device * dev, pm_message_t mesg)
45
46 if (!dev->driver)
47 return 0;
48 +#if 0
49 driver = to_i2c_driver(dev->driver);
50 if (!driver->suspend)
51 return 0;
52 return driver->suspend(to_i2c_client(dev), mesg);
53 +#else
54 + if (!dev->driver->suspend)
55 + return 0;
56 + return dev->driver->suspend(dev, mesg);
57 +#endif
58 }
59
60 static int i2c_device_resume(struct device * dev)
61 @@ -148,10 +153,16 @@ static int i2c_device_resume(struct device * dev)
62
63 if (!dev->driver)
64 return 0;
65 +#if 0
66 driver = to_i2c_driver(dev->driver);
67 if (!driver->resume)
68 return 0;
69 return driver->resume(to_i2c_client(dev));
70 +#else
71 + if (!dev->driver->resume)
72 + return 0;
73 + return dev->driver->resume(dev);
74 +#endif
75 }
76
77 static void i2c_client_release(struct device *dev)
78 diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
79 index 8497de2..ffa4945 100644
80 --- a/drivers/mfd/glamo/glamo-core.c
81 +++ b/drivers/mfd/glamo/glamo-core.c
82 @@ -1125,11 +1125,13 @@ static int glamo_remove(struct platform_device *pdev)
83 #ifdef CONFIG_PM
84 static int glamo_suspend(struct platform_device *pdev, pm_message_t state)
85 {
86 + glamo_power(glamo_handle, GLAMO_POWER_SUSPEND);
87 return 0;
88 }
89
90 static int glamo_resume(struct platform_device *pdev)
91 {
92 + glamo_power(glamo_handle, GLAMO_POWER_ON);
93 return 0;
94 }
95 #else
96 --
97 1.5.6.5
98
This page took 0.045434 seconds and 5 git commands to generate.