return 0;
}
--- 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);
+ 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) {
++++ 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", },
{},
.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
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 = {
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)