diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-02 23:01:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-02 23:01:07 -0500 |
commit | 06f9a73ff9ef58a59af593c37020749816735789 (patch) | |
tree | 71dc2f9ced5fb58ccd4a2d148b707e1ec5e33c07 /drivers | |
parent | 25271d8c84dabd926bbf8727d2f6e90fcbce30b6 (diff) | |
parent | 4b57018dcd6418e18c08088c89f123da8a7bfc45 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Avoid tps6586x burst writes
mfd: Don't suspend WM8994 if the CODEC is not suspended
mfd: Fix DaVinci voice codec device name
mfd: Fix NULL pointer due to non-initialized ucb1x00-ts absinfo
mfd: Fix ASIC3 build with GENERIC_HARDIRQS_NO_DEPRECATED
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/asic3.c | 4 | ||||
-rw-r--r-- | drivers/mfd/davinci_voicecodec.c | 4 | ||||
-rw-r--r-- | drivers/mfd/tps6586x.c | 10 | ||||
-rw-r--r-- | drivers/mfd/ucb1x00-ts.c | 12 | ||||
-rw-r--r-- | drivers/mfd/wm8994-core.c | 18 |
5 files changed, 36 insertions, 12 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 6a1f94042612..c45e6305b26f 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -143,9 +143,9 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
143 | unsigned long flags; | 143 | unsigned long flags; |
144 | struct asic3 *asic; | 144 | struct asic3 *asic; |
145 | 145 | ||
146 | desc->chip->ack(irq); | 146 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
147 | 147 | ||
148 | asic = desc->handler_data; | 148 | asic = get_irq_data(irq); |
149 | 149 | ||
150 | for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) { | 150 | for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) { |
151 | u32 status; | 151 | u32 status; |
diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c index 33c923d215c7..fdd8a1b8bc67 100644 --- a/drivers/mfd/davinci_voicecodec.c +++ b/drivers/mfd/davinci_voicecodec.c | |||
@@ -118,12 +118,12 @@ static int __init davinci_vc_probe(struct platform_device *pdev) | |||
118 | 118 | ||
119 | /* Voice codec interface client */ | 119 | /* Voice codec interface client */ |
120 | cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL]; | 120 | cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL]; |
121 | cell->name = "davinci_vcif"; | 121 | cell->name = "davinci-vcif"; |
122 | cell->driver_data = davinci_vc; | 122 | cell->driver_data = davinci_vc; |
123 | 123 | ||
124 | /* Voice codec CQ93VC client */ | 124 | /* Voice codec CQ93VC client */ |
125 | cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL]; | 125 | cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL]; |
126 | cell->name = "cq93vc"; | 126 | cell->name = "cq93vc-codec"; |
127 | cell->driver_data = davinci_vc; | 127 | cell->driver_data = davinci_vc; |
128 | 128 | ||
129 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, | 129 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, |
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 627cf577b16d..e9018d1394ee 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
@@ -150,12 +150,12 @@ static inline int __tps6586x_write(struct i2c_client *client, | |||
150 | static inline int __tps6586x_writes(struct i2c_client *client, int reg, | 150 | static inline int __tps6586x_writes(struct i2c_client *client, int reg, |
151 | int len, uint8_t *val) | 151 | int len, uint8_t *val) |
152 | { | 152 | { |
153 | int ret; | 153 | int ret, i; |
154 | 154 | ||
155 | ret = i2c_smbus_write_i2c_block_data(client, reg, len, val); | 155 | for (i = 0; i < len; i++) { |
156 | if (ret < 0) { | 156 | ret = __tps6586x_write(client, reg + i, *(val + i)); |
157 | dev_err(&client->dev, "failed writings to 0x%02x\n", reg); | 157 | if (ret < 0) |
158 | return ret; | 158 | return ret; |
159 | } | 159 | } |
160 | 160 | ||
161 | return 0; | 161 | return 0; |
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 000cb414a78a..92b85e28a15e 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c | |||
@@ -385,12 +385,18 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) | |||
385 | idev->close = ucb1x00_ts_close; | 385 | idev->close = ucb1x00_ts_close; |
386 | 386 | ||
387 | __set_bit(EV_ABS, idev->evbit); | 387 | __set_bit(EV_ABS, idev->evbit); |
388 | __set_bit(ABS_X, idev->absbit); | ||
389 | __set_bit(ABS_Y, idev->absbit); | ||
390 | __set_bit(ABS_PRESSURE, idev->absbit); | ||
391 | 388 | ||
392 | input_set_drvdata(idev, ts); | 389 | input_set_drvdata(idev, ts); |
393 | 390 | ||
391 | ucb1x00_adc_enable(ts->ucb); | ||
392 | ts->x_res = ucb1x00_ts_read_xres(ts); | ||
393 | ts->y_res = ucb1x00_ts_read_yres(ts); | ||
394 | ucb1x00_adc_disable(ts->ucb); | ||
395 | |||
396 | input_set_abs_params(idev, ABS_X, 0, ts->x_res, 0, 0); | ||
397 | input_set_abs_params(idev, ABS_Y, 0, ts->y_res, 0, 0); | ||
398 | input_set_abs_params(idev, ABS_PRESSURE, 0, 0, 0, 0); | ||
399 | |||
394 | err = input_register_device(idev); | 400 | err = input_register_device(idev); |
395 | if (err) | 401 | if (err) |
396 | goto fail; | 402 | goto fail; |
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 41233c7fa581..f4016a075fd6 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -246,6 +246,16 @@ static int wm8994_suspend(struct device *dev) | |||
246 | struct wm8994 *wm8994 = dev_get_drvdata(dev); | 246 | struct wm8994 *wm8994 = dev_get_drvdata(dev); |
247 | int ret; | 247 | int ret; |
248 | 248 | ||
249 | /* Don't actually go through with the suspend if the CODEC is | ||
250 | * still active (eg, for audio passthrough from CP. */ | ||
251 | ret = wm8994_reg_read(wm8994, WM8994_POWER_MANAGEMENT_1); | ||
252 | if (ret < 0) { | ||
253 | dev_err(dev, "Failed to read power status: %d\n", ret); | ||
254 | } else if (ret & WM8994_VMID_SEL_MASK) { | ||
255 | dev_dbg(dev, "CODEC still active, ignoring suspend\n"); | ||
256 | return 0; | ||
257 | } | ||
258 | |||
249 | /* GPIO configuration state is saved here since we may be configuring | 259 | /* GPIO configuration state is saved here since we may be configuring |
250 | * the GPIO alternate functions even if we're not using the gpiolib | 260 | * the GPIO alternate functions even if we're not using the gpiolib |
251 | * driver for them. | 261 | * driver for them. |
@@ -261,6 +271,8 @@ static int wm8994_suspend(struct device *dev) | |||
261 | if (ret < 0) | 271 | if (ret < 0) |
262 | dev_err(dev, "Failed to save LDO registers: %d\n", ret); | 272 | dev_err(dev, "Failed to save LDO registers: %d\n", ret); |
263 | 273 | ||
274 | wm8994->suspended = true; | ||
275 | |||
264 | ret = regulator_bulk_disable(wm8994->num_supplies, | 276 | ret = regulator_bulk_disable(wm8994->num_supplies, |
265 | wm8994->supplies); | 277 | wm8994->supplies); |
266 | if (ret != 0) { | 278 | if (ret != 0) { |
@@ -276,6 +288,10 @@ static int wm8994_resume(struct device *dev) | |||
276 | struct wm8994 *wm8994 = dev_get_drvdata(dev); | 288 | struct wm8994 *wm8994 = dev_get_drvdata(dev); |
277 | int ret; | 289 | int ret; |
278 | 290 | ||
291 | /* We may have lied to the PM core about suspending */ | ||
292 | if (!wm8994->suspended) | ||
293 | return 0; | ||
294 | |||
279 | ret = regulator_bulk_enable(wm8994->num_supplies, | 295 | ret = regulator_bulk_enable(wm8994->num_supplies, |
280 | wm8994->supplies); | 296 | wm8994->supplies); |
281 | if (ret != 0) { | 297 | if (ret != 0) { |
@@ -298,6 +314,8 @@ static int wm8994_resume(struct device *dev) | |||
298 | if (ret < 0) | 314 | if (ret < 0) |
299 | dev_err(dev, "Failed to restore GPIO registers: %d\n", ret); | 315 | dev_err(dev, "Failed to restore GPIO registers: %d\n", ret); |
300 | 316 | ||
317 | wm8994->suspended = false; | ||
318 | |||
301 | return 0; | 319 | return 0; |
302 | } | 320 | } |
303 | #endif | 321 | #endif |