From: Mark Brown Date: Fri, 12 Jan 2018 12:29:23 +0000 (+0000) Subject: Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5645', 'asoc/topic... X-Git-Tag: v4.19~1622^2~5^5~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9888d357dd138b47a7bff02edf0c50004d71937a;p=platform%2Fkernel%2Flinux-rpi3.git Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5645', 'asoc/topic/samsung' and 'asoc/topic/si476x' into asoc-next --- 9888d357dd138b47a7bff02edf0c50004d71937a diff --cc sound/soc/codecs/rt5514-spi.c index 64bf26c,b90d6d5,2df91db,2df91db,2df91db..2144edc --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@@@@@ -461,43 -451,6 -459,42 -459,42 -459,42 +462,43 @@@@@@ static int rt5514_spi_probe(struct spi_ return 0; } + static int __maybe_unused rt5514_suspend(struct device *dev) + { + int irq = to_spi_device(dev)->irq; + + if (device_may_wakeup(dev)) + enable_irq_wake(irq); + + return 0; + } + + static int __maybe_unused rt5514_resume(struct device *dev) + { + struct snd_soc_platform *platform = snd_soc_lookup_platform(dev); + struct rt5514_dsp *rt5514_dsp = + snd_soc_platform_get_drvdata(platform); + int irq = to_spi_device(dev)->irq; + u8 buf[8]; + + if (device_may_wakeup(dev)) + disable_irq_wake(irq); + --- if (rt5514_dsp->substream) { --- rt5514_spi_burst_read(RT5514_IRQ_CTRL, (u8 *)&buf, sizeof(buf)); --- if (buf[0] & RT5514_IRQ_STATUS_BIT) --- rt5514_schedule_copy(rt5514_dsp); ++++ if (rt5514_dsp) { ++++ if (rt5514_dsp->substream) { ++++ rt5514_spi_burst_read(RT5514_IRQ_CTRL, (u8 *)&buf, ++++ sizeof(buf)); ++++ if (buf[0] & RT5514_IRQ_STATUS_BIT) ++++ rt5514_schedule_copy(rt5514_dsp); ++++ } + } + + return 0; + } + + static const struct dev_pm_ops rt5514_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume) + }; + static const struct of_device_id rt5514_of_match[] = { { .compatible = "realtek,rt5514", }, {}, diff --cc sound/soc/codecs/rt5645.c index edc152c,6a7778a,5292fca2,f020d2d,f020d2d..8f140c8 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@@@@@ -3600,33 -3589,33 -3691,8 -3600,33 -3600,33 +3691,8 @@@@@@ static const struct dmi_system_id dmi_p .matches = { DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), }, ++ ++ .driver_data = (void *)&intel_braswell_platform_data, }, -- -- { } -- --}; -- -- -- --static const struct rt5645_platform_data buddy_platform_data = { -- -- .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5, -- -- .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, -- -- .jd_mode = 3, -- -- .level_trigger_irq = true, -- --}; -- -- - --static const struct dmi_system_id dmi_platform_intel_broadwell[] = { - static struct dmi_system_id dmi_platform_intel_broadwell[] = { -- -- { -- -- .ident = "Chrome Buddy", -- -- .matches = { -- -- DMI_MATCH(DMI_PRODUCT_NAME, "Buddy"), -- -- }, -- -- }, -- -- { } -- --}; -- -- -- --static const struct rt5645_platform_data gpd_win_platform_data = { -- -- .jd_mode = 3, -- -- .inv_jd1_1 = true, -- --}; -- -- -- --static const struct dmi_system_id dmi_platform_gpd_win[] = { { /* * Match for the GPDwin which unfortunately uses somewhat @@@@@@ -3644,33 -3633,33 -3710,16 -3644,33 -3644,33 +3710,16 @@@@@@ DMI_MATCH(DMI_BOARD_SERIAL, "Default string"), DMI_MATCH(DMI_PRODUCT_NAME, "Default string"), }, ++ ++ .driver_data = (void *)&gpd_win_platform_data, }, -- -- {} -- --}; -- -- - --static const struct rt5645_platform_data general_platform_data2 = { - static struct rt5645_platform_data general_platform_data2 = { -- -- .dmic1_data_pin = RT5645_DMIC_DATA_IN2N, -- -- .dmic2_data_pin = RT5645_DMIC2_DISABLE, -- -- .jd_mode = 3, -- -- .inv_jd1_1 = true, -- --}; -- -- - --static const struct dmi_system_id dmi_platform_asus_t100ha[] = { - static struct dmi_system_id dmi_platform_asus_t100ha[] = { { .ident = "ASUS T100HAN", .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "T100HAN"), }, ++ ++ .driver_data = (void *)&asus_t100ha_platform_data, }, -- -- { } -- --}; -- -- - --static const struct rt5645_platform_data minix_z83_4_platform_data = { - static struct rt5645_platform_data minix_z83_4_platform_data = { -- -- .jd_mode = 3, -- --}; -- -- - --static const struct dmi_system_id dmi_platform_minix_z83_4[] = { - static struct dmi_system_id dmi_platform_minix_z83_4[] = { { .ident = "MINIX Z83-4", .matches = { @@@@@@ -3820,11 -3803,6 -3877,11 -3820,9 -3820,9 +3877,11 @@@@@@ static int rt5645_i2c_probe(struct i2c_ regmap_write(rt5645->regmap, RT5645_RESET, 0); + regmap_read(regmap, RT5645_VENDOR_ID, &val); + rt5645->v_id = val & 0xff; + + ++ regmap_write(rt5645->regmap, RT5645_AD_DA_MIXER, 0x8080); + ++ ret = regmap_register_patch(rt5645->regmap, init_list, ARRAY_SIZE(init_list)); if (ret != 0)