mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-19 19:14:01 +08:00
ASoC: da9055: Add DT support for CODEC
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
07b0e5b102
commit
9f10b36ffd
22
Documentation/devicetree/bindings/sound/da9055.txt
Normal file
22
Documentation/devicetree/bindings/sound/da9055.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
* Dialog DA9055 Audio CODEC
|
||||||
|
|
||||||
|
DA9055 provides Audio CODEC support (I2C only).
|
||||||
|
|
||||||
|
The Audio CODEC device in DA9055 has it's own I2C address which is configurable,
|
||||||
|
so the device is instantiated separately from the PMIC (MFD) device.
|
||||||
|
|
||||||
|
For details on accompanying PMIC I2C device, see the following:
|
||||||
|
Documentation/devicetree/bindings/mfd/da9055.txt
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible: "dlg,da9055-codec"
|
||||||
|
- reg: Specifies the I2C slave address
|
||||||
|
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
codec: da9055-codec@1a {
|
||||||
|
compatible = "dlg,da9055-codec";
|
||||||
|
reg = <0x1a>;
|
||||||
|
};
|
@ -18,6 +18,8 @@
|
|||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_device.h>
|
||||||
#include <sound/pcm.h>
|
#include <sound/pcm.h>
|
||||||
#include <sound/pcm_params.h>
|
#include <sound/pcm_params.h>
|
||||||
#include <sound/soc.h>
|
#include <sound/soc.h>
|
||||||
@ -1536,11 +1538,17 @@ static const struct i2c_device_id da9055_i2c_id[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
|
MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
|
||||||
|
|
||||||
|
static const struct of_device_id da9055_of_match[] = {
|
||||||
|
{ .compatible = "dlg,da9055-codec", },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
/* I2C codec control layer */
|
/* I2C codec control layer */
|
||||||
static struct i2c_driver da9055_i2c_driver = {
|
static struct i2c_driver da9055_i2c_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "da9055-codec",
|
.name = "da9055-codec",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
.of_match_table = of_match_ptr(da9055_of_match),
|
||||||
},
|
},
|
||||||
.probe = da9055_i2c_probe,
|
.probe = da9055_i2c_probe,
|
||||||
.remove = da9055_remove,
|
.remove = da9055_remove,
|
||||||
|
Loading…
Reference in New Issue
Block a user