Loading Documentation/devicetree/bindings/sound/wm8903.txt +13 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,14 @@ Optional properties: performed. If any entry has the value 0xffffffff, that GPIO's configuration will not be modified. - AVDD-supply : Analog power supply regulator on the AVDD pin. - CPVDD-supply : Charge pump supply regulator on the CPVDD pin. - DBVDD-supply : Digital buffer supply regulator for the DBVDD pin. - DCVDD-supply : Digital core supply regulator for the DCVDD pin. Pins on the device (for linking into audio routes): * IN1L Loading @@ -54,6 +62,11 @@ codec: wm8903@1a { reg = <0x1a>; interrupts = < 347 >; AVDD-supply = <&fooreg_a>; CPVDD-supply = <&fooreg_b>; DBVDD-supply = <&fooreg_c>; DCVDC-supply = <&fooreg_d>; gpio-controller; #gpio-cells = <2>; Loading sound/soc/codecs/uda1380.c +7 −0 Original line number Diff line number Diff line Loading @@ -791,9 +791,16 @@ static const struct i2c_device_id uda1380_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, uda1380_i2c_id); static const struct of_device_id uda1380_of_match[] = { { .compatible = "nxp,uda1380", }, { } }; MODULE_DEVICE_TABLE(of, uda1380_of_match); static struct i2c_driver uda1380_i2c_driver = { .driver = { .name = "uda1380-codec", .of_match_table = uda1380_of_match, }, .probe = uda1380_i2c_probe, .remove = uda1380_i2c_remove, Loading sound/soc/codecs/wm5100.c +1 −1 Original line number Diff line number Diff line Loading @@ -2014,7 +2014,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100) ret = regmap_read(wm5100->regmap, WM5100_MIC_DETECT_3, &val); if (ret != 0) { dev_err(wm5100->dev, "Failed to read micropone status: %d\n", dev_err(wm5100->dev, "Failed to read microphone status: %d\n", ret); return; } Loading sound/soc/codecs/wm8903.c +31 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <linux/pm.h> #include <linux/i2c.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <linux/slab.h> #include <linux/irq.h> #include <linux/mutex.h> Loading Loading @@ -115,10 +116,19 @@ static const struct reg_default wm8903_reg_defaults[] = { { 172, 0x0000 }, /* R172 - Analogue Output Bias 0 */ }; #define WM8903_NUM_SUPPLIES 4 static const char *wm8903_supply_names[WM8903_NUM_SUPPLIES] = { "AVDD", "CPVDD", "DBVDD", "DCVDD", }; struct wm8903_priv { struct wm8903_platform_data *pdata; struct device *dev; struct regmap *regmap; struct regulator_bulk_data supplies[WM8903_NUM_SUPPLIES]; int sysclk; int irq; Loading Loading @@ -2030,6 +2040,23 @@ static int wm8903_i2c_probe(struct i2c_client *i2c, pdata = wm8903->pdata; for (i = 0; i < ARRAY_SIZE(wm8903->supplies); i++) wm8903->supplies[i].supply = wm8903_supply_names[i]; ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm8903->supplies), wm8903->supplies); if (ret != 0) { dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); return ret; } ret = regulator_bulk_enable(ARRAY_SIZE(wm8903->supplies), wm8903->supplies); if (ret != 0) { dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); return ret; } ret = regmap_read(wm8903->regmap, WM8903_SW_RESET_AND_ID, &val); if (ret != 0) { dev_err(&i2c->dev, "Failed to read chip ID: %d\n", ret); Loading Loading @@ -2160,6 +2187,8 @@ static int wm8903_i2c_probe(struct i2c_client *i2c, return 0; err: regulator_bulk_disable(ARRAY_SIZE(wm8903->supplies), wm8903->supplies); return ret; } Loading @@ -2167,6 +2196,8 @@ static int wm8903_i2c_remove(struct i2c_client *client) { struct wm8903_priv *wm8903 = i2c_get_clientdata(client); regulator_bulk_disable(ARRAY_SIZE(wm8903->supplies), wm8903->supplies); if (client->irq) free_irq(client->irq, wm8903); wm8903_free_gpio(wm8903); Loading sound/soc/soc-core.c +5 −0 Original line number Diff line number Diff line Loading @@ -3240,6 +3240,11 @@ static void snd_soc_component_cleanup(struct snd_soc_component *component) static void snd_soc_component_del_unlocked(struct snd_soc_component *component) { struct snd_soc_card *card = component->card; if (card) snd_soc_unregister_card(card); list_del(&component->list); } Loading Loading
Documentation/devicetree/bindings/sound/wm8903.txt +13 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,14 @@ Optional properties: performed. If any entry has the value 0xffffffff, that GPIO's configuration will not be modified. - AVDD-supply : Analog power supply regulator on the AVDD pin. - CPVDD-supply : Charge pump supply regulator on the CPVDD pin. - DBVDD-supply : Digital buffer supply regulator for the DBVDD pin. - DCVDD-supply : Digital core supply regulator for the DCVDD pin. Pins on the device (for linking into audio routes): * IN1L Loading @@ -54,6 +62,11 @@ codec: wm8903@1a { reg = <0x1a>; interrupts = < 347 >; AVDD-supply = <&fooreg_a>; CPVDD-supply = <&fooreg_b>; DBVDD-supply = <&fooreg_c>; DCVDC-supply = <&fooreg_d>; gpio-controller; #gpio-cells = <2>; Loading
sound/soc/codecs/uda1380.c +7 −0 Original line number Diff line number Diff line Loading @@ -791,9 +791,16 @@ static const struct i2c_device_id uda1380_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, uda1380_i2c_id); static const struct of_device_id uda1380_of_match[] = { { .compatible = "nxp,uda1380", }, { } }; MODULE_DEVICE_TABLE(of, uda1380_of_match); static struct i2c_driver uda1380_i2c_driver = { .driver = { .name = "uda1380-codec", .of_match_table = uda1380_of_match, }, .probe = uda1380_i2c_probe, .remove = uda1380_i2c_remove, Loading
sound/soc/codecs/wm5100.c +1 −1 Original line number Diff line number Diff line Loading @@ -2014,7 +2014,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100) ret = regmap_read(wm5100->regmap, WM5100_MIC_DETECT_3, &val); if (ret != 0) { dev_err(wm5100->dev, "Failed to read micropone status: %d\n", dev_err(wm5100->dev, "Failed to read microphone status: %d\n", ret); return; } Loading
sound/soc/codecs/wm8903.c +31 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <linux/pm.h> #include <linux/i2c.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <linux/slab.h> #include <linux/irq.h> #include <linux/mutex.h> Loading Loading @@ -115,10 +116,19 @@ static const struct reg_default wm8903_reg_defaults[] = { { 172, 0x0000 }, /* R172 - Analogue Output Bias 0 */ }; #define WM8903_NUM_SUPPLIES 4 static const char *wm8903_supply_names[WM8903_NUM_SUPPLIES] = { "AVDD", "CPVDD", "DBVDD", "DCVDD", }; struct wm8903_priv { struct wm8903_platform_data *pdata; struct device *dev; struct regmap *regmap; struct regulator_bulk_data supplies[WM8903_NUM_SUPPLIES]; int sysclk; int irq; Loading Loading @@ -2030,6 +2040,23 @@ static int wm8903_i2c_probe(struct i2c_client *i2c, pdata = wm8903->pdata; for (i = 0; i < ARRAY_SIZE(wm8903->supplies); i++) wm8903->supplies[i].supply = wm8903_supply_names[i]; ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm8903->supplies), wm8903->supplies); if (ret != 0) { dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); return ret; } ret = regulator_bulk_enable(ARRAY_SIZE(wm8903->supplies), wm8903->supplies); if (ret != 0) { dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); return ret; } ret = regmap_read(wm8903->regmap, WM8903_SW_RESET_AND_ID, &val); if (ret != 0) { dev_err(&i2c->dev, "Failed to read chip ID: %d\n", ret); Loading Loading @@ -2160,6 +2187,8 @@ static int wm8903_i2c_probe(struct i2c_client *i2c, return 0; err: regulator_bulk_disable(ARRAY_SIZE(wm8903->supplies), wm8903->supplies); return ret; } Loading @@ -2167,6 +2196,8 @@ static int wm8903_i2c_remove(struct i2c_client *client) { struct wm8903_priv *wm8903 = i2c_get_clientdata(client); regulator_bulk_disable(ARRAY_SIZE(wm8903->supplies), wm8903->supplies); if (client->irq) free_irq(client->irq, wm8903); wm8903_free_gpio(wm8903); Loading
sound/soc/soc-core.c +5 −0 Original line number Diff line number Diff line Loading @@ -3240,6 +3240,11 @@ static void snd_soc_component_cleanup(struct snd_soc_component *component) static void snd_soc_component_del_unlocked(struct snd_soc_component *component) { struct snd_soc_card *card = component->card; if (card) snd_soc_unregister_card(card); list_del(&component->list); } Loading