- May 22, 2018
-
-
George Cherian authored
Add support for SMBus alert mechanism to i2c-xlp9xx driver. The second interrupt is parsed to use for SMBus alert. The first interrupt is the i2c controller main interrupt. Signed-off-by:
Kamlakant Patel <kamlakant.patel@cavium.com> Signed-off-by:
George Cherian <george.cherian@cavium.com> Reviewed-by:
Jan Glauber <jglauber@cavium.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Merge tag 'at24-4.18-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-4.18 Minor improvements to the at24 driver: - use devm_nvmem_register() - provide and use a helper for releasing dummy i2c clients - provide a separate routine for creating dummy i2c clients
-
Boris Brezillon authored
I3C busses have to know about all I2C devices connected on the I3C bus to properly initialize the I3C master, and I2C frames can't be sent on the bus until this initialization is done. We can't let the I2C core parse the DT and instantiate I2C devices as part of its i2c_add_adapter() procedure because, when done this way, I2C devices are directly registered to the device-model and might be attached to drivers which could in turn start sending frames on the bus, which won't work since, as said above, the bus is not yet initialized. Export of_i2c_register_device() in order to let the I3C core parse the I2C device nodes by itself and initialize the bus. Signed-off-by:
Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Boris Brezillon authored
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:
Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- May 17, 2018
-
-
Wolfram Sang authored
-
Wolfram Sang authored
There are no platform_data users anymore. Move the structs into the driver. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Vladimir Zapolskiy <vz@mleia.com>
-
Wolfram Sang authored
This header only contains platform_data. Move it to the proper directory. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Lee Jones <lee.jones@linaro.org>
-
Wolfram Sang authored
This header only contains platform_data. Move it to the proper directory. Signed-off-by:Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
This header only contains platform_data. Move it to the proper directory. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Tony Lindgren <tony@atomide.com>
-
Wolfram Sang authored
This header only contains platform_data. Move it to the proper directory. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Lee Jones <lee.jones@linaro.org>
-
Wolfram Sang authored
This header only contains platform_data. Move it to the proper directory. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Peter Korsgaard <peter.korsgaard@barco.com>
-
Wolfram Sang authored
This header only contains platform_data. Move it to the proper directory. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Tony Lindgren <tony@atomide.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Acked-by:
Robert Jarzmik <robert.jarzmik@free.fr> Acked-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by:
James Hogan <jhogan@kernel.org> Acked-by:
Greg Ungerer <gerg@uclinux.org>
-
Pierre-Yves MORDRET authored
Some data structure members were either misspelled or missing. Fixes: aeb068c5 ("i2c: i2c-stm32f7: add driver") Fixes: 380b8a85e7 ("i2c: i2c-stm32f7: Add initial SMBus protocols support") Signed-off-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Anders Roxell authored
With CONFIG_PM, we get a harmless build warning: drivers/i2c/busses/i2c-i801.c:1723:12: warning: ‘i801_resume’ defined but not used [-Wunused-function] static int i801_resume(struct device *dev) ^~~~~~~~~~~ drivers/i2c/busses/i2c-i801.c:1714:12: warning: ‘i801_suspend’ defined but not used [-Wunused-function] static int i801_suspend(struct device *dev) ^~~~~~~~~~~~ Follow design pattern from other drivers like i2c-brcmstb, i2c-mpc, i2c-ocores, i2c-pnx, i2c-puv3, i2c-st, i2c-stu300 and i2c-mux-pca954x and changing the ifdef CONFIG_PM to CONFIG_PM_SLEEP. Fixes: a9c8088c ("i2c: i801: Don't restore config registers on runtime PM") Signed-off-by:Anders Roxell <anders.roxell@linaro.org> Reviewed-by:
Jean Delvare <jdelvare@suse.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Colin Ian King authored
Trivial fix to spelling mistakes in dev_dbg messages Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Peter Rosin authored
There is a difference between attempts and retries. Signed-off-by:
Peter Rosin <peda@axentia.se> Acked-by:
Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wenwen Wang authored
In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to transfer i2c messages. The number of actual transferred messages is returned and saved to 'status'. If 'status' is negative, that means an error occurred during the transfer process. In that case, the value of 'status' is an error code to indicate the reason of the transfer failure. In most cases, i2c_transfer() can transfer 'num' messages with no error. And so 'status' == 'num'. However, due to unexpected errors, it is probable that only partial messages are transferred by i2c_transfer(). As a result, 'status' != 'num'. This special case is not checked after the invocation of i2c_transfer() and can potentially lead to unexpected issues in the following execution since it is expected that 'status' == 'num'. This patch checks the return value of i2c_transfer() and returns an error code -EIO if the number of actual transferred messages 'status' is not equal to 'num'. Signed-off-by:
Wenwen Wang <wang6495@umn.edu> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- May 16, 2018
-
-
Bartosz Golaszewski authored
Move the code responsible for creating the dummy i2c clients used by chips taking multiple slave addresses to a separate function. Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl> Reviewed-by:
Peter Rosin <peda@axentia.se>
-
Bartosz Golaszewski authored
This allows us to drop two opencoded for loops. We also don't need to check if the i2c client is NULL before calling i2c_unregister_device(). Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl> Reviewed-by:
Peter Rosin <peda@axentia.se>
-
Bartosz Golaszewski authored
We now have a managed variant of nvmem_register(). Use it in at24_probe(). Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl> Reviewed-by:
Peter Rosin <peda@axentia.se>
-
Bartosz Golaszewski authored
Commit feb2f19b ("eeprom: at24: move platform data processing into a separate routine") introduced a bug where we incorrectly retireve the at24_chip_data structure. Remove the unnecessary ampersand operator. Fixes: feb2f19b ("eeprom: at24: move platform data processing into a separate routine") Reported-by:
Vadim Pasternak <vadimp@mellanox.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
- May 15, 2018
-
-
Peter Rosin authored
The else branch cannot be taken as i will always equal num. Get rid of the whole construct. Signed-off-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Andrzej Hajda authored
exynos5_i2c_xfer contains lots of dead code, let's remove it and simplify the rest. The patch should not introduce functional changes. Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Suggested-by:
Peter Rosin <peda@axentia.se> Reviewed-by:
Andi Shyti <andi@etezian.org> Reviewed-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Boris Brezillon authored
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:
Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Alexander Monakov authored
Low-level controller enable function __i2c_dw_enable is overloaded to also handle disabling. What's worse, even though the documentation requires polling the IC_ENABLE_STATUS register when disabling, this is not done: polling needs to be requested specifically by calling __i2c_dw_enable_and_wait, which can also poll on enabling, but that doesn't work if the IC_ENABLE_STATUS register is not implemented. This is quite confusing if not in fact backwards. Especially since the documentation says that disabling should be followed by polling, the driver should be using a separate function where it does one-shot disables to make the optimization stand out. This refactors the two functions so that requested status is given in the name rather than in a boolean argument. Specifically: - __i2c_dw_enable: enable without polling (in accordance with docs) - __i2c_dw_disable: disable and do poll (also as suggested by docs) - __i2c_dw_disable_nowait: disable without polling (Linux-specific) No functional change. Signed-off-by:
Alexander Monakov <amonakov@ispras.ru> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> [wsa: fixed blank lines in header file] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
-
Peter Rosin authored
Returning zero is wrong in this case. Signed-off-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Fixes: 174a13aa ("i2c: Add viperboard i2c master driver")
-
Peter Rosin authored
Returning -1 (-EPERM) is not appropriate here, go with -EIO. Signed-off-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Fixes: 1b144df1 ("i2c: New PMC MSP71xx TWI bus driver")
-
Peter Rosin authored
Returning zero is wrong in this case. Signed-off-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Fixes: 1b144df1 ("i2c: New PMC MSP71xx TWI bus driver")
-
- May 14, 2018
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86/pti updates from Thomas Gleixner: "A mixed bag of fixes and updates for the ghosts which are hunting us. The scheduler fixes have been pulled into that branch to avoid conflicts. - A set of fixes to address a khread_parkme() race which caused lost wakeups and loss of state. - A deadlock fix for stop_machine() solved by moving the wakeups outside of the stopper_lock held region. - A set of Spectre V1 array access restrictions. The possible problematic spots were discuvered by Dan Carpenters new checks in smatch. - Removal of an unused file which was forgotten when the rest of that functionality was removed" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Remove unused file perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map() perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_* perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[] sched/autogroup: Fix possible Spectre-v1 indexing for sched_prio_to_weight[] sched/core: Fix possible Spectre-v1 indexing for sched_prio_to_weight[] sched/core: Introduce set_special_state() kthread, sched/wait: Fix kthread_parkme() completion issue kthread, sched/wait: Fix kthread_parkme() wait-loop sched/fair: Fix the update of blocked load when newly idle stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock -
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull scheduler fix from Thomas Gleixner: "Revert the new NUMA aware placement approach which turned out to create more problems than it solved" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "sched/numa: Delay retrying placement for automatic NUMA balance after wake_affine()"
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull perf tooling fixes from Thomas Gleixner: "Another small set of perf tooling fixes and updates: - Revert "perf pmu: Fix pmu events parsing rule", as it broke Intel PT event description parsing (Arnaldo Carvalho de Melo) - Sync x86's cpufeatures.h and kvm UAPI headers with the kernel sources, suppressing the ABI drift warnings (Arnaldo Carvalho de Melo) - Remove duplicated entry for westmereep-dp in Intel's mapfile.csv (William Cohen) - Fix typo in 'perf bench numa' options description (Yisheng Xie)" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "perf pmu: Fix pmu events parsing rule" tools headers kvm: Sync ARM UAPI headers with the kernel sources tools headers kvm: Sync uapi/linux/kvm.h with the kernel sources tools headers: Sync x86 cpufeatures.h with the kernel sources perf vendor events intel: Remove duplicated entry for westmereep-dp in mapfile.csv perf bench numa: Fix typo in options -
git://git.infradead.org/users/hch/dma-mappingLinus Torvalds authored
Pull dma-mapping fix from Christoph Hellwig: "Just one little fix from Jean to avoid a harmless but very annoying warning, especially for the drm code" * tag 'dma-mapping-4.17-5' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: silent unwanted warning "buffer is full"
-
- May 13, 2018
-
-
git://git.samba.org/sfrench/cifs-2.6Linus Torvalds authored
Pull cifs fixes from Steve French: "Some small SMB3 fixes for 4.17-rc5, some for stable" * tag '4.17-rc4-SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: directory sync should not return an error cifs: smb2ops: Fix listxattr() when there are no EAs cifs: smbd: Enable signing with smbdirect cifs: Allocate validate negotiation request through kmalloc
-
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linuxLinus Torvalds authored
Pull thermal fixes from Zhang Rui: - fix NULL pointer dereference on module load/probe for int3403_thermal driver - fix an emergency shutdown issue on exynos thermal driver * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: exynos: Propagate error value from tmu_read() thermal: exynos: Reading temperature makes sense only when TMU is turned on thermal: int3403_thermal: Fix NULL pointer deref on module load / probe
-
git://git.kernel.dk/linux-blockLinus Torvalds authored
Pull block fixes from Jens Axboe: "Just a few NVMe fixes this round - one fixing a use-after-free, one fixes the return value after controller reset, and the last one fixes an issue where some drives will spuriously EIO. We should get these into 4.17" * tag 'for-linus-20180511' of git://git.kernel.dk/linux-block: nvme: add quirk to force medium priority for SQ creation nvme: Fix sync controller reset return nvme: fix use-after-free in nvme_free_ns_head
-
- May 12, 2018
-
-
Jean Delvare authored
If DMA_ATTR_NO_WARN is passed to swiotlb_alloc_buffer(), it should be passed further down to swiotlb_tbl_map_single(). Otherwise we escape half of the warnings but still log the other half. This is one of the multiple causes of spurious warnings reported at: https://bugs.freedesktop.org/show_bug.cgi?id=104082 Signed-off-by:
Jean Delvare <jdelvare@suse.de> Fixes: 0176adb0 ("swiotlb: refactor coherent buffer allocation") Cc: Christoph Hellwig <hch@lst.de> Cc: Christian König <christian.koenig@amd.com> Cc: Michel Dänzer <michel@daenzer.net> Cc: Takashi Iwai <tiwai@suse.de> Cc: stable@vger.kernel.org # v4.16
-
Mel Gorman authored
This reverts commit 7347fc87 . Srikar Dronamra pointed out that while the commit in question did show a performance improvement on ppc64, it did so at the cost of disabling active CPU migration by automatic NUMA balancing which was not the intent. The issue was that a serious flaw in the logic failed to ever active balance if SD_WAKE_AFFINE was disabled on scheduler domains. Even when it's enabled, the logic is still bizarre and against the original intent. Investigation showed that fixing the patch in either the way he suggested, using the correct comparison for jiffies values or introducing a new numa_migrate_deferred variable in task_struct all perform similarly to a revert with a mix of gains and losses depending on the workload, machine and socket count. The original intent of the commit was to handle a problem whereby wake_affine, idle balancing and automatic NUMA balancing disagree on the appropriate placement for a task. This was particularly true for cases where a single task was a massive waker of tasks but where wake_wide logic did not apply. This was particularly noticeable when a futex (a barrier) woke all worker threads and tried pulling the wakees to the waker nodes. In that specific case, it could be handled by tuning MPI or openMP appropriately, but the behavior is not illogical and was worth attempting to fix. However, the approach was wrong. Given that we're at rc4 and a fix is not obvious, it's better to play safe, revert this commit and retry later. Signed-off-by:
Mel Gorman <mgorman@techsingularity.net> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by:
Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: efault@gmx.de Cc: ggherdovich@suse.cz Cc: hpa@zytor.com Cc: matt@codeblueprint.co.uk Cc: mpe@ellerman.id.au Link: http://lkml.kernel.org/r/20180509163115.6fnnyeg4vdm2ct4v@techsingularity.net Signed-off-by:
Ingo Molnar <mingo@kernel.org>
-