mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
		
			
				
	
	
		
			63 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * Cirrus Logic CS42448/CS42888 Audio CODEC DAI I2C driver
 | 
						|
 *
 | 
						|
 * Copyright (C) 2014 Freescale Semiconductor, Inc.
 | 
						|
 *
 | 
						|
 * Author: Nicolin Chen <Guangyu.Chen@freescale.com>
 | 
						|
 *
 | 
						|
 * This file is licensed under the terms of the GNU General Public License
 | 
						|
 * version 2. This program is licensed "as is" without any warranty of any
 | 
						|
 * kind, whether express or implied.
 | 
						|
 */
 | 
						|
 | 
						|
#include <linux/i2c.h>
 | 
						|
#include <linux/module.h>
 | 
						|
#include <linux/pm_runtime.h>
 | 
						|
#include <sound/soc.h>
 | 
						|
 | 
						|
#include "cs42xx8.h"
 | 
						|
 | 
						|
static int cs42xx8_i2c_probe(struct i2c_client *i2c,
 | 
						|
			     const struct i2c_device_id *id)
 | 
						|
{
 | 
						|
	int ret = cs42xx8_probe(&i2c->dev,
 | 
						|
			devm_regmap_init_i2c(i2c, &cs42xx8_regmap_config));
 | 
						|
	if (ret)
 | 
						|
		return ret;
 | 
						|
 | 
						|
	pm_runtime_enable(&i2c->dev);
 | 
						|
	pm_request_idle(&i2c->dev);
 | 
						|
 | 
						|
	return 0;
 | 
						|
}
 | 
						|
 | 
						|
static int cs42xx8_i2c_remove(struct i2c_client *i2c)
 | 
						|
{
 | 
						|
	pm_runtime_disable(&i2c->dev);
 | 
						|
 | 
						|
	return 0;
 | 
						|
}
 | 
						|
 | 
						|
static struct i2c_device_id cs42xx8_i2c_id[] = {
 | 
						|
	{"cs42448", (kernel_ulong_t)&cs42448_data},
 | 
						|
	{"cs42888", (kernel_ulong_t)&cs42888_data},
 | 
						|
	{}
 | 
						|
};
 | 
						|
MODULE_DEVICE_TABLE(i2c, cs42xx8_i2c_id);
 | 
						|
 | 
						|
static struct i2c_driver cs42xx8_i2c_driver = {
 | 
						|
	.driver = {
 | 
						|
		.name = "cs42xx8",
 | 
						|
		.pm = &cs42xx8_pm,
 | 
						|
		.of_match_table = cs42xx8_of_match,
 | 
						|
	},
 | 
						|
	.probe = cs42xx8_i2c_probe,
 | 
						|
	.remove = cs42xx8_i2c_remove,
 | 
						|
	.id_table = cs42xx8_i2c_id,
 | 
						|
};
 | 
						|
 | 
						|
module_i2c_driver(cs42xx8_i2c_driver);
 | 
						|
 | 
						|
MODULE_DESCRIPTION("Cirrus Logic CS42448/CS42888 ALSA SoC Codec I2C Driver");
 | 
						|
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
 | 
						|
MODULE_LICENSE("GPL");
 |