summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
AgeCommit message (Collapse)Author
2014-10-05i2c: ismt: use correct length when copy bufferFan Du
commit 979bbf7b7ae75cfc06e09d09eda38009a3bdc4a4 upstream. In block write mode, when encapsulating dma_buffer, first element is 'command', the rest is data buffer, so only copy actual data buffer starting from block[1] with the size indicating by block[0]. Signed-off-by: Fan Du <fan.du@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-05i2c: at91: Fix a race condition during signal handling in at91_do_twi_xfer.Simon Lindgren
commit 6721f28a26efd6368497abbdef5dcfc59608d899 upstream. There is a race condition in at91_do_twi_xfer when signals arrive. If a signal is recieved while waiting for a transfer to complete wait_for_completion_interruptible_timeout() will return -ERESTARTSYS. This is not handled correctly resulting in interrupts still being enabled and a transfer being in flight when we return. Symptoms include a range of oopses and bus lockups. Oopses can happen when the transfer completes because the interrupt handler will corrupt the stack. If a new transfer is started before the interrupt fires the controller will start a new transfer in the middle of the old one, resulting in confused slaves and a locked bus. To avoid this, use wait_for_completion_io_timeout instead so that we don't have to deal with gracefully shutting down the transfer and disabling the interrupts. Signed-off-by: Simon Lindgren <simon@aqwary.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-05i2c: at91: add bound checking on SMBus block length bytesMarek Roszko
commit 75b81f339c6af43f6f4a1b3eabe0603321dade65 upstream. The driver was not bound checking the received length byte to ensure it was within the the buffer size that is allocated for SMBus blocks. This resulted in buffer overflows whenever an invalid length byte was received. It also failed to ensure the length byte was not zero. If it received zero, it would end up in an infinite loop as the at91_twi_read_next_byte function returned immediately without allowing RHR to be read to clear the RXRDY interrupt. Tested agaisnt a SMBus compliant battery. Signed-off-by: Marek Roszko <mark.roszko@gmail.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-05i2c: mv64xxx: continue probe when clock-frequency is missingChen-Yu Tsai
commit 0ce4bc1dbdd911ae1763e2d4ff36bd1b214a59f7 upstream. The "clock-frequency" DT property is listed as optional, However, the current code stores the return value of of_property_read_u32 in the return code of mv64xxx_of_config, but then forgets to clear it after setting the default value of "clock-frequency". It is then passed out to the main probe function, resulting in a probe failure when "clock-frequency" is missing. This patch checks and then throws away the return value of of_property_read_u32, instead of storing it and having to clear it afterwards. This issue was discovered after the property was removed from all sunxi DTs. Fixes: 4c730a06c19bb ("i2c: mv64xxx: Set bus frequency to 100kHz if clock-frequency is not provided") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-05drivers/i2c/busses: use correct type for dma_map/unmapWolfram Sang
commit 28772ac8711e4d7268c06e765887dd8cb6924f98 upstream. dma_{un}map_* uses 'enum dma_data_direction' not 'enum dma_transfer_direction'. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07i2c: s3c2410: resume race fixOlof Johansson
commit ce78cc071f5f541480e381cc0241d37590041a9d upstream. Don't unmark the device as suspended until after it's been re-setup. The main race would be w.r.t. an i2c driver that gets resumed at the same time (asyncronously), that is allowed to do a transfer since suspended is set to 0 before reinit, but really should have seen the -EIO return instead. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07i2c: designware: Mask all interrupts during i2c controller enableDu, Wenkai
commit 47bb27e78867997040a228328f2a631c3c7f2c82 upstream. There have been "i2c_designware 80860F41:00: controller timed out" errors on a number of Baytrail platforms. The issue is caused by incorrect value in Interrupt Mask Register (DW_IC_INTR_MASK) when i2c core is being enabled. This causes call to __i2c_dw_enable() to immediately start the transfer which leads to timeout. There are 3 failure modes observed: 1. Failure in S0 to S3 resume path The default value after reset for DW_IC_INTR_MASK is 0x8ff. When we start the first transaction after resuming from system sleep, TX_EMPTY interrupt is already unmasked because of the hardware default. 2. Failure in normal operational path This failure happens rarely and is hard to reproduce. Debug trace showed that DW_IC_INTR_MASK had value of 0x254 when failure occurred, which meant TX_EMPTY was unmasked. 3. Failure in S3 to S0 suspend path This failure also happens rarely and is hard to reproduce. Adding debug trace that read DW_IC_INTR_MASK made this failure not reproducible. But from ISR call trace we could conclude TX_EMPTY was unmasked when problem occurred. The patch masks all interrupts before the controller is enabled to resolve the faulty DW_IC_INTR_MASK conditions. Signed-off-by: Wenkai Du <wenkai.du@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> [wsa: improved the comment and removed typo in commit msg] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07i2c: rcar: bail out on zero length transfersWolfram Sang
commit d7653964c590ba846aa11a8f6edf409773cbc492 upstream. This hardware does not support zero length transfers. Instead, the driver does one (random) byte transfers currently with undefined results for the slaves. We now bail out. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07i2c: i801: enable Intel BayTrail SMBUSChew, Kean ho
commit 1b31e9b76ef8c62291e698dfdb973499986a7f68 upstream. Add Device ID of Intel BayTrail SMBus Controller. Signed-off-by: Chew, Kean ho <kean.ho.chew@intel.com> Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: "Chang, Rebecca Swee Fun" <rebecca.swee.fun.chang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-24i2c: cpm: Fix build by adding of_address.h and of_irq.hScott Wood
Fixes a build break due to the undeclared use of irq_of_parse_and_map() and of_iomap(). This build break was apparently introduced while the driver was unbuildable due to the bug fixed by 62c19c9d29e65086e5ae76df371ed2e6b23f00cd ("i2c: Remove usage of orphaned symbol OF_I2C"). When 62c19c was added in v3.14-rc7, the driver was enabled again, breaking the powerpc mpc85xx_defconfig and mpc85xx_smp_defconfig. 62c19c is marked for stable, so this should go there as well. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2014-03-13i2c: Remove usage of orphaned symbol OF_I2CRichard Weinberger
The symbol is an orphan, don't depend on it anymore. Signed-off-by: Richard Weinberger <richard@nod.at> [wsa: enhanced commit message] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Fixes: 687b81d083c0 (i2c: move OF helpers into the core) Cc: stable@kernel.org
2014-02-15i2c: mv64xxx: refactor message start to ensure proper initializationWolfram Sang
Because the offload mechanism can fall back to a standard transfer, having two seperate initialization states is unfortunate. Let's just have one state which does things consistently. This fixes a bug where some preparation was missing when the fallback happened. And it makes the code much easier to follow. To implement this, we put the check if offload is possible at the top of the offload setup function. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Cc: stable@vger.kernel.org # v3.12+ Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support)
2014-01-29Merge branch 'i2c/for-current' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "Mostly bugfixes, small but wanted cleanups, and Paul's init.h removal applied" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: rcar: fix NACK error code i2c: update i2c_algorithm documentation i2c: rcar: use devm_clk_get to ensure clock is properly ref-counted i2c: rcar: do not print error if device nacks transfer i2c: rely on driver core when sanitizing devices i2c: delete non-required instances of include <linux/init.h> i2c: acorn: is tristate and should use module.h i2c: piix4: Standardize log messages i2c: piix4: Use different message for AMD Auxiliary SMBus Controller i2c: piix4: Add support for AMD ML and CZ SMBus changes
2014-01-29Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull hwmon updates from Jean Delvare: "This include it87 driver improvements, and a tree-wide change of my e-mail address" * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: Update Jean Delvare's e-mail address hwmon: (it87) Print proper names for the IT8771E and IT8772E hwmon: (it87) Add support for the ITE IT8603E
2014-01-29Update Jean Delvare's e-mail addressJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2014-01-26i2c: rcar: fix NACK error codeBen Dooks
The response to a bus NACK is to return -ENXIO instead of the -EREMOTEIO being currently returned by the driver. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-26i2c: rcar: use devm_clk_get to ensure clock is properly ref-countedBen Dooks
The current i2c-rcar driver does clk_get() without a corresponding clk_put(). Add the clk to the driver private data and then get it with the devm functions so that it is released when the driver is unbound. Note, we do not call clk_prepare_enable() at this point due to the very possible magic that is being done by the pm_runtime system underneath the driver. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-26i2c: rcar: do not print error if device nacks transferBen Dooks
The i2c-rcar driver currently prints an error message if the master_xfer callback fails. However if the bus is being probed then lots of NAKs will be generated, causing the output of a number of errors printed. To solve this, disable the print if the error is not -EREMOTEIO. An example of running i2cdetect: 10: i2c-rcar e6530000.i2c: error -121 : 15 -- i2c-rcar e6530000.i2c: error -121 : 15 -- 12 i2c-rcar e6530000.i2c: error -121 : 15 -- i2c-rcar e6530000.i2c: error -121 : 15 -- i2c-rcar e6530000.i2c: error -121 : 15 -- i2c-rcar e6530000.i2c: error -121 : 15 -- i2c-rcar e6530000.i2c: error -121 : 15 -- i2c-rcar e6530000.i2c: error -121 : 15 Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-24Merge tag 'pm+acpi-3.14-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and power management updates from Rafael Wysocki: "As far as the number of commits goes, the top spot belongs to ACPI this time with cpufreq in the second position and a handful of PM core, PNP and cpuidle updates. They are fixes and cleanups mostly, as usual, with a couple of new features in the mix. The most visible change is probably that we will create struct acpi_device objects (visible in sysfs) for all devices represented in the ACPI tables regardless of their status and there will be a new sysfs attribute under those objects allowing user space to check that status via _STA. Consequently, ACPI device eject or generally hot-removal will not delete those objects, unless the table containing the corresponding namespace nodes is unloaded, which is extremely rare. Also ACPI container hotplug will be handled quite a bit differently and cpufreq will support CPU boost ("turbo") generically and not only in the acpi-cpufreq driver. Specifics: - ACPI core changes to make it create a struct acpi_device object for every device represented in the ACPI tables during all namespace scans regardless of the current status of that device. In accordance with this, ACPI hotplug operations will not delete those objects, unless the underlying ACPI tables go away. - On top of the above, new sysfs attribute for ACPI device objects allowing user space to check device status by triggering the execution of _STA for its ACPI object. From Srinivas Pandruvada. - ACPI core hotplug changes reducing code duplication, integrating the PCI root hotplug with the core and reworking container hotplug. - ACPI core simplifications making it use ACPI_COMPANION() in the code "glueing" ACPI device objects to "physical" devices. - ACPICA update to upstream version 20131218. This adds support for the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves debug facilities. From Bob Moore, Lv Zheng and Betty Dall. - Init code change to carry out the early ACPI initialization earlier. That should allow us to use ACPI during the timekeeping initialization and possibly to simplify the EFI initialization too. From Chun-Yi Lee. - Clenups of the inclusions of ACPI headers in many places all over from Lv Zheng and Rashika Kheria (work in progress). - New helper for ACPI _DSM execution and rework of the code in drivers that uses _DSM to execute it via the new helper. From Jiang Liu. - New Win8 OSI blacklist entries from Takashi Iwai. - Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava, Rashika Kheria, Tang Chen, Zhang Rui. - intel_pstate driver updates, including proper Baytrail support, from Dirk Brandewie and intel_pstate documentation from Ramkumar Ramachandra. - Generic CPU boost ("turbo") support for cpufreq from Lukasz Majewski. - powernow-k6 cpufreq driver fixes from Mikulas Patocka. - cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark Brown. - Assorted cpufreq drivers fixes and cleanups from Anson Huang, John Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh Kumar. - cpuidle cleanups from Bartlomiej Zolnierkiewicz. - Support for hibernation APM events from Bin Shi. - Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC disabled during thaw transitions from Bjørn Mork. - PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf Hansson. - PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente Kurusa, Rashika Kheria. - New tool for profiling system suspend from Todd E Brandt and a cpupower tool cleanup from One Thousand Gnomes" * tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits) thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412) cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ Documentation: cpufreq / boost: Update BOOST documentation cpufreq: exynos: Extend Exynos cpufreq driver to support boost cpufreq / boost: Kconfig: Support for software-managed BOOST acpi-cpufreq: Adjust the code to use the common boost attribute cpufreq: Add boost frequency support in core intel_pstate: Add trace point to report internal state. cpufreq: introduce cpufreq_generic_get() routine ARM: SA1100: Create dummy clk_get_rate() to avoid build failures cpufreq: stats: create sysfs entries when cpufreq_stats is a module cpufreq: stats: free table and remove sysfs entry in a single routine cpufreq: stats: remove hotplug notifiers cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly cpufreq: speedstep: remove unused speedstep_get_state platform: introduce OF style 'modalias' support for platform bus PM / tools: new tool for suspend/resume performance optimization ACPI: fix module autoloading for ACPI enumerated devices ACPI: add module autoloading support for ACPI enumerated devices ACPI: fix create_modalias() return value handling ...
2014-01-24i2c: rely on driver core when sanitizing devicesWolfram Sang
Commit 0998d0631001 (device-core: Ensure drvdata = NULL when no driver is bound) modified the driver core to always clear .driver and .drvdata on remove or probe error. No need for the I2C core to do it. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-24i2c: delete non-required instances of include <linux/init.h>Paul Gortmaker
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-24i2c: acorn: is tristate and should use module.hPaul Gortmaker
This file is controlled by a tristate Kconfig option, and hence needs to include module.h so that it can get module_init() once we relocate it from init.h into module.h in the future. Note that module_exit() appears to be missing from the driver, so it is questionable whether it would actually work for a removal and reload cycle if it was configured for a modular build. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-24i2c: piix4: Standardize log messagesJean Delvare
Use exactly the same log messages in the legacy setup function and the SB800+ setup function. This way strings can be reused, which saves some bytes in the generated binary. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-24i2c: piix4: Use different message for AMD Auxiliary SMBus ControllerShane Huang
Same messages for AMD main and auxiliary SMBus controllers lead to confusion, this patch is to remove confusion and keep consistent with non-AMD products. Signed-off-by: Shane Huang <shane.huang@amd.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-24i2c: piix4: Add support for AMD ML and CZ SMBus changesShane Huang
The locations of SMBus register base address and enablement bit are changed from AMD ML, which need this patch to be supported. Signed-off-by: Shane Huang <shane.huang@amd.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@vger.kernel.org
2014-01-23Merge tag 'cleanup-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanups from Olof Johansson: "This is the branch where we usually queue up cleanup efforts, moving drivers out of the architecture directory, header file restructuring, etc. Sometimes they tangle with new development so it's hard to keep it strictly to cleanups. Some of the things included in this branch are: * Atmel SAMA5 conversion to common clock * Reset framework conversion for tegra platforms - Some of this depends on tegra clock driver reworks that are shared with Mike Turquette's clk tree. * Tegra DMA refactoring, which are shared branches with the DMA tree. * Removal of some header files on exynos to prepare for multiplatform" * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits) ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h ARM: mvebu: remove prototypes of non-existing functions from common.h ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h serial: sh-sci: Rework baud rate calculation serial: sh-sci: Compute overrun_bit without using baud rate algo serial: sh-sci: Remove unused GPIO request code serial: sh-sci: Move overrun_bit and error_mask fields out of pdata serial: sh-sci: Support resources passed through platform resources serial: sh-sci: Don't check IRQ in verify port operation serial: sh-sci: Set the UPF_FIXED_PORT flag serial: sh-sci: Remove duplicate interrupt check in verify port op serial: sh-sci: Simplify baud rate calculation algorithms serial: sh-sci: Remove baud rate calculation algorithm 5 serial: sh-sci: Sort headers alphabetically ARM: EXYNOS: Kill exynos_pm_late_initcall() ARM: EXYNOS: Consolidate selection of PM_GENERIC_DOMAINS for Exynos4 ARM: at91: switch Calao QIL-A9260 board to DT clk: at91: fix pmc_clk_ids data type attriubte PM / devfreq: use inclusion <mach/map.h> instead of <plat/map-s5p.h> ARM: EXYNOS: remove <mach/regs-clock.h> for exynos ...
2014-01-23Merge tag 'fixes-nc-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC non-critical fixes from Olof Johansson: "As usual, we have a batch of fixes that weren't considered significant enough to warrant going into the later -rcs for previous release, so they are queued up on this branch. A handful of these are for various DT fixups for Samsung platforms, and a handful of other minor things. There are also a couple of stable-marked patches for mvebu -- they came in quite late and we decided to keep them deferred until the first -stable release to get more coverage instead of squeezing them into 3.13" * tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (32 commits) ARM: at91: smc: bug fix in sam9_smc_cs_read() i2c: mv64xxx: Document the newly introduced Armada XP A0 compatible i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs ARM: mvebu: Add quirk for i2c for the OpenBlocks AX3-4 board ARM: mvebu: Add support to get the ID and the revision of a SoC ARM: dts: msm: Fix gpio interrupt and reg length irqchip: sirf: set IRQ_LEVEL status_flags ARM: OMAP2+: gpmc: Move legacy GPMC width setting ARM: OMAP2+: gpmc: Introduce gpmc_set_legacy() ARM: OMAP2+: gpmc: Move initialization outside the gpmc_t condition ARM: OMAP2+: board-generic: update SoC compatibility strings Documentation: dt: OMAP: explicitly state SoC compatible strings ARM: OMAP2+: enable AM33xx SOC EVM audio ARM: OMAP2+: Select USB PHY for AM335x SoC ARM: bcm2835: Fix grammar in help message ARM: msm: trout: fix uninit var warning ARM: dts: Use MSHC controller for eMMC memory for exynos4412-trats2 ARM: dts: Fix definition of MSHC device tree nodes for exynos4x12 ARM: dts: add clock provider for mshc node for Exynos4412 SOC clk: samsung: exynos4: Fix definition of div_mmc_pre4 divider ...
2014-01-22Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual rocket science stuff from trivial.git" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) neighbour.h: fix comment sched: Fix warning on make htmldocs caused by wait.h slab: struct kmem_cache is protected by slab_mutex doc: Fix typo in USB Gadget Documentation of/Kconfig: Spelling s/one/once/ mkregtable: Fix sscanf handling lp5523, lp8501: comment improvements thermal: rcar: comment spelling treewide: fix comments and printk msgs IXP4xx: remove '1 &&' from a condition check in ixp4xx_restart() Documentation: update /proc/uptime field description Documentation: Fix size parameter for snprintf arm: fix comment header and macro name asm-generic: uaccess: Spelling s/a ny/any/ mtd: onenand: fix comment header doc: driver-model/platform.txt: fix a typo drivers: fix typo in DEVTMPFS_MOUNT Kconfig help text doc: Fix typo (acces_process_vm -> access_process_vm) treewide: Fix typos in printk drivers/gpu/drm/qxl/Kconfig: reformat the help text ...
2014-01-16ACPI: fix module autoloading for ACPI enumerated devicesZhang Rui
ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. Currently, in Platform, I2C and SPI bus, the ACPI style driver matching is supported by invoking acpi_driver_match_device() in bus .match() callback. But, the module autoloading is still broken. For example, there is any ACPI device with _HID "INTABCD" that is enumerated to platform bus, and we have a driver that can probe it. The driver exports its module_alias as "acpi:INTABCD" use the following code static const struct acpi_device_id xxx_acpi_match[] = { { "INTABCD", 0 }, { } }; MODULE_DEVICE_TABLE(acpi, xxx_acpi_match); But, unfortunately, the device' modalias is shown as "platform:INTABCD:00", please refer to modalias_show() and platform_uevent() in drivers/base/platform.c. This results in that the driver will not be loaded automatically when the device node is created, because their modalias do not match. This also applies to I2C and SPI bus. With this patch, the device' modalias will be shown as "acpi:INTABCD" as well. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-01-16i2c: s3c2410: fix quirk usage for 64-bitPankaj Dubey
If used 64 bit compiler GCC warns that: drivers/i2c/busses/i2c-s3c2410.c: In function ‘s3c24xx_get_device_quirks’: drivers/i2c/busses/i2c-s3c2410.c:168:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This patch fixes this by converting "unsigned int" to "kernel_ulong_t". Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-16i2c: pnx: Use devm_*() functionsJingoo Han
Use devm_*() functions to make cleanup paths simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-16i2c: at91: add a new compatibility string for the at91sam9261jean-jacques hiblot
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-14Merge tag 'mvebu-fixes-3.13' of git://git.infradead.org/linux-mvebu into ↵Kevin Hilman
next/fixes-non-critical From Jason Cooper: mvebu late fixes for v3.13 - mvebu - fix boot hang on Armada XP due to broken i2c offloading in A0 SoC revision (specifically experienced on some early OpenBlocks AX3-4 boards) * tag 'mvebu-fixes-3.13' of git://git.infradead.org/linux-mvebu: i2c: mv64xxx: Document the newly introduced Armada XP A0 compatible i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs ARM: mvebu: Add quirk for i2c for the OpenBlocks AX3-4 board ARM: mvebu: Add support to get the ID and the revision of a SoC Signed-off-by: Kevin Hilman <khilman@linaro.org>
2014-01-14i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCsGregory CLEMENT
The first variants of Armada XP SoCs (A0 stepping) have issues related to the i2c controller which prevent to use the offload mechanism and lead to a kernel hang during boot. The commit introduces a new the compatible string marvell,mv78230-a0-i2c for the i2c controller. When this compatible string is used the driver disables the offload mechanism and the kernel no more hangs on these SoCs. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Reported-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: stable@vger.kernel.org # v3.12+: af8d1c63afcb: ARM: mvebu: Add support to get the ID and the revision of a SoC Cc: stable@vger.kernel.org # v3.12+: 85e618a1be2b: ARM: mvebu: Add quirk for i2c for the OpenBlocks AX3-4 board Cc: stable@vger.kernel.org # v3.12+ Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support) Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-01-13i2c-ismt: support I2C_SMBUS_I2C_BLOCK_DATA transaction typerobert.valiquette@intel.com
This patch adds the support of the I2C_SMBUS_I2C_BLOCK_DATA transaction type for the iSMT SMBus Controller. Signed-off-by: Robert Valiquette <robert.valiquette@intel.com> Acked-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-13i2c: Add bus driver for for OSIF USB i2c device.Andrew Lunn
OSIF, Open Source InterFace, is a USB based i2c bus master. The origional design was based on i2c-tiny-usb, but more modern versions of the firmware running on the MegaAVR microcontroller use a different protocol over the USB. This code is based on Barry Carter <barry.carter@gmail.com> driver. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-13i2c: i2c-tiny-usb: Remove RobotFuzz USB vendor:product IDAndrew Lunn
The RobotFuzz device is not compatible with i2c-tiny-usb. Remove its entry from the USB table so that the new correct driver can be used. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-13i2c: designware: remove HAVE_CLK build dependecyBaruch Siach
Since 93abe8e4 (clk: add non CONFIG_HAVE_CLK routines) code using clk.h like this platform driver need not depend on HAVE_CLK. Also, remove a redundant clk.h include from core driver. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-09i2c: nomadik: remove platform data headerLinus Walleij
The Nomadik I2C is now configured from the device tree on all platforms using this controller. Delete the platform data header and move the definitions into the driver so it is all contained in one single file. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-09i2c: nomadik: auto-calculate slave setup timeLinus Walleij
The Nomadik I2C controller needs to have the slave set-up time configured based off the clock used to drive the I2C bus block. Currently this is done with static assignments assuming that the block is clocked 48MHz which is pretty likely to be bug-prone. Calculate the SLSU from the equation given in the datasheet instead. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-09i2c: viperboard: remove superfluous assignmentWolfram Sang
cppcheck rightfully says: drivers/i2c/busses/i2c-viperboard.c:169: style: Variable 'bytes_xfer' is assigned a value that is never used. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Lars Poeschel <poeschel@lemonage.de>
2014-01-07treewide: fix comments and printk msgsMasanari Iida
This patch fixed several typo in printk from various part of kernel source. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-01-04i2c: xilinx: Use devm_* functionsKedareswara rao Appana
Simplified the probe and remove functions using devm_* functions Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-04i2c: xilinx: Do not enable irq before irq handlerMichal Simek
IRQ handler has to be register first before IRQ is enabled in xiic_reinit(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-04i2c: xilinx: Fix i2c checkpatch warningsKedareswara rao Appana
Code changes to fix checkpatch warnings listed below. - WARNING: please, no space before tabs - WARNING: quoted string split across lines Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-04i2c: isch: Use devm_request_region()Jingoo Han
Use devm_request_region() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-04i2c: viperboard: Use devm_kzalloc() functionsJingoo Han
Use devm_kzalloc() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-03i2c: imx: propagate irq error code in probeWolfram Sang
smatch rightfully says: drivers/i2c/busses/i2c-imx.c:610 i2c_imx_probe() info: why not propagate 'irq' from platform_get_irq() instead of (-2)? Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-03i2c: s3c2410: dont need CPU_FREQ transitions for exynos seriesNaveen Krishna Ch
For Exynos4 and Exynos5 SoCs from Samsung the i2c clock is based on a fixed 66 MHz peripheral clock, and therefore is completely independent of the cpu frequency. Thus, registering for a CPU freq notifier is very wasteful. This patch modifes the code such that, i2c bus registers to cpu_freq_transition only if CONFIG_CPU_FREQ_S3C24XX is enabled. This change should save a bunch of cpufreq transitions calls which does not apply to exynos SoCs. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-03i2c: s3c2410: Add polling mode supportVasanth Ananthan
This patch adds polling mode support for i2c-s3c2410 driver.The SATA PHY controller's CMU and TRSV block's are of I2C register map in exynos5250.These blocks can be configured using i2c. But i2c controller instance on which these block's sits lacks an interrupt line.Also the current i2c-s3c2410 driver is only interrupt driven, thus a polling mode support is required in the driver for supporting this controller. This patch adds this support to the driver. Signed-off-by: Vasanth Ananthan <vasanth.a@samsung.com> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>