diff options
Diffstat (limited to 'SOURCES/rog-ally-alsa.patch')
-rw-r--r-- | SOURCES/rog-ally-alsa.patch | 374 |
1 files changed, 0 insertions, 374 deletions
diff --git a/SOURCES/rog-ally-alsa.patch b/SOURCES/rog-ally-alsa.patch deleted file mode 100644 index 189b049..0000000 --- a/SOURCES/rog-ally-alsa.patch +++ /dev/null @@ -1,374 +0,0 @@ -From: Cristian Ciocaltea @ 2023-09-07 17:10 UTC (permalink / raw) - To: James Schulman, David Rhodes, Richard Fitzgerald, - Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, - Stefan Binding, Charles Keepax, Vitaly Rodionov - Cc: alsa-devel, patches, linux-kernel, kernel - -Use dev_err_probe() helper where possible, to simplify error handling -during probe. - -Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> -Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> ---- - sound/soc/codecs/cs35l41-i2c.c | 9 +++------ - sound/soc/codecs/cs35l41-spi.c | 9 +++------ - sound/soc/codecs/cs35l41.c | 34 ++++++++++++++++------------------ - 3 files changed, 22 insertions(+), 30 deletions(-) - -diff --git a/sound/soc/codecs/cs35l41-i2c.c b/sound/soc/codecs/cs35l41-i2c.c -index 7ea890d7d387..9109203a7f25 100644 ---- a/sound/soc/codecs/cs35l41-i2c.c -+++ b/sound/soc/codecs/cs35l41-i2c.c -@@ -35,7 +35,6 @@ static int cs35l41_i2c_probe(struct i2c_client *client) - struct device *dev = &client->dev; - struct cs35l41_hw_cfg *hw_cfg = dev_get_platdata(dev); - const struct regmap_config *regmap_config = &cs35l41_regmap_i2c; -- int ret; - - cs35l41 = devm_kzalloc(dev, sizeof(struct cs35l41_private), GFP_KERNEL); - -@@ -47,11 +46,9 @@ static int cs35l41_i2c_probe(struct i2c_client *client) - - i2c_set_clientdata(client, cs35l41); - cs35l41->regmap = devm_regmap_init_i2c(client, regmap_config); -- if (IS_ERR(cs35l41->regmap)) { -- ret = PTR_ERR(cs35l41->regmap); -- dev_err(cs35l41->dev, "Failed to allocate register map: %d\n", ret); -- return ret; -- } -+ if (IS_ERR(cs35l41->regmap)) -+ return dev_err_probe(cs35l41->dev, PTR_ERR(cs35l41->regmap), -+ "Failed to allocate register map\n"); - - return cs35l41_probe(cs35l41, hw_cfg); - } -diff --git a/sound/soc/codecs/cs35l41-spi.c b/sound/soc/codecs/cs35l41-spi.c -index 5c8bb24909eb..28e9c9473e60 100644 ---- a/sound/soc/codecs/cs35l41-spi.c -+++ b/sound/soc/codecs/cs35l41-spi.c -@@ -32,7 +32,6 @@ static int cs35l41_spi_probe(struct spi_device *spi) - const struct regmap_config *regmap_config = &cs35l41_regmap_spi; - struct cs35l41_hw_cfg *hw_cfg = dev_get_platdata(&spi->dev); - struct cs35l41_private *cs35l41; -- int ret; - - cs35l41 = devm_kzalloc(&spi->dev, sizeof(struct cs35l41_private), GFP_KERNEL); - if (!cs35l41) -@@ -43,11 +42,9 @@ static int cs35l41_spi_probe(struct spi_device *spi) - - spi_set_drvdata(spi, cs35l41); - cs35l41->regmap = devm_regmap_init_spi(spi, regmap_config); -- if (IS_ERR(cs35l41->regmap)) { -- ret = PTR_ERR(cs35l41->regmap); -- dev_err(&spi->dev, "Failed to allocate register map: %d\n", ret); -- return ret; -- } -+ if (IS_ERR(cs35l41->regmap)) -+ return dev_err_probe(cs35l41->dev, PTR_ERR(cs35l41->regmap), -+ "Failed to allocate register map\n"); - - cs35l41->dev = &spi->dev; - cs35l41->irq = spi->irq; -diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c -index 5456e6bfa242..7ddaa9bd8911 100644 ---- a/sound/soc/codecs/cs35l41.c -+++ b/sound/soc/codecs/cs35l41.c -@@ -1190,16 +1190,14 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - - ret = devm_regulator_bulk_get(cs35l41->dev, CS35L41_NUM_SUPPLIES, - cs35l41->supplies); -- if (ret != 0) { -- dev_err(cs35l41->dev, "Failed to request core supplies: %d\n", ret); -- return ret; -- } -+ if (ret != 0) -+ return dev_err_probe(cs35l41->dev, ret, -+ "Failed to request core supplies\n"); - - ret = regulator_bulk_enable(CS35L41_NUM_SUPPLIES, cs35l41->supplies); -- if (ret != 0) { -- dev_err(cs35l41->dev, "Failed to enable core supplies: %d\n", ret); -- return ret; -- } -+ if (ret != 0) -+ return dev_err_probe(cs35l41->dev, ret, -+ "Failed to enable core supplies\n"); - - /* returning NULL can be an option if in stereo mode */ - cs35l41->reset_gpio = devm_gpiod_get_optional(cs35l41->dev, "reset", -@@ -1211,8 +1209,8 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - dev_info(cs35l41->dev, - "Reset line busy, assuming shared reset\n"); - } else { -- dev_err(cs35l41->dev, -- "Failed to get reset GPIO: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, -+ "Failed to get reset GPIO\n"); - goto err; - } - } -@@ -1228,8 +1226,8 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - int_status, int_status & CS35L41_OTP_BOOT_DONE, - 1000, 100000); - if (ret) { -- dev_err(cs35l41->dev, -- "Failed waiting for OTP_BOOT_DONE: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, -+ "Failed waiting for OTP_BOOT_DONE\n"); - goto err; - } - -@@ -1242,13 +1240,13 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - - ret = regmap_read(cs35l41->regmap, CS35L41_DEVID, ®id); - if (ret < 0) { -- dev_err(cs35l41->dev, "Get Device ID failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Get Device ID failed\n"); - goto err; - } - - ret = regmap_read(cs35l41->regmap, CS35L41_REVID, ®_revid); - if (ret < 0) { -- dev_err(cs35l41->dev, "Get Revision ID failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Get Revision ID failed\n"); - goto err; - } - -@@ -1273,7 +1271,7 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - - ret = cs35l41_otp_unpack(cs35l41->dev, cs35l41->regmap); - if (ret < 0) { -- dev_err(cs35l41->dev, "OTP Unpack failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "OTP Unpack failed\n"); - goto err; - } - -@@ -1293,13 +1291,13 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - IRQF_ONESHOT | IRQF_SHARED | irq_pol, - "cs35l41", cs35l41); - if (ret != 0) { -- dev_err(cs35l41->dev, "Failed to request IRQ: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Failed to request IRQ\n"); - goto err; - } - - ret = cs35l41_set_pdata(cs35l41); - if (ret < 0) { -- dev_err(cs35l41->dev, "Set pdata failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Set pdata failed\n"); - goto err; - } - -@@ -1322,7 +1320,7 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * - &soc_component_dev_cs35l41, - cs35l41_dai, ARRAY_SIZE(cs35l41_dai)); - if (ret < 0) { -- dev_err(cs35l41->dev, "Register codec failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Register codec failed\n"); - goto err_pm; - } - --- -2.41.0 -From: Cristian Ciocaltea @ 2023-09-07 17:10 UTC (permalink / raw) - To: James Schulman, David Rhodes, Richard Fitzgerald, - Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, - Stefan Binding, Charles Keepax, Vitaly Rodionov - Cc: alsa-devel, patches, linux-kernel, kernel - -Make use of the recently introduced EXPORT_GPL_DEV_PM_OPS() macro, to -conditionally export the runtime/system PM functions. - -Replace the old SET_{RUNTIME,SYSTEM_SLEEP,NOIRQ_SYSTEM_SLEEP}_PM_OPS() -helpers with their modern alternatives and get rid of the now -unnecessary '__maybe_unused' annotations on all PM functions. - -Additionally, use the pm_ptr() macro to fix the following errors when -building with CONFIG_PM disabled: - -ERROR: modpost: "cs35l41_pm_ops" [sound/soc/codecs/snd-soc-cs35l41-spi.ko] undefined! -ERROR: modpost: "cs35l41_pm_ops" [sound/soc/codecs/snd-soc-cs35l41-i2c.ko] undefined! - -Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> -Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> ---- - sound/soc/codecs/cs35l41-i2c.c | 2 +- - sound/soc/codecs/cs35l41-spi.c | 2 +- - sound/soc/codecs/cs35l41.c | 21 ++++++++++----------- - 3 files changed, 12 insertions(+), 13 deletions(-) - -diff --git a/sound/soc/codecs/cs35l41-i2c.c b/sound/soc/codecs/cs35l41-i2c.c -index 9109203a7f25..96414ee35285 100644 ---- a/sound/soc/codecs/cs35l41-i2c.c -+++ b/sound/soc/codecs/cs35l41-i2c.c -@@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l41_acpi_match); - static struct i2c_driver cs35l41_i2c_driver = { - .driver = { - .name = "cs35l41", -- .pm = &cs35l41_pm_ops, -+ .pm = pm_ptr(&cs35l41_pm_ops), - .of_match_table = of_match_ptr(cs35l41_of_match), - .acpi_match_table = ACPI_PTR(cs35l41_acpi_match), - }, -diff --git a/sound/soc/codecs/cs35l41-spi.c b/sound/soc/codecs/cs35l41-spi.c -index 28e9c9473e60..a6db44520c06 100644 ---- a/sound/soc/codecs/cs35l41-spi.c -+++ b/sound/soc/codecs/cs35l41-spi.c -@@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l41_acpi_match); - static struct spi_driver cs35l41_spi_driver = { - .driver = { - .name = "cs35l41", -- .pm = &cs35l41_pm_ops, -+ .pm = pm_ptr(&cs35l41_pm_ops), - .of_match_table = of_match_ptr(cs35l41_of_match), - .acpi_match_table = ACPI_PTR(cs35l41_acpi_match), - }, -diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c -index 7ddaa9bd8911..4bc64ba71cd6 100644 ---- a/sound/soc/codecs/cs35l41.c -+++ b/sound/soc/codecs/cs35l41.c -@@ -1368,7 +1368,7 @@ void cs35l41_remove(struct cs35l41_private *cs35l41) - } - EXPORT_SYMBOL_GPL(cs35l41_remove); - --static int __maybe_unused cs35l41_runtime_suspend(struct device *dev) -+static int cs35l41_runtime_suspend(struct device *dev) - { - struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); - -@@ -1385,7 +1385,7 @@ static int __maybe_unused cs35l41_runtime_suspend(struct device *dev) - return 0; - } - --static int __maybe_unused cs35l41_runtime_resume(struct device *dev) -+static int cs35l41_runtime_resume(struct device *dev) - { - struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); - int ret; -@@ -1414,7 +1414,7 @@ static int __maybe_unused cs35l41_runtime_resume(struct device *dev) - return 0; - } - --static int __maybe_unused cs35l41_sys_suspend(struct device *dev) -+static int cs35l41_sys_suspend(struct device *dev) - { - struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); - -@@ -1424,7 +1424,7 @@ static int __maybe_unused cs35l41_sys_suspend(struct device *dev) - return 0; - } - --static int __maybe_unused cs35l41_sys_suspend_noirq(struct device *dev) -+static int cs35l41_sys_suspend_noirq(struct device *dev) - { - struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); - -@@ -1434,7 +1434,7 @@ static int __maybe_unused cs35l41_sys_suspend_noirq(struct device *dev) - return 0; - } - --static int __maybe_unused cs35l41_sys_resume_noirq(struct device *dev) -+static int cs35l41_sys_resume_noirq(struct device *dev) - { - struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); - -@@ -1444,7 +1444,7 @@ static int __maybe_unused cs35l41_sys_resume_noirq(struct device *dev) - return 0; - } - --static int __maybe_unused cs35l41_sys_resume(struct device *dev) -+static int cs35l41_sys_resume(struct device *dev) - { - struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); - -@@ -1454,13 +1454,12 @@ static int __maybe_unused cs35l41_sys_resume(struct device *dev) - return 0; - } - --const struct dev_pm_ops cs35l41_pm_ops = { -- SET_RUNTIME_PM_OPS(cs35l41_runtime_suspend, cs35l41_runtime_resume, NULL) -+EXPORT_GPL_DEV_PM_OPS(cs35l41_pm_ops) = { -+ RUNTIME_PM_OPS(cs35l41_runtime_suspend, cs35l41_runtime_resume, NULL) - -- SET_SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend, cs35l41_sys_resume) -- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend_noirq, cs35l41_sys_resume_noirq) -+ SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend, cs35l41_sys_resume) -+ NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend_noirq, cs35l41_sys_resume_noirq) - }; --EXPORT_SYMBOL_GPL(cs35l41_pm_ops); - - MODULE_DESCRIPTION("ASoC CS35L41 driver"); - MODULE_AUTHOR("David Rhodes, Cirrus Logic Inc, <david.rhodes@cirrus.com>"); --- -2.41.0 -From: Cristian Ciocaltea @ 2023-09-07 17:10 UTC (permalink / raw) - To: James Schulman, David Rhodes, Richard Fitzgerald, - Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, - Stefan Binding, Charles Keepax, Vitaly Rodionov - Cc: alsa-devel, patches, linux-kernel, kernel - -Replace the remaining dev_err() calls in probe() with dev_err_probe(), -to improve consistency. - -Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> ---- - sound/pci/hda/cs35l41_hda.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c -index 565f7b897436..c74faa2ff46c 100644 ---- a/sound/pci/hda/cs35l41_hda.c -+++ b/sound/pci/hda/cs35l41_hda.c -@@ -1550,27 +1550,27 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i - ret = regmap_read_poll_timeout(cs35l41->regmap, CS35L41_IRQ1_STATUS4, int_status, - int_status & CS35L41_OTP_BOOT_DONE, 1000, 100000); - if (ret) { -- dev_err(cs35l41->dev, "Failed waiting for OTP_BOOT_DONE: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Failed waiting for OTP_BOOT_DONE\n"); - goto err; - } - - ret = regmap_read(cs35l41->regmap, CS35L41_IRQ1_STATUS3, &int_sts); - if (ret || (int_sts & CS35L41_OTP_BOOT_ERR)) { -- dev_err(cs35l41->dev, "OTP Boot status %x error: %d\n", -- int_sts & CS35L41_OTP_BOOT_ERR, ret); -+ dev_err_probe(cs35l41->dev, ret, "OTP Boot status %x error\n", -+ int_sts & CS35L41_OTP_BOOT_ERR); - ret = -EIO; - goto err; - } - - ret = regmap_read(cs35l41->regmap, CS35L41_DEVID, ®id); - if (ret) { -- dev_err(cs35l41->dev, "Get Device ID failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Get Device ID failed\n"); - goto err; - } - - ret = regmap_read(cs35l41->regmap, CS35L41_REVID, ®_revid); - if (ret) { -- dev_err(cs35l41->dev, "Get Revision ID failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Get Revision ID failed\n"); - goto err; - } - -@@ -1593,7 +1593,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i - - ret = cs35l41_otp_unpack(cs35l41->dev, cs35l41->regmap); - if (ret) { -- dev_err(cs35l41->dev, "OTP Unpack failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "OTP Unpack failed\n"); - goto err; - } - -@@ -1624,7 +1624,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i - - ret = component_add(cs35l41->dev, &cs35l41_hda_comp_ops); - if (ret) { -- dev_err(cs35l41->dev, "Register component failed: %d\n", ret); -+ dev_err_probe(cs35l41->dev, ret, "Register component failed\n"); - goto err_pm; - } - --- -2.41.0 |