1. 16 1月, 2018 3 次提交
  2. 04 12月, 2017 2 次提交
  3. 28 11月, 2017 3 次提交
  4. 02 11月, 2017 1 次提交
  5. 29 10月, 2017 2 次提交
  6. 27 10月, 2017 1 次提交
    • H
      i2c: Allow overriding dev_name through board_info · 728fe6ce
      Hans de Goede 提交于
      For devices not instantiated through ACPI the i2c-client's device-name
      gets set to <busnr>-<addr> by default, e.g. "0-0022" this means that
      the device-name is dependent on the order in which the i2c-busses are
      enumerated.
      
      In some cases having a predictable constant device-name is desirable,
      for example on non device-tree platforms the link between a regulator
      and its consumers is specified by the platform code by setting
      regulator_init_data.consumers. This array identifies the regulator's
      consumers by dev_name and supply(-name). Which requires a constant
      dev_name.
      
      This commit adds a dev_name field to i2c_board_info allowing
      platform code to set a contstant dev_name so that the device can
      be identified by its dev_name in other platform code.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: Mark Brown <broonie@kernel.org> (live at ELCE17)
      Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> (live at ELCE17)
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      728fe6ce
  7. 15 8月, 2017 1 次提交
  8. 31 7月, 2017 1 次提交
  9. 01 6月, 2017 7 次提交
  10. 17 4月, 2017 3 次提交
    • 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
  11. 02 4月, 2017 2 次提交
  12. 08 2月, 2017 1 次提交
  13. 07 2月, 2017 1 次提交
  14. 29 1月, 2017 1 次提交
  15. 13 1月, 2017 3 次提交
  16. 25 12月, 2016 1 次提交
  17. 09 12月, 2016 1 次提交
    • S
      tracing: Have the reg function allow to fail · 8cf868af
      Steven Rostedt (Red Hat) 提交于
      Some tracepoints have a registration function that gets enabled when the
      tracepoint is enabled. There may be cases that the registraction function
      must fail (for example, can't allocate enough memory). In this case, the
      tracepoint should also fail to register, otherwise the user would not know
      why the tracepoint is not working.
      
      Cc: David Howells <dhowells@redhat.com>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      8cf868af
  18. 24 11月, 2016 1 次提交
    • B
      i2c: use an IRQ to report Host Notify events, not alert · 4d5538f5
      Benjamin Tissoires 提交于
      The current SMBus Host Notify implementation relies on .alert() to
      relay its notifications. However, the use cases where SMBus Host
      Notify is needed currently is to signal data ready on touchpads.
      
      This is closer to an IRQ than a custom API through .alert().
      Given that the 2 touchpad manufacturers (Synaptics and Elan) that
      use SMBus Host Notify don't put any data in the SMBus payload, the
      concept actually matches one to one.
      
      Benefits are multiple:
      - simpler code and API: the client will just have an IRQ, and
        nothing needs to be added in the adapter beside internally
        enabling it.
      - no more specific workqueue, the threading is handled by IRQ core
        directly (when required)
      - no more races when removing the device (the drivers are already
        required to disable irq on remove)
      - simpler handling for drivers: use plain regular IRQs
      - no more dependency on i2c-smbus for i2c-i801 (and any other adapter)
      - the IRQ domain is created automatically when the adapter exports
        the Host Notify capability
      - the IRQ are assign only if ACPI, OF and the caller did not assign
        one already
      - the domain is automatically destroyed on remove
      - fewer lines of code (minus 20, yeah!)
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      4d5538f5
  19. 17 11月, 2016 5 次提交