mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	soundwire: master: enable pm runtime
The hierarchy of soundwire devices is platform device -> M device -> S device. A S device is physically attached on the platform device. So the platform device should be resumed when a S device is resumed. As the bridge of platform device and S device, we have to implement runtime pm on M driver. We have set runtime pm ops in M driver already, but still need to enable runtime pm. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20200726215945.3119-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
		
							parent
							
								
									9123e3a74e
								
							
						
					
					
						commit
						bd84256e86
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -154,6 +154,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent,
 | 
			
		|||
	bus->dev = &md->dev;
 | 
			
		||||
	bus->md = md;
 | 
			
		||||
 | 
			
		||||
	pm_runtime_enable(&bus->md->dev);
 | 
			
		||||
device_register_err:
 | 
			
		||||
	return ret;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -166,6 +167,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent,
 | 
			
		|||
 */
 | 
			
		||||
int sdw_master_device_del(struct sdw_bus *bus)
 | 
			
		||||
{
 | 
			
		||||
	pm_runtime_disable(&bus->md->dev);
 | 
			
		||||
	device_unregister(bus->dev);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue