1. 17 1月, 2023 1 次提交
  2. 05 12月, 2022 1 次提交
    • S
      drivers/i2c: use simple i2c probe · a00f6d37
      Stephen Kitt 提交于
      All these drivers have an i2c probe function which doesn't use the
      "struct i2c_device_id *id" parameter, so they can trivially be
      converted to the "probe_new" style of probe with a single argument.
      
      This is part of an ongoing transition to single-argument i2c probe
      functions. Old-style probe functions involve a call to i2c_match_id:
      in drivers/i2c/i2c-core-base.c,
      
               /*
                * When there are no more users of probe(),
                * rename probe_new to probe.
                */
               if (driver->probe_new)
                       status = driver->probe_new(client);
               else if (driver->probe)
                       status = driver->probe(client,
                                              i2c_match_id(driver->id_table, client));
               else
                       status = -EINVAL;
      
      Drivers which don't need the second parameter can be declared using
      probe_new instead, avoiding the call to i2c_match_id. Drivers which do
      can still be converted to probe_new-style, calling i2c_match_id
      themselves (as is done currently for of_match_id).
      
      This change was done using the following Coccinelle script, and fixed
      up for whitespace changes:
      
      @ rule1 @
      identifier fn;
      identifier client, id;
      @@
      
      - static int fn(struct i2c_client *client, const struct i2c_device_id *id)
      + static int fn(struct i2c_client *client)
      {
      ...when != id
      }
      
      @ rule2 depends on rule1 @
      identifier rule1.fn;
      identifier driver;
      @@
      
      struct i2c_driver driver = {
      -       .probe
      +       .probe_new
                      =
      (
                         fn
      |
      -                  &fn
      +                  fn
      )
                      ,
      };
      Signed-off-by: NStephen Kitt <steve@sk2.org>
      Signed-off-by: NWolfram Sang <wsa@kernel.org>
      a00f6d37
  3. 15 11月, 2022 2 次提交
  4. 04 10月, 2022 1 次提交
  5. 16 8月, 2022 1 次提交
  6. 12 8月, 2022 1 次提交
  7. 17 6月, 2022 1 次提交
  8. 09 6月, 2022 1 次提交
  9. 01 3月, 2022 1 次提交
  10. 29 1月, 2022 1 次提交
  11. 08 1月, 2022 1 次提交
  12. 30 11月, 2021 2 次提交
  13. 04 11月, 2021 1 次提交
  14. 21 7月, 2021 1 次提交
    • U
      bus: Make remove callback return void · fc7a6209
      Uwe Kleine-König 提交于
      The driver core ignores the return value of this callback because there
      is only little it can do when a device disappears.
      
      This is the final bit of a long lasting cleanup quest where several
      buses were converted to also return void from their remove callback.
      Additionally some resource leaks were fixed that were caused by drivers
      returning an error code in the expectation that the driver won't go
      away.
      
      With struct bus_type::remove returning void it's prevented that newly
      implemented buses return an ignored error code and so don't anticipate
      wrong expectations for driver authors.
      
      Reviewed-by: Tom Rix <trix@redhat.com> (For fpga)
      Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Reviewed-by: Cornelia Huck <cohuck@redhat.com> (For drivers/s390 and drivers/vfio)
      Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts)
      Acked-by: NMark Brown <broonie@kernel.org>
      Acked-by: Chen-Yu Tsai <wens@csie.org> (for sunxi-rsb)
      Acked-by: NPali Rohár <pali@kernel.org>
      Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for media)
      Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform)
      Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
      Acked-By: NVinod Koul <vkoul@kernel.org>
      Acked-by: Juergen Gross <jgross@suse.com> (For xen)
      Acked-by: Lee Jones <lee.jones@linaro.org> (For mfd)
      Acked-by: Johannes Thumshirn <jth@kernel.org> (For mcb)
      Acked-by: NJohan Hovold <johan@kernel.org>
      Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For slimbus)
      Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For vfio)
      Acked-by: NMaximilian Luz <luzmaximilian@gmail.com>
      Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec)
      Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack)
      Acked-by: Geoff Levand <geoff@infradead.org> (For ps3)
      Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt)
      Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th)
      Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia)
      Acked-by: Rafael J. Wysocki <rafael@kernel.org> (For ACPI)
      Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr)
      Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (For intel-ish-hid)
      Acked-by: Dan Williams <dan.j.williams@intel.com> (For CXL, DAX, and NVDIMM)
      Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> (For isa)
      Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (For firewire)
      Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (For hid)
      Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> (For siox)
      Acked-by: Sven Van Asbroeck <TheSven73@gmail.com> (For anybuss)
      Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (For MMC)
      Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C
      Acked-by: NSudeep Holla <sudeep.holla@arm.com>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: NFinn Thain <fthain@linux-m68k.org>
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc7a6209
  15. 25 6月, 2021 1 次提交
    • D
      i2c: core: Disable client irq on reboot/shutdown · b64210f2
      Dmitry Torokhov 提交于
      If an i2c client receives an interrupt during reboot or shutdown it may
      be too late to service it by making an i2c transaction on the bus
      because the i2c controller has already been shutdown. This can lead to
      system hangs if the i2c controller tries to make a transfer that is
      doomed to fail because the access to the i2c pins is already shut down,
      or an iommu translation has been torn down so i2c controller register
      access doesn't work.
      
      Let's simply disable the irq if there isn't a shutdown callback for an
      i2c client when there is an irq associated with the device. This will
      make sure that irqs don't come in later than the time that we can handle
      it. We don't do this if the i2c client device already has a shutdown
      callback because presumably they're doing the right thing and quieting
      the device so irqs don't come in after the shutdown callback returns.
      Reported-by: Nkernel test robot <lkp@intel.com>
      [swboyd@chromium.org: Dropped newline, added commit text, added
      interrupt.h for robot build error]
      Signed-off-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NWolfram Sang <wsa@kernel.org>
      b64210f2
  16. 29 5月, 2021 1 次提交
  17. 28 5月, 2021 1 次提交
  18. 17 4月, 2021 1 次提交
  19. 11 4月, 2021 4 次提交
  20. 09 4月, 2021 2 次提交
  21. 31 3月, 2021 1 次提交
  22. 18 3月, 2021 1 次提交
  23. 11 12月, 2020 2 次提交
  24. 18 9月, 2020 1 次提交
  25. 25 8月, 2020 1 次提交
  26. 05 8月, 2020 2 次提交
  27. 28 7月, 2020 1 次提交
  28. 25 7月, 2020 1 次提交
  29. 19 6月, 2020 1 次提交
  30. 27 5月, 2020 1 次提交
  31. 22 5月, 2020 1 次提交
  32. 20 5月, 2020 1 次提交