]> Git Repo - linux.git/commitdiff
Merge branch 'acpi-soc'
authorRafael J. Wysocki <[email protected]>
Tue, 12 Jan 2016 00:08:47 +0000 (01:08 +0100)
committerRafael J. Wysocki <[email protected]>
Tue, 12 Jan 2016 00:08:47 +0000 (01:08 +0100)
* acpi-soc:
  PM / clk: don't leave clocks enabled when driver not bound
  i2c: dw: Add APM X-Gene ACPI I2C device support
  ACPI / APD: Add APM X-Gene ACPI I2C device support
  ACPI / LPSS: change 'does not have' to 'has' in comment
  Revert "dmaengine: dw: platform: provide platform data for Intel"
  dmaengine: dw: return immediately from IRQ when DMA isn't in use
  dmaengine: dw: platform: power on device on shutdown
  ACPI / LPSS: override power state for LPSS DMA device
  ACPI / LPSS: power on when probe() and otherwise when remove()
  ACPI / LPSS: do delay for all LPSS devices when D3->D0
  ACPI / LPSS: allow to use specific PM domain during ->probe()
  Revert "ACPI / LPSS: allow to use specific PM domain during ->probe()"
  device core: add BUS_NOTIFY_DRIVER_NOT_BOUND notification
  x86/platform/iosf_mbi: Remove duplicate definitions

Conflicts:
drivers/i2c/busses/i2c-designware-platdrv.c

1  2 
drivers/i2c/busses/i2c-designware-platdrv.c
drivers/powercap/intel_rapl.c

index cbd663deef38a312126c182b1588c39a2c058994,423371d148d585966e7a3a04329bda5282448c37..bf72ae740fc17c3dfbab0f1c0004ee29ed73f03b
@@@ -36,7 -36,6 +36,7 @@@
  #include <linux/platform_device.h>
  #include <linux/pm.h>
  #include <linux/pm_runtime.h>
 +#include <linux/property.h>
  #include <linux/io.h>
  #include <linux/slab.h>
  #include <linux/acpi.h>
@@@ -94,7 -93,6 +94,7 @@@ static void dw_i2c_acpi_params(struct p
  static int dw_i2c_acpi_configure(struct platform_device *pdev)
  {
        struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
 +      const struct acpi_device_id *id;
  
        dev->adapter.nr = -1;
        dev->tx_fifo_depth = 32;
        dw_i2c_acpi_params(pdev, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt,
                           &dev->sda_hold_time);
  
 +      id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
 +      if (id && id->driver_data)
 +              dev->accessor_flags |= (u32)id->driver_data;
 +
        return 0;
  }
  
@@@ -122,7 -116,8 +122,8 @@@ static const struct acpi_device_id dw_i
        { "INT3433", 0 },
        { "80860F41", 0 },
        { "808622C1", 0 },
 -      { "AMD0010", 0 },
 +      { "AMD0010", ACCESS_INTR_MASK },
+       { "APMC0D0F", 0 },
        { }
  };
  MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
@@@ -135,10 -130,10 +136,10 @@@ static inline int dw_i2c_acpi_configure
  
  static int dw_i2c_plat_probe(struct platform_device *pdev)
  {
 +      struct dw_i2c_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct dw_i2c_dev *dev;
        struct i2c_adapter *adap;
        struct resource *mem;
 -      struct dw_i2c_platform_data *pdata;
        int irq, r;
        u32 clk_freq, ht = 0;
  
        /* fast mode by default because of legacy reasons */
        clk_freq = 400000;
  
 -      if (has_acpi_companion(&pdev->dev)) {
 -              dw_i2c_acpi_configure(pdev);
 -      } else if (pdev->dev.of_node) {
 -              of_property_read_u32(pdev->dev.of_node,
 -                                      "i2c-sda-hold-time-ns", &ht);
 -
 -              of_property_read_u32(pdev->dev.of_node,
 -                                   "i2c-sda-falling-time-ns",
 -                                   &dev->sda_falling_time);
 -              of_property_read_u32(pdev->dev.of_node,
 -                                   "i2c-scl-falling-time-ns",
 -                                   &dev->scl_falling_time);
 -
 -              of_property_read_u32(pdev->dev.of_node, "clock-frequency",
 -                                   &clk_freq);
 -
 -              /* Only standard mode at 100kHz and fast mode at 400kHz
 -               * are supported.
 -               */
 -              if (clk_freq != 100000 && clk_freq != 400000) {
 -                      dev_err(&pdev->dev, "Only 100kHz and 400kHz supported");
 -                      return -EINVAL;
 -              }
 +      if (pdata) {
 +              clk_freq = pdata->i2c_scl_freq;
        } else {
 -              pdata = dev_get_platdata(&pdev->dev);
 -              if (pdata)
 -                      clk_freq = pdata->i2c_scl_freq;
 +              device_property_read_u32(&pdev->dev, "i2c-sda-hold-time-ns",
 +                                       &ht);
 +              device_property_read_u32(&pdev->dev, "i2c-sda-falling-time-ns",
 +                                       &dev->sda_falling_time);
 +              device_property_read_u32(&pdev->dev, "i2c-scl-falling-time-ns",
 +                                       &dev->scl_falling_time);
 +              device_property_read_u32(&pdev->dev, "clock-frequency",
 +                                       &clk_freq);
 +      }
 +
 +      if (has_acpi_companion(&pdev->dev))
 +              dw_i2c_acpi_configure(pdev);
 +
 +      /*
 +       * Only standard mode at 100kHz and fast mode at 400kHz are supported.
 +       */
 +      if (clk_freq != 100000 && clk_freq != 400000) {
 +              dev_err(&pdev->dev, "Only 100kHz and 400kHz supported");
 +              return -EINVAL;
        }
  
        r = i2c_dw_eval_lock_support(dev);
        }
  
        r = i2c_dw_probe(dev);
 -      if (r) {
 +      if (r && !dev->pm_runtime_disabled)
                pm_runtime_disable(&pdev->dev);
 -              return r;
 -      }
  
 -      return 0;
 +      return r;
  }
  
  static int dw_i2c_plat_remove(struct platform_device *pdev)
  
        pm_runtime_dont_use_autosuspend(&pdev->dev);
        pm_runtime_put_sync(&pdev->dev);
 -      pm_runtime_disable(&pdev->dev);
 +      if (!dev->pm_runtime_disabled)
 +              pm_runtime_disable(&pdev->dev);
  
        return 0;
  }
index 48747c28a43d4ac2fc1bed10f29cd1224ddd10f0,fa07809eef45e75a70104717dd75c15b2f2f824f..4099159ffa3df452cbfe36edf97383bebddb274c
@@@ -988,16 -988,16 +988,16 @@@ static void set_floor_freq_atom(struct 
        }
  
        if (!power_ctrl_orig_val)
-               iosf_mbi_read(BT_MBI_UNIT_PMC, BT_MBI_PMC_READ,
-                       rapl_defaults->floor_freq_reg_addr,
-                               &power_ctrl_orig_val);
+               iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_CR_READ,
+                             rapl_defaults->floor_freq_reg_addr,
+                             &power_ctrl_orig_val);
        mdata = power_ctrl_orig_val;
        if (enable) {
                mdata &= ~(0x7f << 8);
                mdata |= 1 << 8;
        }
-       iosf_mbi_write(BT_MBI_UNIT_PMC, BT_MBI_PMC_WRITE,
-               rapl_defaults->floor_freq_reg_addr, mdata);
+       iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_CR_WRITE,
+                      rapl_defaults->floor_freq_reg_addr, mdata);
  }
  
  static u64 rapl_compute_time_window_core(struct rapl_package *rp, u64 value,
@@@ -1341,13 -1341,10 +1341,13 @@@ static int rapl_detect_domains(struct r
  
        for (rd = rp->domains; rd < rp->domains + rp->nr_domains; rd++) {
                /* check if the domain is locked by BIOS */
 -              if (rapl_read_data_raw(rd, FW_LOCK, false, &locked)) {
 +              ret = rapl_read_data_raw(rd, FW_LOCK, false, &locked);
 +              if (ret)
 +                      return ret;
 +              if (locked) {
                        pr_info("RAPL package %d domain %s locked by BIOS\n",
                                rp->id, rd->name);
 -                              rd->state |= DOMAIN_STATE_BIOS_LOCKED;
 +                      rd->state |= DOMAIN_STATE_BIOS_LOCKED;
                }
        }
  
This page took 0.080768 seconds and 4 git commands to generate.