1. 25 Aug, 2020 1 commit
  2. 28 May, 2020 1 commit
  3. 24 Mar, 2020 1 commit
  4. 13 Mar, 2020 1 commit
  5. 15 Jan, 2020 1 commit
  6. 15 Nov, 2019 1 commit
  7. 01 Aug, 2019 1 commit
  8. 30 Jul, 2019 1 commit
  9. 29 Jun, 2019 4 commits
  10. 24 Jun, 2019 1 commit
    • Suzuki K Poulose's avatar
      bus_find_device: Unify the match callback with class_find_device · 418e3ea1
      Suzuki K Poulose authored
      
      
      There is an arbitrary difference between the prototypes of
      bus_find_device() and class_find_device() preventing their callers
      from passing the same pair of data and match() arguments to both of
      them, which is the const qualifier used in the prototype of
      class_find_device().  If that qualifier is also used in the
      bus_find_device() prototype, it will be possible to pass the same
      match() callback function to both bus_find_device() and
      class_find_device(), which will allow some optimizations to be made in
      order to avoid code duplication going forward.  Also with that, constify
      the "data" parameter as it is passed as a const to the match function.
      
      For this reason, change the prototype of bus_find_device() to match
      the prototype of class_find_device() and adjust its callers to use the
      const qualifier in accordance with the new prototype of it.
      
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Andreas Noever <andreas.noever@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: David Kershner <david.kershner@unisys.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Harald Freudenberger <freude@linux.ibm.com>
      Cc: Hartmut Knaack <knaack.h@gmx.de>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jonathan Cameron <jic23@kernel.org>
      Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michael Jamet <michael.jamet@intel.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
      Cc: Sebastian Ott <sebott@linux.ibm.com>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
      Cc: rafael@kernel.org
      Acked-by: default avatarCorey Minyard <minyard@acm.org>
      Acked-by: default avatarDavid Kershner <david.kershner@unisys.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Acked-by: Wolfram Sang <wsa@the-dreams.de> # for the I2C parts
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      418e3ea1
  11. 02 Jun, 2019 1 commit
  12. 30 May, 2019 3 commits
  13. 03 Dec, 2018 3 commits
  14. 20 Aug, 2018 2 commits
  15. 30 Apr, 2018 2 commits
    • Hans de Goede's avatar
      i2c: core: ACPI: Log device not acking errors at dbg loglevel · 7781edae
      Hans de Goede authored
      
      
      Unfortunately some DSDTs issue bogus i2c reads to non existing devices
      resulting in -EREMOTEIO errors because the non existing device of course
      does not ack.
      
      This happens e.g. from the The Asus T100TA's _BIX method, the DSDT on
      the T100TA defines 2 resources on the I2C1 bus:
      
              Name (EHID, ResourceTemplate ()
              {
                  I2cSerialBusV2 (0x005B, ControllerInitiated, 0x00061A80,
                      AddressingMode7Bit, "\\_SB.I2C1",
                      0x00, ResourceConsumer, , Exclusive,
                      )
              })
              OperationRegion (EHOR, GenericSerialBus, Zero, 0x0100)
              Field (EHOR, BufferAcc, NoLock, Preserve)
              {
                  Connection (EHID),
                  Offset (0x01),
                  AccessAs (BufferAcc, AttribBytes (0x10)),
                  ABCD,   8
              }
      
              Name (UMPC, ResourceTemplate ()
              {
                  I2cSerialBusV2 (0x0066, ControllerInitiated, 0x00061A80,
                      AddressingMode7Bit, "\\_SB.I2C1",
                      0x00, ResourceConsumer, , Exclusive,
                      )
              })
      
      The _BIX method does a single read (on each BIX() call) from the EHID
      device through the ABCD Field, only to completely ignore the result.
      This read always fails as there is no i2c client at address 0x5b.
      
      The _BIX method also does several reads from the UMPC device and actually
      uses the results of those to provide battery information.
      
      IIRC I've also seen some DSTDs which do an i2c read to detect if a device
      is present, also leading to false positive errors being logged.
      
      Esp. the _BIX use is problematic as the _BIX method gets called
      periodically to monitor battery status.
      
      This commit stops the logs from filling up with errors like these:
      
      [   57.327858] i2c i2c-0: i2c read 16 bytes from client@0x5b starting at
                     reg 0x1 failed, error: -121
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      7781edae
    • Hans de Goede's avatar
      i2c: core: ACPI: Improve OpRegion read errors · c8016fa2
      Hans de Goede authored
      
      
      When we get an error doing an ACPI SerialBus I2C OpRegion read log some
      useful details, like the client address and which register is being
      read.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      c8016fa2
  16. 31 Jul, 2017 1 commit
  17. 04 Jul, 2017 1 commit
    • Hans de Goede's avatar
      i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices · 3a4991a9
      Hans de Goede authored
      
      
      ACPI video devices get tagged by the kernel with the custom LNXVIDEO
      HID so that normal pnp-id matching can be used and are handled by the
      acpi-video driver.
      
      Sometimes the ACPI nodes describing these contain a SERIAL_TYPE_I2C ACPI
      resource. Before this commit the presence of this resource would cause the
      i2c-core to create a /sys/bus/i2c/devices/i2c-LNXVIDEO:00 device for this
      with a modalias of: "i2c:LNXVIDEO:00".
      
      There is no i2c driver for this custom HID, the acpi-video driver binds
      directly to the ACPI device /sys/bus/acpi/devices/LNXVIDEO\:00 which has
      a modalias of "acpi:LNXVIDEO:" .
      
      Not only is the creation of an i2c-client for this undesirable, it is
      actually causing problems. This weird pseudo-resource claims an i2c
      speed of 100KHz and typically points to the i2c bus which is used by the
      touchscreen controller. Some touchscreen controllers only work properly at
      400KHz, at 100KHz they cause errors like these:
      
      i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration
      i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration
      i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration
      i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration
      silead_ts i2c-MSSL1680:00: Registers clear error -11
      
      This commit makes the i2c-core ignore LNXVIDEO compatible ACPI devices
      which has 2 positive results:
      
      1) The bogus i2c-client for these is no longer created.
      2) i2c_acpi_lookup_speed now ignores the 100KHz speed from the pseudo
      i2c-resouce and properly returns 400KHz as speed for the touchscreen
      i2c bus, fixing the touchscreen not working on various devies.
      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>
      3a4991a9
  18. 31 May, 2017 1 commit