1. 28 Apr, 2017 7 commits
  2. 25 Apr, 2017 1 commit
  3. 21 Apr, 2017 1 commit
    • Tobias Regnery's avatar
      platform/x86: INT33FE: add i2c dependency · 58688a75
      Tobias Regnery authored
      With CONFIG_I2C=m and CONFIG_INTEL_CHT_INT33FE=y we see the following link
      errors:
      
      drivers/built-in.o: In function 'cht_int33fe_remove':
      intel_cht_int33fe.c:(.text+0x391f6e): undefined reference to 'i2c_unregister_device'
      intel_cht_int33fe.c:(.text+0x391f76): undefined reference to 'i2c_unregister_device'
      intel_cht_int33fe.c:(.text+0x391f7d): undefined reference to 'i2c_unregister_device'
      drivers/built-in.o: In function 'cht_int33fe_probe':
      intel_cht_int33fe.c:(.text+0x392147): undefined reference to 'i2c_acpi_new_device'
      intel_cht_int33fe.c:(.text+0x392185): undefined reference to 'i2c_acpi_new_device'
      intel_cht_int33fe.c:(.text+0x3921bd): undefined reference to 'i2c_acpi_new_device'
      intel_cht_int33fe.c:(.text+0x3921d9): undefined reference to 'i2c_unregister_device'
      intel_cht_int33fe.c:(.text+0x3921e8): undefined reference to 'i2c_unregister_device'
      drivers/built-in.o: In function 'cht_int33fe_driver_init':
      intel_cht_int33fe.c:(.init.text+0x2386d): undefined reference to 'i2c_register_driver'
      drivers/built-in.o: In function 'cht_int33fe_driver_exit':
      intel_cht_int33fe.c:(.exit.text+0x206e): undefined reference to 'i2c_del_driver'
      
      Fix this by adding a kconfig dependency on the I2C subsystem.
      
      Fixes: 1cd706df ("platform/x86: Add Intel Cherry Trail ACPI INT33FE device driver")
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      58688a75
  4. 20 Apr, 2017 8 commits
  5. 19 Apr, 2017 7 commits
  6. 18 Apr, 2017 1 commit
  7. 17 Apr, 2017 2 commits
  8. 16 Apr, 2017 3 commits
    • Hans de Goede's avatar
      i2c: core: Allow drivers to disable i2c-core irq mapping · d1d84bb9
      Hans de Goede authored
      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: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      d1d84bb9
    • Hans de Goede's avatar
      i2c: core: Add new i2c_acpi_new_device helper function · 605f8fc2
      Hans de Goede authored
      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: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      605f8fc2
    • Hans de Goede's avatar
      i2c: core: Allow getting ACPI info by index · 417f7843
      Hans de Goede authored
      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: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      417f7843
  9. 14 Apr, 2017 2 commits
  10. 13 Apr, 2017 8 commits