- 18 5月, 2019 2 次提交
-
-
由 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>
-
由 Heiner Kallweit 提交于
Currently i2c_new_device and i2c_new_dummy return just NULL in error case although they have more error details internally. Therefore move the functionality into new functions returning detailed errors and add wrappers for compatibility with the current API. This allows to use these functions with detailed error codes within the i2c core or for API extensions. 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 3 次提交
-
-
由 Wolfram Sang 提交于
We checked I2C calls, but not SMBus. Refactor the helper to an inline function and use it for both, I2C and SMBus. Fixes: 9ac6cb5f ("i2c: add suspended flag and accessors for i2c adapters") Reported-by: NPeter Rosin <peda@axentia.se> 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>
-
由 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+
-
由 Jarkko Nikula 提交于
Multiple users have reported their Synaptics touchpad has stopped working between v4.20.1 and v4.20.2 when using SMBus interface. The culprit for this appeared to be commit c5eb1190 ("PCI / PM: Allow runtime PM without callback functions") that fixed the runtime PM for i2c-i801 SMBus adapter. Those Synaptics touchpad are using i2c-i801 for SMBus communication and testing showed they are able to get back working by preventing the runtime suspend of adapter. Normally when i2c-i801 SMBus adapter transmits with the client it resumes before operation and autosuspends after. However, if client requires SMBus Host Notify protocol, what those Synaptics touchpads do, then the host adapter must not go to runtime suspend since then it cannot process incoming SMBus Host Notify commands the client may send. Fix this by keeping I2C/SMBus adapter active in case client requires Host Notify. Reported-by: NKeijo Vaara <ferdasyn@rocketmail.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=203297 Fixes: c5eb1190 ("PCI / PM: Allow runtime PM without callback functions") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: NKeijo Vaara <ferdasyn@rocketmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 02 5月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
I'm not sure what made gcc warn about this code now. The 'ret' variable does end up initialized in all cases, but it's definitely not obvious, so the compiler is quite reasonable to warn about this. So just add initialization to make it all much more obvious both to compilers and to humans. Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 16 4月, 2019 3 次提交
-
-
由 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>
-
由 Wolfram Sang 提交于
If I2C transfers are executed in atomic contexts, trylock is used instead of lock. This behaviour was missing for SMBUS, although a lot of transfers are of SMBUS type, either emulated or direct. So, factor out the locking routine into a helper and use it for I2C and SMBUS. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Commit cea443a8 ("i2c: Support i2c_transfer in atomic contexts") added in_atomic() to the I2C core. However, the use of in_atomic() outside of core kernel code is discouraged and was already[1] when this code was added in early 2008. The above commit was a preparation for commit b7a36701 ("i2c-pxa: Add polling transfer"). Its commit message says explicitly it was added "for cases where I2C transactions have to occur at times interrup[t]s are disabled". So, the intention was 'disabled interrupts'. This matches the use cases for atomic I2C transfers I have seen so far: very late communication (mostly to a PMIC) to powerdown or reboot the system. For those cases, interrupts are disabled then. It doesn't seem that in_atomic() adds value. After a discussion with Peter Zijlstra[2], we came up with a better set of conditionals to match the use case. The I2C core will soon gain an extra callback into bus drivers especially for atomic transfers to make them more generic. The code deciding which transfer to use (atomic/non-atomic) should mimic the behaviour which locking to use (trylock/lock). This is why we add a helper for it. [1] https://lwn.net/Articles/274695/ [2] http://patchwork.ozlabs.org/patch/1067437/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>
-
- 14 3月, 2019 1 次提交
-
-
由 Wolfram Sang 提交于
Make sure we report 'no buffer' for 0-length messages. This can only happen if threshold is set to 0 which is kind of bogus but we should still handle this situation. Update the docs and add a debug message to educate callers of this function. Reported-by: NHsin-Yi Wang <hsinyi@chromium.org> Fixes: e94bc5d1 ("i2c: add helpers to ease DMA handling") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NHsin-Yi Wang <hsinyi@chromium.org> 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>
-
- 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>
-
- 01 11月, 2018 2 次提交
-
-
由 Charles Keepax 提交于
The IRQ will be mapped in i2c_device_probe only if client->irq is zero and i2c_device_remove does not clear this. When rebinding an I2C device, whos IRQ provider has also been rebound this means that an IRQ mapping will never be created, causing the I2C device to fail to acquire its IRQ. Fix this issue by clearing client->irq in i2c_device_remove, forcing i2c_device_probe to lookup the mapping again. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Charles Keepax 提交于
irq_create_mapping calls irq_find_mapping internally and will use the found mapping if one exists, so there is no need to manually call this from i2c_smbus_host_notify_to_irq. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 12 10月, 2018 1 次提交
-
-
由 Stephen Boyd 提交于
This function was renamed in commit 82fe39a6 ("i2c: refactor function to release a DMA safe buffer") but this kernel doc wasn't updated to point at the new function. Rename it. Fixes: 82fe39a6 ("i2c: refactor function to release a DMA safe buffer") Signed-off-by: NStephen Boyd <swboyd@chromium.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 10月, 2018 2 次提交
-
-
由 Wolfram Sang 提交于
Using the common kernel pattern to bail out at the beginning if some conditions are not met, we can save a level of indentation. No functional change. 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>
-
由 Wolfram Sang 提交于
The usefulness of this debug output is questionable. It covers only direct i2c_transfer calls and no SMBUS calls, neither direct nor emulated ones. And the latter one is largely used in the kernel, so a lot of stuff is missed. False positives are also generated in case the locking later fails. Also, we have a proper tracing mechanism for all these kinds of transfers in place for years now. Remove this old one. 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>
-
- 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>
-
- 25 7月, 2018 1 次提交
-
-
由 Peter Rosin 提交于
If an i2c topology has instances of nested muxes, then a lockdep splat is produced when when i2c_parent_lock_bus() is called. Here is an example: ============================================ WARNING: possible recursive locking detected -------------------------------------------- insmod/68159 is trying to acquire lock: (i2c_register_adapter#2){+.+.}, at: i2c_parent_lock_bus+0x32/0x50 [i2c_mux] but task is already holding lock: (i2c_register_adapter#2){+.+.}, at: i2c_parent_lock_bus+0x32/0x50 [i2c_mux] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(i2c_register_adapter#2); lock(i2c_register_adapter#2); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by insmod/68159: #0: (i2c_register_adapter#2){+.+.}, at: i2c_parent_lock_bus+0x32/0x50 [i2c_mux] stack backtrace: CPU: 13 PID: 68159 Comm: insmod Tainted: G O Call Trace: dump_stack+0x67/0x98 __lock_acquire+0x162e/0x1780 lock_acquire+0xba/0x200 rt_mutex_lock+0x44/0x60 i2c_parent_lock_bus+0x32/0x50 [i2c_mux] i2c_parent_lock_bus+0x3e/0x50 [i2c_mux] i2c_smbus_xfer+0xf0/0x700 i2c_smbus_read_byte+0x42/0x70 my2c_init+0xa2/0x1000 [my2c] do_one_initcall+0x51/0x192 do_init_module+0x62/0x216 load_module+0x20f9/0x2b50 SYSC_init_module+0x19a/0x1c0 SyS_init_module+0xe/0x10 do_syscall_64+0x6c/0x1a0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Reported-by: NJohn Sperbeck <jsperbeck@google.com> Tested-by: NJohn Sperbeck <jsperbeck@google.com> Signed-off-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Deepa Dinamani <deepadinamani@google.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Chang <dpf@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Cc: Wolfram Sang <wsa@the-dreams.de> Link: http://lkml.kernel.org/r/20180720083914.1950-3-peda@axentia.seSigned-off-by: NIngo Molnar <mingo@kernel.org>
-
- 21 7月, 2018 1 次提交
-
-
由 Wolfram Sang 提交于
When we initialize the pins, make sure it looks like STOP by dividing the delay into halves. It shouldn't matter because SDA is expected to be held low by a device, but for super-safety, let's do it. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NUlrich Hecht <ulrich.hecht+renesas@gmail.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 7月, 2018 4 次提交
-
-
由 Wolfram Sang 提交于
While refactoring the routine before, it occurred to me that this will make the code much easier to understand. 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>
-
由 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 提交于
After exiting the while loop, we checked if recovery was successful and sent a STOP to the clients. Meanwhile however, we send a STOP after every pulse, so it is not needed after the loop. If we move the check for a free bus to the end of the while loop, we can shorten and simplify the logic. It is still ensured that at least one STOP will be sent to the wire even if SDA was not stuck low. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NPeter Rosin <peda@axentia.se> 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>
-
- 13 7月, 2018 1 次提交
-
-
由 Wolfram Sang 提交于
I2C clients may misunderstand recovery pulses if they can't read SDA to bail out early. In the worst case, as a write operation. To avoid that and if we can write SDA, try to send STOP to avoid the misinterpretation. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- 22 5月, 2018 1 次提交
-
-
由 Boris Brezillon 提交于
Currently, of_i2c_register_devices() is responsible for retaining info->of_node, but we're about to expose a function to parse I2C board info without registering the I2C device. We could possibly let this function retain ->of_node, but this approach is prone to reference leak since people will have to remember to call of_node_put() if something goes wrong between the OF node parsing and the registration step. Let's just retain the ->of_node in i2c_new_register() instead. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 5月, 2018 2 次提交
-
-
由 Boris Brezillon 提交于
The only user of i2c_board_info->archdata is the OF parsing code and it just pass a zero-initialized object which has the same effect as leaving ->archdata to NULL since the client object is allocated with kzalloc(). Get rid of this useless field. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ulf Hansson 提交于
The limitation of being able to check only for -EPROBE_DEFER from dev_pm_domain_attach() has been removed. Hence let's respect all error codes and bail out accordingly. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 12 4月, 2018 1 次提交
-
-
由 Ard Biesheuvel 提交于
The API docs describe i2c_transfer() as taking a pointer to an array of i2c_msg containing at least 1 entry, but leaves it to the individual drivers to sanity check the msgs and num parameters. Let's do this in core code instead. Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org> [wsa: changed '<= 0' to '< 1'] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 4月, 2018 1 次提交
-
-
由 Davidlohr Bueso 提交于
No changes in refcount semantics -- key init is false; replace static_key_slow_inc|dec with static_branch_inc|dec static_key_false with static_branch_unlikely Added a '_key' suffix to i2c_trace_msg, for better self documentation. Signed-off-by: NDavidlohr Bueso <dbueso@suse.de> Reviewed-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 4月, 2018 1 次提交
-
-
由 Ahbong Chang 提交于
According to the event i2c_result defined in include/trace/events/i2c.h, the second parameter should be the number of messages instead of the ended loop index. The value of ended loop index is the same as ret. Signed-off-by: NAhbong Chang <cwahbong@google.com> Reviewed-by: NTodd Poynor <toddpoynor@google.com> Reviewed-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 3月, 2018 1 次提交
-
-
由 Wolfram Sang 提交于
After previous refactoring, there is only one user in the same file left. Make the function static now. [wsa: added 'int' to bare 'unsigned'] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 3月, 2018 1 次提交
-
-
由 Peter Rosin 提交于
Can be used during probe to double check that the probed device is what is expected. Loosely based on code from Adrian Fiergolski <adrian.fiergolski@cern.ch>. Tested-by: NAdrian Fiergolski <adrian.fiergolski@cern.ch> Reviewed-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NPeter Rosin <peda@axentia.se>
-
- 05 3月, 2018 1 次提交
-
-
由 Javier Martinez Canillas 提交于
The buses should honor the firmware interface used to register the device, but the I2C core reports a MODALIAS of the form i2c:<device> even for I2C devices registered via OF. This means that user-space will never get an OF stype uevent MODALIAS even when the drivers modules contain aliases exported from both the I2C and OF device ID tables. For example, an Atmel maXTouch Touchscreen registered by a DT node with compatible "atmel,maxtouch" has the following module alias: $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias i2c:maxtouch So udev won't be able to auto-load a module for an OF-only device driver. Many OF-only drivers duplicate the OF device ID table entries in an I2C ID table only has a workaround for how the I2C core reports the module alias. This patch changes the I2C core to report an OF related MODALIAS uevent if the device was registered via OF. So for the previous example, after this patch, the reported MODALIAS for the Atmel maXTouch will be the following: $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias of:NtrackpadT<NULL>Catmel,maxtouch NOTE: This patch may break out-of-tree drivers that were relying on this behavior, and only had an I2C device ID table even when the device was registered via OF. There are no remaining drivers in mainline that do this, but out-of-tree drivers have to be fixed and define a proper OF device ID table to have module auto-loading working. Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Tested-by: NDmitry Mastykin <mastichi@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 1月, 2018 1 次提交
-
-
由 Lixin Wang 提交于
Reference count of device node was increased in of_i2c_register_device, but without decreasing it in i2c_unregister_device. Then the added device node will never be released. Fix this by adding the of_node_put. Signed-off-by: NLixin Wang <alan.1.wang@nokia-sbell.com> Tested-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- 16 1月, 2018 2 次提交
-
-
由 Wolfram Sang 提交于
If we managed to get a client release SDA again, send a STOP afterwards to make sure we have a consistent state on the bus again. Tested-by: NPhil Reid <preid@electromag.com.au> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
If we have a function to control SDA, we should ensure that SDA is not held down by us. So, release the GPIO in this case. Tested-by: NPhil Reid <preid@electromag.com.au> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-