summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-22Merge branch 'for-linus' of ↵Linus Torvalds2-2/+2
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-16i2c: s3c2410: fix quirk usage for 64-bitPankaj Dubey1-3/+3
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 Han1-51/+13
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 hiblot1-0/+3
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-13i2c-ismt: support I2C_SMBUS_I2C_BLOCK_DATA transaction typerobert.valiquette@intel.com1-0/+37
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 Lunn3-0/+213
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 Lunn1-1/+0
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 Siach2-2/+0
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 Walleij1-1/+23
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 Walleij1-12/+28
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 Sang1-3/+1
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 Iida1-1/+1
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 Appana1-50/+15
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 Simek1-2/+2
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 Appana1-9/+11
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 Han1-5/+2
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 Han1-9/+3
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 Sang1-1/+1
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 Ch1-2/+2
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 Ananthan1-10/+56
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>
2014-01-03i2c: shmobile/rcar: Restrict non-COMPILE_TEST compilationLaurent Pinchart1-2/+2
Hardware supported by the i2c sh_mobile and rcar drivers is only found on SUPERH or ARCH_SHMOBILE platforms. Restrict non-COMPILE_TEST compilation to them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-03i2c: pca954x: Add reset GPIO supportLaurent Pinchart1-0/+19
If a reset GPIO support is specified, request the GPIO and get the chip out of reset at probe time. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-03i2c: pca954x: Use devm_kzalloc managed allocatorLaurent Pinchart1-12/+6
This simplifies error and removal paths. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-03i2c: pca954x: Sort headers alphabeticallyLaurent Pinchart1-4/+3
This helps avoiding duplicate includes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-02i2c: riic: add driverWolfram Sang3-0/+438
Tested with a r7s72100 genmai board acessing an eeprom. Signed-off-by: Wolfram Sang <wsa@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-12-19treewide: Fix typos in printkMasanari Iida1-1/+1
Correct spelling typo in various part of kernel Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-12-12i2c: imx: Check the return value from clk_prepare_enable()Fabio Estevam1-1/+3
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-12-12i2c: mux: Inherit retry count and timeout from parent for muxed busElie De Brauwer1-0/+2
If a muxed i2c bus gets created the default retry count and timeout of the muxed bus is zero. Hence it it possible that you end up with a situation where the parent controller sets a default retry count and timeout which gets applied and used while the muxed bus (using the same controller) has a default retry count of zero and a default timeout of 1s (set in i2c_add_adapter()). This can be solved by initializing the retry count and timeout of the muxed bus with the values used by the the parent at creation time. Signed-off-by: Elie De Brauwer <eliedebrauwer@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-29Merge branch 'i2c/for-current' of ↵Linus Torvalds5-13/+19
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Some easy but needed fixes for i2c drivers since rc1" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: bcm2835: Linking platform nodes to adapter nodes i2c: omap: raw read and write endian fix i2c: i2c-bcm-kona: Fix module build i2c: i2c-diolan-u2c: different usb endpoints for DLN-2-U2C i2c: bcm-kona: remove duplicated include i2c: davinci: raw read and write endian fix
2013-11-28i2c: bcm2835: Linking platform nodes to adapter nodesFlorian Meier1-0/+1
In order to find I2C devices in the device tree, the platform nodes have to be known by the I2C core. This requires setting the dev.of_node parameter of the adapter. Signed-off-by: Florian Meier <florian.meier@koalo.de> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-27i2c: omap: raw read and write endian fixVictor Kamensky1-4/+4
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-26i2c: i2c-bcm-kona: Fix module buildTim Kryger1-1/+1
Correct a typo that prevented the driver from being built as a module. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Tim Kryger <tim.kryger@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-26i2c: i2c-diolan-u2c: different usb endpoints for DLN-2-U2CMartin Vogt1-5/+11
The previous diolan adapter uses other out/in endpoints than the current DLN-2-U2C in compatibility mode. They changed from 0x2/0x84 to 0x3/0x83. This patch gets the endpoints from the usb interface, instead of hardcode them in the driver. This was tested on a current DLN-2-U2C board. Signed-off-by: Martin Vogt <mvogt1@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-26i2c: bcm-kona: remove duplicated includeWei Yongjun1-1/+0
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Markus Mayer <markus.mayer@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-26i2c: davinci: raw read and write endian fixTaras Kondratiuk1-2/+2
I2C IP block expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-25Merge tag 'omap-for-v3.13/more-fixes-for-merge-window-take2' of ↵Olof Johansson1-0/+22
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes From Tony Lindgren: Few more fixes for issues found booting older omaps using device tree. Also few randconfig build fixes and removal of some dead code for omap4 as it no longer has legacy platform data based booting support. * tag 'omap-for-v3.13/more-fixes-for-merge-window-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Remove legacy omap4_twl6030_hsmmc_init ARM: OMAP2+: Remove legacy mux code for display.c ARM: OMAP2+: Fix undefined reference to set_cntfreq gpio: twl4030: Fix passing of pdata in the device tree case gpio: twl4030: Fix regression for twl gpio output ARM: OMAP2+: More randconfig fixes for reconfigure_io_chain ARM: dts: Fix omap2 specific dtsi files by adding the missing entries ARM: OMAP2+: Fix GPMC and simplify bootloader timings for 8250 and smc91x i2c: omap: Fix missing device tree flags for omap2
2013-11-20Merge tag 'pm+acpi-2-3.13-rc1' of ↵Linus Torvalds1-6/+19
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI and power management updates from Rafael Wysocki: - ACPI-based device hotplug fixes for issues introduced recently and a fix for an older error code path bug in the ACPI PCI host bridge driver - Fix for recently broken OMAP cpufreq build from Viresh Kumar - Fix for a recent hibernation regression related to s2disk - Fix for a locking-related regression in the ACPI EC driver from Puneet Kumar - System suspend error code path fix related to runtime PM and runtime PM documentation update from Ulf Hansson - cpufreq's conservative governor fix from Xiaoguang Chen - New processor IDs for intel_idle and turbostat and removal of an obsolete Kconfig option from Len Brown - New device IDs for the ACPI LPSS (Low-Power Subsystem) driver and ACPI-based PCI hotplug (ACPIPHP) cleanup from Mika Westerberg - Removal of several ACPI video DMI blacklist entries that are not necessary any more from Aaron Lu - Rework of the ACPI companion representation in struct device and code cleanup related to that change from Rafael J Wysocki, Lan Tianyu and Jarkko Nikula - Fixes for assigning names to ACPI-enumerated I2C and SPI devices from Jarkko Nikula * tag 'pm+acpi-2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits) PCI / hotplug / ACPI: Drop unused acpiphp_debug declaration ACPI / scan: Set flags.match_driver in acpi_bus_scan_fixed() ACPI / PCI root: Clear driver_data before failing enumeration ACPI / hotplug: Fix PCI host bridge hot removal ACPI / hotplug: Fix acpi_bus_get_device() return value check cpufreq: governor: Remove fossil comment in the cpufreq_governor_dbs() ACPI / video: clean up DMI table for initial black screen problem ACPI / EC: Ensure lock is acquired before accessing ec struct members PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps() ACPI / AC: Remove struct acpi_device pointer from struct acpi_ac spi: Use stable dev_name for ACPI enumerated SPI slaves i2c: Use stable dev_name for ACPI enumerated I2C slaves ACPI: Provide acpi_dev_name accessor for struct acpi_device device name ACPI / bind: Use (put|get)_device() on ACPI device objects too ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node cpufreq: OMAP: Fix compilation error 'r & ret undeclared' PM / Runtime: Fix error path for prepare PM / Runtime: Update documentation around probe|remove|suspend cpufreq: conservative: set requested_freq to policy max when it is over policy max ...
2013-11-18Merge branch 'i2c/for-next' of ↵Linus Torvalds27-194/+2918
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c changes from Wolfram Sang: - new drivers for exynos5, bcm kona, and st micro - bigger overhauls for drivers mxs and rcar - typical driver bugfixes, cleanups, improvements - got rid of the superfluous 'driver' member in i2c_client struct This touches a few drivers in other subsystems. All acked. * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits) i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe() i2c: i2c-eg20t: do not print error message in syslog if no ACK received i2c: bcm-kona: Introduce Broadcom I2C Driver i2c: cbus-gpio: Fix device tree binding i2c: wmt: add missing clk_disable_unprepare() on error i2c: designware: add new ACPI IDs i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH i2c: exynos5: Remove incorrect clk_disable_unprepare i2c: i2c-st: Add ST I2C controller i2c: exynos5: add High Speed I2C controller driver i2c: rcar: fixup rcar type naming i2c: scmi: remove some bogus NULL checks i2c: sh_mobile & rcar: Enable the driver on all ARM platforms i2c: sh_mobile: Convert to clk_prepare/unprepare i2c: mux: gpio: use reg value for i2c_add_mux_adapter i2c: mux: gpio: use gpio_set_value_cansleep() i2c: Include linux/of.h header i2c: mxs: Fix PIO mode on i.MX23 i2c: mxs: Rework the PIO mode operation i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller ...
2013-11-18i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe()Wei Yongjun1-1/+2
Fix to return a negative error code from the bus speed parse error handling case instead of 0. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Tim Kryger <tim.kryger@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-17i2c: i2c-eg20t: do not print error message in syslog if no ACK receivedAndreas Werner1-22/+4
Using the i2c-eg20t driver and call i2cdetect or probe on the bus, the driver will print a lot of error messages if there was no ACK received. i2cdetect normally print a table with all the available devices. If there is no device on the address, the table will be empty. Currently with the i2c-eg20t driver, the table is not visible because the error messages destroy the table. Error message: pch_i2c_getack return -71 This patch prevent the driver to print the messages to syslog. The pch_i2c_wait_for_check_xfer function is the only one who is calling pch_i2c_getack, so we can delete the function and add the read to pch_i2c_wait_for_check_xfer. If no ACK is received, the Message will be printed as a dbg message. Fixed print message to be a one liner so we can grep for the error message. Tested on Intel Atom E6xx and Eg20t Chipset. Signed-off-by: Andreas Werner <wernerandy@gmx.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-15i2c: bcm-kona: Introduce Broadcom I2C DriverTim Kryger3-0/+919
Introduce support for Broadcom Serial Controller (BSC) I2C bus found in the Kona family of Mobile SoCs. FIFO hardware is utilized but only standard mode (100kHz), fast mode (400kHz), fast mode plus (1MHz), and I2C high-speed (3.4 MHz) bus speeds are supported. Signed-off-by: Tim Kryger <tim.kryger@linaro.org> Reviewed-by: Matt Porter <matt.porter@linaro.org> Reviewed-by: Markus Mayer <markus.mayer@linaro.org> [wsa: fixed Kconfig sorting, squashed broken out patches into one] Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-15i2c: omap: Fix missing device tree flags for omap2Tony Lindgren1-0/+22
As we claim to support device tree for mach-omap2, we should have the necessary flags in the driver to make it usable. Cc: linux-i2c@vger.kernel.org Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-11-15i2c: cbus-gpio: Fix device tree bindingTony Lindgren1-0/+2
Looks like we're missing two lines needed to make it work properly with device tree. Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-15tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang9-10/+10
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-14i2c: Use stable dev_name for ACPI enumerated I2C slavesJarkko Nikula1-4/+17
Current I2C adapter id - client address "x-00yy" based device naming scheme is not always stable enough to be used in name based matching, for instance within ALSA SoC subsystem. This is problematic in PC kind of platforms where I2C adapter numbers can change due variable amount of bus controllers, probe order, add-on cards or just because of BIOS settings. This patch addresses the problem by using the ACPI device name with "i2c-" prefix for ACPI enumerated I2C slaves. For them device name "x-00yz" becomes "i2c-INTABCD:ij" after this patch. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-14ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_nodeRafael J. Wysocki1-2/+2
Modify struct acpi_dev_node to contain a pointer to struct acpi_device associated with the given device object (that is, its ACPI companion device) instead of an ACPI handle corresponding to it. Introduce two new macros for manipulating that pointer in a CONFIG_ACPI-safe way, ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the ACPI_HANDLE() macro to take the above changes into account. Drop the ACPI_HANDLE_SET() macro entirely and rework its users to use ACPI_COMPANION_SET() instead. For some of them who used to pass the result of acpi_get_child() directly to ACPI_HANDLE_SET() introduce a helper routine acpi_preset_companion() doing an equivalent thing. The main motivation for doing this is that there are things represented by struct acpi_device objects that don't have valid ACPI handles (so called fixed ACPI hardware features, such as power and sleep buttons) and we would like to create platform device objects for them and "glue" them to their ACPI companions in the usual way (which currently is impossible due to the lack of valid ACPI handles). However, there are more reasons why it may be useful. First, struct acpi_device pointers allow of much better type checking than void pointers which are ACPI handles, so it should be more difficult to write buggy code using modified struct acpi_dev_node and the new macros. Second, the change should help to reduce (over time) the number of places in which the result of ACPI_HANDLE() is passed to acpi_bus_get_device() in order to obtain a pointer to the struct acpi_device associated with the given "physical" device, because now that pointer is returned by ACPI_COMPANION() directly. Finally, the change should make it easier to write generic code that will build both for CONFIG_ACPI set and unset without adding explicit compiler directives to it. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
2013-11-14i2c: wmt: add missing clk_disable_unprepare() on errorWei Yongjun1-0/+1
Add the missing clk_disable_unprepare() before return from wmt_i2c_reset_hardware() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org # 3.11+
2013-11-14i2c: designware: add new ACPI IDsMika Westerberg1-0/+2
Newer Intel PCHs with LPSS have the same Designware I2C controllers than Haswell but the ACPI IDs differ. Add these IDs to the driver list. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-14i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCHJames Ralston2-0/+4
This patch adds the SMBus Device IDs for the Intel Wildcat Point-LP PCH. Signed-off-by: James Ralston <james.d.ralston@intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-14i2c: exynos5: Remove incorrect clk_disable_unprepareSachin Kamat1-5/+0
clk_disable_unprepare in remove causes an imbalance and hence gives the below crash on module remove. While at it also remove some duplicate code from probe. / $ rmmod i2c-exynos5 [ 6.996374] ------------[ cut here ]------------ [ 6.999523] WARNING: CPU: 2 PID: 1137 at drivers/clk/clk.c:842 clk_disable+0x18/0x24() [ 7.007403] Modules linked in: i2c_exynos5(-) [ 7.011747] CPU: 2 PID: 1137 Comm: rmmod Not tainted 3.12.0-next-20131105-00083-g16f4799-dirty #21 [ 7.020696] [<c0014e0c>] (unwind_backtrace+0x0/0xf4) from [<c0011784>] (show_stack+0x10/0x14) [ 7.029190] [<c0011784>] (show_stack+0x10/0x14) from [<c037acd4>] (dump_stack+0x7c/0xb0) [ 7.037255] [<c037acd4>] (dump_stack+0x7c/0xb0) from [<c001e0ac>] (warn_slowpath_common+0x6c/0x88) [ 7.046190] [<c001e0ac>] (warn_slowpath_common+0x6c/0x88) from [<c001e164>] (warn_slowpath_null+0x1c/0x24) [ 7.055818] [<c001e164>] (warn_slowpath_null+0x1c/0x24) from [<c02dcde4>] (clk_disable+0x18/0x24) [ 7.064670] [<c02dcde4>] (clk_disable+0x18/0x24) from [<bf0002d4>] (exynos5_i2c_remove+0x1c/0x34 [i2c_exynos5]) [ 7.074736] [<bf0002d4>] (exynos5_i2c_remove+0x1c/0x34 [i2c_exynos5]) from [<c02274a8>] (__device_release_driver+0x58/0xb0) [ 7.085836] [<c02274a8>] (__device_release_driver+0x58/0xb0) from [<c0227b88>] (driver_detach+0xac/0xb0) [ 7.095291] [<c0227b88>] (driver_detach+0xac/0xb0) from [<c02271c0>] (bus_remove_driver+0x4c/0xa0) [ 7.104227] [<c02271c0>] (bus_remove_driver+0x4c/0xa0) from [<c00725dc>] (SyS_delete_module+0x124/0x194) [ 7.113682] [<c00725dc>] (SyS_delete_module+0x124/0x194) from [<c000e2e0>] (ret_fast_syscall+0x0/0x30) [ 7.122957] ---[ end trace 23bb6e4e0bf52196 ]--- Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>