Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)
OMAP: omap_device: only override _noirq methods, not normal suspend/resume
PM / Runtime: Correct documentation of pm_runtime_irq_safe()
ARM: mach-shmobile: sh7372 LCDC1 suspend fix
sh-sci / PM: Use power.irq_safe
PM: Use spinlock instead of mutex in clock management functions

Changed files
+30 -21
Documentation
arch
drivers
base
power
tty
serial
+1 -2
Documentation/power/runtime_pm.txt
··· 431 431 432 432 void pm_runtime_irq_safe(struct device *dev); 433 433 - set the power.irq_safe flag for the device, causing the runtime-PM 434 - suspend and resume callbacks (but not the idle callback) to be invoked 435 - with interrupts disabled 434 + callbacks to be invoked with interrupts off 436 435 437 436 void pm_runtime_mark_last_busy(struct device *dev); 438 437 - set the power.last_busy field to the current time
+1
arch/arm/mach-shmobile/board-ap4evb.c
··· 1412 1412 fsi_init_pm_clock(); 1413 1413 sh7372_pm_init(); 1414 1414 pm_clk_add(&fsi_device.dev, "spu2"); 1415 + pm_clk_add(&lcdc1_device.dev, "hdmi"); 1415 1416 } 1416 1417 1417 1418 static void __init ap4evb_timer_init(void)
+1
arch/arm/mach-shmobile/board-mackerel.c
··· 1588 1588 hdmi_init_pm_clock(); 1589 1589 sh7372_pm_init(); 1590 1590 pm_clk_add(&fsi_device.dev, "spu2"); 1591 + pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); 1591 1592 } 1592 1593 1593 1594 static void __init mackerel_timer_init(void)
+2
arch/arm/mach-shmobile/clock-sh7372.c
··· 655 655 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ 656 656 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ 657 657 658 + CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", 659 + &div6_reparent_clks[DIV6_HDMI]), 658 660 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), 659 661 CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), 660 662 CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),
+2 -1
arch/arm/plat-omap/omap_device.c
··· 622 622 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, 623 623 _od_runtime_idle) 624 624 USE_PLATFORM_PM_SLEEP_OPS 625 - SET_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq, _od_resume_noirq) 625 + .suspend_noirq = _od_suspend_noirq, 626 + .resume_noirq = _od_resume_noirq, 626 627 } 627 628 }; 628 629
+22 -18
drivers/base/power/clock_ops.c
··· 19 19 20 20 struct pm_clk_data { 21 21 struct list_head clock_list; 22 - struct mutex lock; 22 + spinlock_t lock; 23 23 }; 24 24 25 25 enum pce_status { ··· 73 73 } 74 74 } 75 75 76 - mutex_lock(&pcd->lock); 76 + spin_lock_irq(&pcd->lock); 77 77 list_add_tail(&ce->node, &pcd->clock_list); 78 - mutex_unlock(&pcd->lock); 78 + spin_unlock_irq(&pcd->lock); 79 79 return 0; 80 80 } 81 81 ··· 83 83 * __pm_clk_remove - Destroy PM clock entry. 84 84 * @ce: PM clock entry to destroy. 85 85 * 86 - * This routine must be called under the mutex protecting the PM list of clocks 87 - * corresponding the the @ce's device. 86 + * This routine must be called under the spinlock protecting the PM list of 87 + * clocks corresponding the the @ce's device. 88 88 */ 89 89 static void __pm_clk_remove(struct pm_clock_entry *ce) 90 90 { ··· 123 123 if (!pcd) 124 124 return; 125 125 126 - mutex_lock(&pcd->lock); 126 + spin_lock_irq(&pcd->lock); 127 127 128 128 list_for_each_entry(ce, &pcd->clock_list, node) { 129 129 if (!con_id && !ce->con_id) { ··· 137 137 } 138 138 } 139 139 140 - mutex_unlock(&pcd->lock); 140 + spin_unlock_irq(&pcd->lock); 141 141 } 142 142 143 143 /** ··· 158 158 } 159 159 160 160 INIT_LIST_HEAD(&pcd->clock_list); 161 - mutex_init(&pcd->lock); 161 + spin_lock_init(&pcd->lock); 162 162 dev->power.subsys_data = pcd; 163 163 return 0; 164 164 } ··· 181 181 182 182 dev->power.subsys_data = NULL; 183 183 184 - mutex_lock(&pcd->lock); 184 + spin_lock_irq(&pcd->lock); 185 185 186 186 list_for_each_entry_safe_reverse(ce, c, &pcd->clock_list, node) 187 187 __pm_clk_remove(ce); 188 188 189 - mutex_unlock(&pcd->lock); 189 + spin_unlock_irq(&pcd->lock); 190 190 191 191 kfree(pcd); 192 192 } ··· 220 220 { 221 221 struct pm_clk_data *pcd = __to_pcd(dev); 222 222 struct pm_clock_entry *ce; 223 + unsigned long flags; 223 224 224 225 dev_dbg(dev, "%s()\n", __func__); 225 226 226 227 if (!pcd) 227 228 return 0; 228 229 229 - mutex_lock(&pcd->lock); 230 + spin_lock_irqsave(&pcd->lock, flags); 230 231 231 232 list_for_each_entry_reverse(ce, &pcd->clock_list, node) { 232 233 if (ce->status == PCE_STATUS_NONE) ··· 239 238 } 240 239 } 241 240 242 - mutex_unlock(&pcd->lock); 241 + spin_unlock_irqrestore(&pcd->lock, flags); 243 242 244 243 return 0; 245 244 } ··· 252 251 { 253 252 struct pm_clk_data *pcd = __to_pcd(dev); 254 253 struct pm_clock_entry *ce; 254 + unsigned long flags; 255 255 256 256 dev_dbg(dev, "%s()\n", __func__); 257 257 258 258 if (!pcd) 259 259 return 0; 260 260 261 - mutex_lock(&pcd->lock); 261 + spin_lock_irqsave(&pcd->lock, flags); 262 262 263 263 list_for_each_entry(ce, &pcd->clock_list, node) { 264 264 if (ce->status == PCE_STATUS_NONE) ··· 271 269 } 272 270 } 273 271 274 - mutex_unlock(&pcd->lock); 272 + spin_unlock_irqrestore(&pcd->lock, flags); 275 273 276 274 return 0; 277 275 } ··· 346 344 { 347 345 struct pm_clk_data *pcd = __to_pcd(dev); 348 346 struct pm_clock_entry *ce; 347 + unsigned long flags; 349 348 350 349 dev_dbg(dev, "%s()\n", __func__); 351 350 ··· 354 351 if (!pcd || !dev->driver) 355 352 return 0; 356 353 357 - mutex_lock(&pcd->lock); 354 + spin_lock_irqsave(&pcd->lock, flags); 358 355 359 356 list_for_each_entry_reverse(ce, &pcd->clock_list, node) 360 357 clk_disable(ce->clk); 361 358 362 - mutex_unlock(&pcd->lock); 359 + spin_unlock_irqrestore(&pcd->lock, flags); 363 360 364 361 return 0; 365 362 } ··· 372 369 { 373 370 struct pm_clk_data *pcd = __to_pcd(dev); 374 371 struct pm_clock_entry *ce; 372 + unsigned long flags; 375 373 376 374 dev_dbg(dev, "%s()\n", __func__); 377 375 ··· 380 376 if (!pcd || !dev->driver) 381 377 return 0; 382 378 383 - mutex_lock(&pcd->lock); 379 + spin_lock_irqsave(&pcd->lock, flags); 384 380 385 381 list_for_each_entry(ce, &pcd->clock_list, node) 386 382 clk_enable(ce->clk); 387 383 388 - mutex_unlock(&pcd->lock); 384 + spin_unlock_irqrestore(&pcd->lock, flags); 389 385 390 386 return 0; 391 387 }
+1
drivers/tty/serial/sh-sci.c
··· 1913 1913 1914 1914 port->dev = &dev->dev; 1915 1915 1916 + pm_runtime_irq_safe(&dev->dev); 1916 1917 pm_runtime_enable(&dev->dev); 1917 1918 } 1918 1919