-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'asoc/topic/cs42xx8' into asoc-next
- Loading branch information
Showing
6 changed files
with
946 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CS42448/CS42888 audio CODEC | ||
|
||
Required properties: | ||
|
||
- compatible : must contain one of "cirrus,cs42448" and "cirrus,cs42888" | ||
|
||
- reg : the I2C address of the device for I2C | ||
|
||
- clocks : a list of phandles + clock-specifiers, one for each entry in | ||
clock-names | ||
|
||
- clock-names : must contain "mclk" | ||
|
||
- VA-supply, VD-supply, VLS-supply, VLC-supply: power supplies for the device, | ||
as covered in Documentation/devicetree/bindings/regulator/regulator.txt | ||
|
||
Example: | ||
|
||
codec: cs42888@48 { | ||
compatible = "cirrus,cs42888"; | ||
reg = <0x48>; | ||
clocks = <&codec_mclk 0>; | ||
clock-names = "mclk"; | ||
VA-supply = <®_audio>; | ||
VD-supply = <®_audio>; | ||
VLS-supply = <®_audio>; | ||
VLC-supply = <®_audio>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* 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) | ||
{ | ||
u32 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) | ||
{ | ||
snd_soc_unregister_codec(&i2c->dev); | ||
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", | ||
.owner = THIS_MODULE, | ||
.pm = &cs42xx8_pm, | ||
}, | ||
.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"); |
Oops, something went wrong.