1. 21 4月, 2017 3 次提交
  2. 20 4月, 2017 3 次提交
  3. 19 4月, 2017 1 次提交
  4. 17 4月, 2017 7 次提交
    • W
      Merge branch 'i2c/for-INT33FE' into i2c/for-4.12 · c99a30d8
      Wolfram Sang 提交于
      Pull in the immutable branch with I2C ACPI core extensions to support
      the INT33FE driver.
      c99a30d8
    • H
      i2c: core: Allow drivers to disable i2c-core irq mapping · d1d84bb9
      Hans de Goede 提交于
      By default the i2c-core will try to get an irq with index 0 on ACPI / of
      instantiated devices. This is troublesome on some ACPI systems where the
      irq info at index 0 in the CRS table may contain nonsense and/or point
      to an irqchip for which there is no Linux driver.
      
      If this happens then before this commit the driver's probe method would
      never get called because i2c_device_probe will try to get an irq by
      calling acpi_dev_gpio_irq_get which will always return -EPROBE in this
      case, as it waits for a matching irqchip driver to load. Thus causing
      the driver to not get a chance to bind.
      
      This commit adds a new disable_i2c_core_irq_mapping flag to struct
      i2c_driver which a driver can set to tell the core to skip irq mapping.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      d1d84bb9
    • H
      i2c: core: Add new i2c_acpi_new_device helper function · 605f8fc2
      Hans de Goede 提交于
      By default the i2c subsys creates an i2c-client for the first I2cSerialBus
      resource of an acpi_device, but some acpi_devices have multiple
      I2cSerialBus resources and we may want to instantiate i2c-clients for
      the others.
      
      This commit adds a new i2c_acpi_new_device function which can be used to
      create an i2c-client for any I2cSerialBus resource of an acpi_device.
      
      Note that the other resources may even be on a different i2c bus, so just
      retrieving the client address is not enough.
      
      Here is an example DSDT excerpt from such a device:
      
      Device (WIDR)
      {
          Name (_HID, "INT33FE" /* XPOWER Battery Device */)
          Name (_CID, "INT33FE" /* XPOWER Battery Device */)
          Name (_DDN, "WC PMIC Battery Device")
      <snip>
          Name (RBUF, ResourceTemplate ()
          {
              I2cSerialBusV2 (0x005E, ControllerInitiated, 0x000186A0,
                  AddressingMode7Bit, "\\_SB.PCI0.I2C7",
                  0x00, ResourceConsumer, , Exclusive,
                  )
              I2cSerialBusV2 (0x0036, ControllerInitiated, 0x000186A0,
                  AddressingMode7Bit, "\\_SB.PCI0.I2C1",
                  0x00, ResourceConsumer, , Exclusive,
                  )
              I2cSerialBusV2 (0x0022, ControllerInitiated, 0x00061A80,
                  AddressingMode7Bit, "\\_SB.PCI0.I2C1",
                  0x00, ResourceConsumer, , Exclusive,
                  )
              I2cSerialBusV2 (0x0054, ControllerInitiated, 0x00061A80,
                  AddressingMode7Bit, "\\_SB.PCI0.I2C1",
                  0x00, ResourceConsumer, , Exclusive,
                  )
              GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000,
                  "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, ,
                  )
                  {   // Pin list
              0x0012
                  }
              GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone, 0x0000,
                  "\\_SB.GPO1", 0x00, ResourceConsumer, ,
                  )
                  {   // Pin list
              0x0005
                  }
              GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000,
                  "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, ,
                  )
                  {   // Pin list
              0x0013
                  }
          })
          Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
          {
              Return (RBUF) /* \_SB_.PCI0.I2C7.WIDR.RBUF */
          }
      <snip>
      }
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      605f8fc2
    • H
      i2c: core: Allow getting ACPI info by index · 417f7843
      Hans de Goede 提交于
      Modify struct i2c_acpi_lookup and i2c_acpi_fill_info() to allow
      using them to get the info from a certain index in the ACPI-resource
      list rather then taking the first I2cSerialBus resource.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      417f7843
    • G
      i2c: img-scb: use setup_timer · 879bce22
      Geliang Tang 提交于
      Use setup_timer() instead of init_timer() to simplify the code.
      Signed-off-by: NGeliang Tang <geliangtang@gmail.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      879bce22
    • E
      i2c: i2c-scmi: add a MS HID · e058e7a4
      Edgar Cherkasov 提交于
      Description of the problem:
       - i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM";
       - the fist HID (SMBUS01) is clearly defined in "SMBus Control Method
         Interface Specification, version 1.0": "Each device must specify
         'SMBUS01' as its _HID and use a unique _UID value";
       - unfortunately, BIOS vendors (like AMI) seem to ignore this requirement
         and implement "SMB0001" HID instead of "SMBUS01";
       - I speculate that they do this because only "SMB0001" is hard coded in
         Windows SMBus driver produced by Microsoft.
      
      This leads to following situation:
       - SMBus works out of box in Windows but not in Linux;
       - board vendors are forced to add correct "SMBUS01" HID to BIOS to make
         SMBus work in Linux. Moreover the same board vendors complain that
         tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier
         and produce errors.  So they need to constantly patch the compiler for
         each new version of BIOS.
      
      As it is very unlikely that BIOS vendors implement a correct HID in
      future, I would propose to consider whether it is possible to work around
      the problem by adding MS HID to the Linux i2c-scmi driver.
      
      v2: move the definition of the new HID to the driver itself.
      Signed-off-by: NEdgar Cherkasov <echerkasov@dev.rtsoft.ru>
      Signed-off-by: NMichael Brunner <Michael.Brunner@kontron.com>
      Acked-by: NViktor Krasnov <vkrasnov@dev.rtsoft.ru>
      Reviewed-by: NJean Delvare <jdelvare@suse.de>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      e058e7a4
    • W
      Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.12 · 69e620f8
      Wolfram Sang 提交于
      Pull in changes from the i2c-mux subsubsystem:
      
      "Here are a new LTC4306/5 driver, a fix needed by the RT kernel and some
      error message cleanup."
      69e620f8
  5. 12 4月, 2017 2 次提交
  6. 03 4月, 2017 7 次提交
  7. 30 3月, 2017 10 次提交
  8. 24 3月, 2017 4 次提交
  9. 22 3月, 2017 3 次提交
    • L
      dt-bindings: i2c: rk3x: add support for rk3328 · 2e157681
      Liang Chen 提交于
      The rk3328 i2c is the same as rk3399
      Signed-off-by: NLiang Chen <cl@rock-chips.com>
      Reviewed-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      2e157681
    • H
      i2c: designware: Disable pm for PMIC i2c-bus even if there is no _SEM method · a3d411fb
      Hans de Goede 提交于
      Cherrytrail devices use the dw i2c-bus with uid 7 to access their PMIC.
      Even if the i2c-bus to the PMIC is not shared with the SoC's P-Unit
      and i2c-designware-baytrail.c thus does not set the pm_disabled flag,
      we still need to disable pm so that ACPI PMIC opregions can access the
      PMIC during late-suspend and early-resume.
      
      This fixes errors like these blocking suspend:
      
        i2c_designware 808622C1:06: timeout waiting for bus ready
        ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion]
        acpi 80860F14:02: Failed to change power state to D3hot
        PM: late suspend of devices failed
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      a3d411fb
    • H
      i2c: designware: Never suspend i2c-busses used for accessing the system PMIC · 41c80b8a
      Hans de Goede 提交于
      Currently we are already setting a pm_runtime_disabled flag and disabling
      runtime-pm for i2c-busses used for accessing the system PMIC on x86.
      But this is not enough, there are ACPI opregions which may want to access
      the PMIC during late-suspend and early-resume, so we need to completely
      disable pm to be safe.
      
      This commit renames the flag from pm_runtime_disabled to pm_disabled and
      adds the following new behavior if the flag is set:
      
      1) Call dev_pm_syscore_device(dev, true) which disables normal suspend /
         resume and remove the pm_runtime_disabled check from dw_i2c_plat_resume
         since that will now never get called. This fixes suspend_late handlers
         which use ACPI PMIC opregions causing errors like these:
      
        PM: Suspending system (freeze)
        PM: suspend of devices complete after 1127.751 msecs
        i2c_designware 808622C1:06: timeout waiting for bus ready
        ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion]
        acpi 80860F14:02: Failed to change power state to D3hot
        PM: late suspend of devices failed
      
      2) Set IRQF_NO_SUSPEND irq flag. This fixes resume_early handlers which
         handlers which use ACPI PMIC opregions causing errors like these:
      
        PM: resume from suspend-to-idle
        i2c_designware 808622C1:06: controller timed out
        ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion]
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      41c80b8a