{
struct rt3261_priv *rt3261;
int ret;
+ char reg;
- rt3261 = kzalloc(sizeof(struct rt3261_priv), GFP_KERNEL);
+ reg = RT3261_VENDOR_ID;
+ ret = i2c_master_recv(i2c, ®, 1);
+ if (ret < 0){
+ printk("rt3261 && rt3224 probe error\n");
+ return ret;
+ }
+
+ rt3261 = devm_kzalloc(&i2c->dev,sizeof(struct rt3261_priv), GFP_KERNEL);
if (NULL == rt3261)
return -ENOMEM;
-
rt3261->i2c = i2c;
ret = rt3261_parse_dt_property(&i2c->dev, rt3261);
DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__);
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt3261,
rt3261_dai, ARRAY_SIZE(rt3261_dai));
- if (ret < 0)
- kfree(rt3261);
return ret;
}
enum of_gpio_flags flags;
int ret;
- printk("%s()\n", __FUNCTION__);
-
if (!node) {
printk("%s() dev->of_node is NULL\n", __FUNCTION__);
return -ENODEV;
{
struct rt5616_priv *rt5616;
int ret;
- printk("enter %s\n",__func__);
+ char reg;
- rt5616 = kzalloc(sizeof(struct rt5616_priv), GFP_KERNEL);
+ reg = RT5616_HP_VOL;
+ ret = i2c_master_recv(i2c, ®, 1);
+ if (ret < 0){
+ printk("RT5616 probe error\n");
+ return ret;
+ }
+
+ rt5616 = devm_kzalloc(&i2c->dev,sizeof(struct rt5616_priv), GFP_KERNEL);
if (NULL == rt5616)
return -ENOMEM;
rt5616_dai, ARRAY_SIZE(rt5616_dai));
err_r:
- if (ret < 0)
- kfree(rt5616);
return ret;
}
static int __init rt5616_modinit(void)
{
- printk("enter %s\n",__func__);
return i2c_add_driver(&rt5616_i2c_driver);
}
module_init(rt5616_modinit);
struct rt5631_priv *rt5631;
struct device_node *node = i2c->dev.of_node;
int ret;
+ char reg;
printk("RT5631 Audio Codec %s\n", RT5631_VERSION);
- rt5631 = kzalloc(sizeof(struct rt5631_priv), GFP_KERNEL);
+ reg = RT5631_SPK_OUT_VOL;
+ ret = i2c_master_recv(i2c, ®, 1);
+ if (ret < 0){
+ printk("RT5631 probe error\n");
+ return ret;
+ }
+
+ rt5631 = devm_kzalloc(&i2c->dev,sizeof(struct rt5631_priv), GFP_KERNEL);
if (NULL == rt5631)
return -ENOMEM;
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5631,
rt5631_dai, ARRAY_SIZE(rt5631_dai));
- if (ret < 0)
- kfree(rt5631);
return ret;
}
obj-$(CONFIG_SND_RK_SOC_AIC3262) += snd-soc-aic3262.o
obj-$(CONFIG_SND_RK_SOC_RK610) += snd-soc-rk610.o
obj-$(CONFIG_SND_RK_SOC_RK616) += snd-soc-rk616.o
-obj-$(CONFIG_SND_RK_SOC_HDMI_I2S) += snd-soc-hdmi-i2s.o
-obj-$(CONFIG_SND_RK_SOC_HDMI_SPDIF) += snd-soc-hdmi-spdif.o
obj-$(CONFIG_SND_RK_SOC_RK2928) += snd-soc-rk2928.o
obj-$(CONFIG_SND_RK_SOC_ES8323) += snd-soc-es8323.o
obj-$(CONFIG_SND_RK_SOC_RK3026) += snd-soc-rk3026.o
obj-$(CONFIG_SND_RK_SOC_RK3190) += snd-soc-rk3190.o
obj-$(CONFIG_SND_RK_SOC_RT5512) += snd-soc-rt5512.o
obj-$(CONFIG_SND_RK_SOC_CX2070X) += snd-soc-cx2070x.o
+obj-$(CONFIG_SND_RK_SOC_HDMI_I2S) += snd-soc-hdmi-i2s.o
+obj-$(CONFIG_SND_RK_SOC_HDMI_SPDIF) += snd-soc-hdmi-spdif.o