- 22 7月, 2020 1 次提交
-
-
由 Randy Dunlap 提交于
Drop the doubled word "be" in a comment. Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 19 6月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
All in-tree users have been converted to the new i2c_new_client_device function, so remove this deprecated one. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 29 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
i2c_client pointers are usually named 'client'. Use it here to get rid of the ambiguity of 'dev->dev'. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 22 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
This reverts commit 6fe12cdb. Testing in linux-next showed it needs some more time. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 20 5月, 2020 1 次提交
-
-
由 Bibby Hsieh 提交于
Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We get and enable bulk regulator in i2c adapter device. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: NTomasz Figa <tfiga@chromium.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 05 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
The old email is still active, but for easier handling, I am going to use my kernel.org address from now on. Also, add a mailmap for the now defunct Pengutronix address. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 15 4月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
All in-tree users have been converted to the new i2c_new_scanned_device function, so remove this deprecated one. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 25 3月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
There are few maximum bus frequencies being used in the I²C core code. Provide generic definitions for bus frequencies and use them in the core. The drivers may use predefined constants where it is appropriate. Some of them are already using these under slightly different names. We will convert them later to use newly introduced defines. Note, the name of modes are chosen to follow well established naming scheme [1]. These definitions will also help to avoid typos in the numbers that may lead to subtle errors. [1]: https://en.wikipedia.org/wiki/I%C2%B2C#Differences_between_modesAcked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 23 3月, 2020 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
Don't let non-letters inside a literal block without escaping it, as the toolchain would mis-interpret it: ./include/linux/i2c.h:518: WARNING: Inline strong start-string without end-string. Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 12月, 2019 1 次提交
-
-
由 Luca Ceresoli 提交于
According to coding-style.rst, extern should not be specified for exported functions. Signed-off-by: NLuca Ceresoli <luca@lucaceresoli.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 11 12月, 2019 3 次提交
-
-
由 Wolfram Sang 提交于
As a preparation for an API conversion, factor out something frequently used in the media subsystem. As an improvement, it bails out on both, NULL and ERRPTR to handle the old and new API. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Randy Dunlap 提交于
Fix kernel-doc warning in <linux/i2c.h>. ../include/linux/i2c.h:337: warning: Function parameter or member 'init_irq' not described in 'i2c_client' Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
All in-kernel users have been converted to {devm_}i2c_new_dummy_device(). Remove the old API. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 29 11月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
In the general move to have i2c_new_*_device functions which return ERR_PTR instead of NULL, this patch converts i2c_new_probed_device(). There are only few users, so this patch converts the I2C core and all users in one go. The function gets renamed to i2c_new_scanned_device() so out-of-tree users will get a build failure to understand they need to adapt their error checking code. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NMax Staudt <max@enpas.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 16 11月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
There are no in-tree users of these helpers anymore, and there shouldn't. Most use cases went away once the driver model started to refcount for us. There have been users like the media subsystem, but they all switched to better refcounting methods meanwhile. Media did this in 2008. Last user (IPMI) left 2018. Remove this cruft. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NJean Delvare <jdelvare@suse.de> Tested-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
-
- 25 10月, 2019 1 次提交
-
-
由 Eugen Hristev 提交于
i2c-digital-filter-width-ns: This optional timing property specifies the width of the spikes on the i2c lines (in ns) that can be filtered out by built-in digital filters which are embedded in some i2c controllers. i2c-analog-filter-cutoff-frequency: This optional timing property specifies the cutoff frequency of a low-pass analog filter built-in i2c controllers. This low pass filter is used to filter out high frequency noise on the i2c lines. Specified in Hz. Include these properties in the timings structure and read them as integers. Signed-off-by: NEugen Hristev <eugen.hristev@microchip.com> Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 8月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
In the general move to have i2c_new_*_device functions which return ERR_PTR instead of NULL, this patch converts i2c_new_secondary_device(). There are only few users, so this patch converts the I2C core and all users in one go. The function gets renamed to i2c_new_ancillary_device() so out-of-tree users will get a build failure to understand they need to adapt their error checking code. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> # adv748x Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # adv7511 + adv7604 Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # adv7604 Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 01 8月, 2019 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
Convert each file at I2C subsystem, renaming them to .rst and adding to the driver-api book. Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NJonathan Corbet <corbet@lwn.net>
-
- 26 6月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
Nobody (including me) noticed that these functions were exported but not added to the header :/ Fixes: 7159dbda ("i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NKieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 6月, 2019 4 次提交
-
-
由 Wolfram Sang 提交于
Let's stick to coding style. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Update kerneldoc for i2c client flags because they increased over time. Also, move them to a position where they can be more easily found. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Much better to read and understand. Naming for i2c_adapter is not consistent (yet), so use the name which is also used in core code. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
It is not a struct device, so 'dev' is confusing. Use 'adap', the most common name. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 6月, 2019 1 次提交
-
-
由 Ruslan Babayev 提交于
This allows drivers to lookup i2c adapters on ACPI based systems similar to of_get_i2c_adapter_by_node() with DT based systems. Signed-off-by: NRuslan Babayev <ruslan@babayev.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 31 5月, 2019 1 次提交
-
-
由 Ruslan Babayev 提交于
This allows drivers to lookup i2c adapters on ACPI based systems similar to of_get_i2c_adapter_by_node() with DT based systems. Signed-off-by: NRuslan Babayev <ruslan@babayev.com> Cc: xe-linux-external@cisco.com Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 21 5月, 2019 1 次提交
-
-
由 Thomas Gleixner 提交于
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin street fifth floor boston ma 02110 1301 usa this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option [no]_[pad]_[ctrl] any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin street fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 176 file(s). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NJilayne Lovejoy <opensource@jilayne.com> Reviewed-by: NSteve Winslow <swinslow@gmail.com> Reviewed-by: NAllison Randal <allison@lohutok.net> Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 5月, 2019 1 次提交
-
-
由 Heiner Kallweit 提交于
i2c_new_dummy is typically called from the probe function of the driver for the primary i2c client. It requires calls to i2c_unregister_device in the error path of the probe function and in the remove function. This can be simplified by introducing a device-managed version. Note the changed error case return value type: i2c_new_dummy returns NULL whilst devm_i2c_new_dummy_device returns an ERR_PTR. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> [wsa: rename new functions and fix minor kdoc issues] Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Reviewed-by: NKieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 5月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
There are two problems with WARN_ON() here. One: It is not ratelimited. Two: We don't see which adapter was used when trying to transfer something when already suspended. Implement a custom ratelimit once per adapter and use dev_WARN there. This fixes both issues. Drawback is that we don't see if multiple drivers are trying to transfer with the same adapter while suspended. They need to be discovered one after the other now. This is better than a high CPU load because a really broken driver might try to resend endlessly. Fixes: 9ac6cb5f ("i2c: add suspended flag and accessors for i2c adapters") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@vger.kernel.org # v5.1+
-
- 16 4月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
We had the request to access devices very late when interrupts are not available anymore multiple times now. Mostly to prepare shutdown or reboot. Allow adapters to specify a specific callback for this case. Note that we fall back to the generic {master|smbus}_xfer callback if this new atomic one is not present. This is intentional to preserve the previous behaviour and avoid regressions. Because there are drivers not using interrupts or because it might have worked "accidently" before. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NStefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 27 3月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 2月, 2019 1 次提交
-
-
由 Jim Broadus 提交于
A previous change allowed I2C client devices to discover new IRQs upon reprobe by clearing the IRQ in i2c_device_remove. However, if an IRQ was assigned in i2c_new_device, that information is lost. For example, the touchscreen and trackpad devices on a Dell Inspiron laptop are I2C devices whose IRQs are defined by ACPI extended IRQ types. The client device structures are initialized during an ACPI walk. After removing the i2c_hid device, modprobe fails. This change caches the initial IRQ value in i2c_new_device and then resets the client device IRQ to the initial value in i2c_device_remove. Fixes: 6f108dd7 ("i2c: Clear client->irq in i2c_device_remove") Signed-off-by: NJim Broadus <jbroadus@gmail.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: NCharles Keepax <ckeepax@opensource.cirrus.com> [wsa: this is an easy to backport fix for the regression. We will refactor the code to handle irq assignments better in general.] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 16 1月, 2019 1 次提交
-
-
由 Andy Shevchenko 提交于
As discussed previously the best location for certain bus related bits, e.g. I2C, is its own realm of the headers. In order to uncontaminate acpi.h move the I2C bits to i2c.h. There is no functional change intended. Link: https://lkml.org/lkml/2018/11/28/744Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 09 1月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
A few drivers open code the handling of suspended adapters. It could be handled by the core, though, to ensure generic handling. This patch adds the flag and accessor functions. The usage of these helpers is optional, though. See the kerneldoc in this patch. Using the new flag, we now reject further transfers if the adapter is already marked suspended. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 31 8月, 2018 1 次提交
-
-
由 Wolfram Sang 提交于
a) rename to 'put' instead of 'release' to match 'get' when obtaining the buffer b) change the argument order to have the buffer as first argument c) add a new argument telling the function if the message was transferred. This allows the function to be used also in cases where setting up DMA failed, so the buffer needs to be freed without syncing to the message buffer. Also convert the only user. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 8月, 2018 1 次提交
-
-
由 Wolfram Sang 提交于
There aren't any users left. Remove this callback from the 2.4 times. Phew, finally, that took years to reach... Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 09 8月, 2018 1 次提交
-
-
由 Andy Shevchenko 提交于
There are two drivers already using the SDA hold time setting. It might be more in the future, thus, make I2C core to parse the setting for us if provided by firmware. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 05 8月, 2018 1 次提交
-
-
由 Wolfram Sang 提交于
Some adapters do not support a message length of 0. Add this as a quirk so drivers don't have to open code it. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Tested-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 21 7月, 2018 1 次提交
-
-
由 Peter Rosin 提交于
Removes all locking from i2c_smbus_xfer and renames it to __i2c_smbus_xfer, then adds a new i2c_smbus_xfer function that simply grabs the lock while calling the unlocked variant. This is not perfectly equivalent, since i2c_smbus_xfer was callable from atomic/irq context if you happened to end up emulating SMBus with an I2C transfer, and that is no longer the case with this patch. It is unknown (to me) if anything depends on that quirk, but it seems fragile enough to simply break those cases and require them to call i2c_transfer directly instead. While at it, for consistency rename the 2nd to last argument (size) of the i2c_smbus_xfer declaration to protocol and remove the surplus extern marker. Signed-off-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 7月, 2018 2 次提交
-
-
由 Wolfram Sang 提交于
Some IP cores have an internal 'bus free' logic which may be more advanced than just checking if SDA is high. Add a separate callback to get this status. Filling it is optional. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
For bus recovery, we either need to bail out early if we can read SDA or we need to send STOP after every pulse. Otherwise recovery might be misinterpreted as an unwanted write. So, require one of those SDA handling functions to avoid this problem. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-