Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5645', 'asoc/topic...
authorMark Brown <broonie@kernel.org>
Fri, 12 Jan 2018 12:29:23 +0000 (12:29 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 12 Jan 2018 12:29:23 +0000 (12:29 +0000)
1  2  3  4  5 
sound/soc/codecs/rt5514-spi.c
sound/soc/codecs/rt5514.c
sound/soc/codecs/rt5645.c

index 64bf26cec20d535314551ae542f8c28ed25352dc,b90d6d5d7ff819df6b0a61f0803c9ad8dea4195e,2df91db765acd6300406aa330cb0d85b3edb7d96,2df91db765acd6300406aa330cb0d85b3edb7d96,2df91db765acd6300406aa330cb0d85b3edb7d96..2144edca97b0959430be176feeec47ad0c6f265b
@@@@@@ -461,43 -451,6 -459,42 -459,42 -459,42 +462,43 @@@@@@ static int rt5514_spi_probe(struct spi_
        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", },
        {},
Simple merge
index edc152c8a1fe7596e9bbc5760574d973a9185d16,6a7778a44853a4a4583fc4fcb4516fd74da8f769,5292fca2f54f4ecb019303ee06c31bcc3e495c82,f020d2d1eef4a98baa8c91442485ee64257c708e,f020d2d1eef4a98baa8c91442485ee64257c708e..8f140c8b93acd3e4ba14fb1f1a9dc6a19b2916f7
@@@@@@ -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
                        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)