summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'i2c/for-3.17' of ↵Linus Torvalds2014-08-0937-924/+810
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Highlights: - class based instantiation finally dropped for most embedded drivers bringing boot up performance gains - removed two drivers (one outdated, one a duplicate) - ACPI has now operation region support (thanks to Lan Tianyu) - the i2c-stub driver got overhauled and gained new features to become more useful when writing i2c client drivers (thanks to Guenter Roeck and Jean Delvare) The rest is driver bugfixes, added bindings/ids, cleanups..." * 'i2c/for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (43 commits) i2c: mpc: delete unneeded test before of_node_put i2c: rk3x: fix interrupt handling issue i2c: imx: Fix format warning for dev_dbg i2c: qup: disable clks and return instead of just returning error i2c: exynos5: always enable HSI2C i2c: designware: add new bindings i2c: gpio: Drop dead code in i2c_gpio_remove i2c: pca954x: put the mux to disconnected state after resume i2c: st: Update i2c timings drivers/i2c/busses: use correct type for dma_map/unmap i2c: i2c-st: Use %pa to print 'resource_size_t' type i2c: s3c2410: resume the I2C controller earlier i2c: stub: Avoid an array overrun on I2C block transfers i2c: i801: Add device ID for Intel Wildcat Point PCH i2c: i801: Fix the alignment of the device table i2c: stub: Add support for banked register ranges i2c: stub: Remember the number of emulated chips i2c: stub: Add support for SMBus block commands i2c: efm32: correct namespacing of location property i2c: exynos5: remove extra line and fix an assignment ...
| * i2c: mpc: delete unneeded test before of_node_putJulia Lawall2014-08-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: rk3x: fix interrupt handling issueaddy ke2014-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If slave holds scl, I2C_IPD[7] will be set 1 by controller for debugging. Driver must ignore it. [ 5.752391] rk3x-i2c ff160000.i2c: unexpected irq in WRITE: 0x80 [ 5.939027] rk3x-i2c ff160000.i2c: timeout, ipd: 0x80, state: 4 Signed-off-by: Addy Ke <addy.ke@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
| * i2c: imx: Fix format warning for dev_dbgXiubo Li2014-08-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following by using %pR: drivers/i2c/busses/i2c-imx.c: In function i2c_imx_probe() drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument of type unsigned int, but argument 4 has type resource_size_t [-Wformat=] dev_dbg(&i2c_imx->adapter.dev, "device resources from 0x%x to 0x%x\n", ^ ... Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: qup: disable clks and return instead of just returning errorPramod Gurav2014-08-061-4/+8
| | | | | | | | | | | | | | | | | | | | | | This fixes a error handling scenario where clocks were not being disabled when QUP_OUTPUT_BLOCK_SIZE returns a size greater than the size of blk_sizes array. So this patch adds a statement to jump to the fail lable to release the clocks. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Acked-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: exynos5: always enable HSI2CSachin Kamat2014-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | All Exynos5 platforms have HSI2C controllers and are needed by various IPs connected to the boards based on these SoCs. Thus select this by default for Exynos5 platforms. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: designware: add new bindingsAlan Cox2014-08-022-0/+10
| | | | | | | | | | | | | | | | | | This may appear as PCI or ACPI depending upon the firmware so we have to list both. All share the same ACPI identifier but not the same PCI identifier. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: gpio: Drop dead code in i2c_gpio_removeJean Delvare2014-08-011-2/+0
| | | | | | | | | | | | | | | | | | Commit a0682a31 ("i2c: gpio: Use devm_gpio_request()") left unused code behind, clean it up. Fixes: a0682a315889 ("i2c: gpio: Use devm_gpio_request()") Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: pca954x: put the mux to disconnected state after resumeJisheng Zhang2014-08-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pca954x may be power lost during suspend, so after resume we also suffer the issue fixed by commit cd823db8b1161ef0d756514d280715a576d65cc3, "pca954x power-on default is channel 0 connected. If multiple pca954x muxes are connected to the same physical I2C bus, the parent bus will see channel 0 devices behind both muxes by default." What's more, when resume bootloader may also operate the mux, so the the channel connected after that may not be the one driver thought. We fix this problem by putting the mux to disconnected state and clearing last_chan in the resume hook. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: st: Update i2c timingsMaxime COQUELIN2014-08-011-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c timing values specified in the driver are the minimun values defined in the I2C specifications. The I2C specification does not specify any default or maximum values. Some I2C devices are out of spec, such as the HDMI link of the Toshiba 19AV600 TV, and might not work properly with minimum values. This patch adds a 10% margin on all the timings in both Normal and Fast modes. Trial and error method have been used to find the minimum margin necessary to have the out-of-spec device working, and a security margin has been added. Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * drivers/i2c/busses: use correct type for dma_map/unmapWolfram Sang2014-08-011-2/+2
| | | | | | | | | | | | | | | | 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> Cc: stable@kernel.org
| * i2c: i2c-st: Use %pa to print 'resource_size_t' typeFabio Estevam2014-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building multi_v7_defconfig with CONFIG_ARM_LPAE=y the following warning is seen: drivers/i2c/busses/i2c-st.c:818:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat=] Use %pa to print 'resource_size_t' type to fix the warning. Reported-by: Olof's autobuilder <build@lixom.net> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: s3c2410: resume the I2C controller earlierVincent Palatin2014-08-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the wake-up is triggered by the PMIC RTC, the RTC driver is trying to read the PMIC interrupt status over I2C and fails because the I2C controller is not resumed yet. Let's resume the I2C controller earlier in the _noirq phase (as other hardwares are doing), so we can properly get the wake-up condition. [tomasz: Also fixes certain issues on Exynos4-based boards.] Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Acked-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: stub: Avoid an array overrun on I2C block transfersJean Delvare2014-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | I2C block transfers can have a size up to 32 bytes. If starting close to the end of the address space, there may not be enough room to write that many bytes (on I2C block writes) or not enough bytes to be read (on I2C block reads.) In that case, we must shorten the transfer so that it does not exceed the address space. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i801: Add device ID for Intel Wildcat Point PCHJean Delvare2014-07-172-0/+4
| | | | | | | | | | Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i801: Fix the alignment of the device tableJean Delvare2014-07-171-68/+68
| | | | | | | | | | | | | | | | | | | | A long name broke the alignment, shift the columns a bit to fix it and make the table look nice again. While we're here, switch to the standard comment style to make checkpatch happy, and use tabs instead of spaces for column alignment. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: stub: Add support for banked register rangesJean Delvare2014-07-171-10/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | Some chips implement banked register ranges. This allows implementing more registers than the limited 8-bit address space originally allows. In order to access a register on these chips, you must first select the proper bank. Add support for this mechanism to the i2c-stub driver so that such chips can be emulated. All the bank settings are passed as module parameters. Signed-off-by: Jean Delvare <jdelvare@suse.de> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: stub: Remember the number of emulated chipsJean Delvare2014-07-171-3/+6
| | | | | | | | | | | | | | | | This makes initialization, cleanup and look-up easier. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: stub: Add support for SMBus block commandsGuenter Roeck2014-07-171-5/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMBus block commands are different to I2C block commands since the returned data is not normally accessible with byte or word commands on other command offsets. Add linked list of 'block' commands to support those commands. Access mechanism is quite simple: Block commands must be written before they can be read. Subsequent writes can be partial. Block read commands always return the number of bytes associated with the longest previous write. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: efm32: correct namespacing of location propertyUwe Kleine-König2014-07-171-1/+7
| | | | | | | | | | | | | | | | | | Olof Johansson pointed out that usually the company name is picked as namespace prefix to specific properties. So expect "energymicro,location" but fall back to the previously introduced name "efm32,location". Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: exynos5: remove extra line and fix an assignmentNaveen Krishna Ch2014-07-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the following in exynos5_i2c_message_start() function 1. Fixes an assignment As, "i2c_auto_conf" is initialized to '0' at the beginning of the function and HSI2C_READ_WRITE is defined as (1u << 16) Using "|=" for the first assignment is more readable. 2. Removes an extra line Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: exynos5: remove an unnecessary read of FIFO_STATUS registerNaveen Krishna Ch2014-07-171-1/+0
| | | | | | | | | | | | | | | | This patch removes an extra read of FIFO_STATUS register in the interrrupt service routine. Which is read again before the actual use. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: exynos5: Properly use the "noirq" variants of suspend/resumeDoug Anderson2014-07-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code for the exynos i2c controller registered for the "noirq" variants. However during review feedback it was moved to SIMPLE_DEV_PM_OPS without anyone noticing that it meant we were no longer actually "noirq" (despite functions named exynos5_i2c_suspend_noirq and exynos5_i2c_resume_noirq). i2c controllers that might have wakeup sources on them seem to need to resume at noirq time so that the individual drivers can actually read the i2c bus to handle their wakeup. NOTE: I took the original review feedback from Wolfram and added poweroff, thaw, freeze, restore. This patch has only been compile-tested since I don't have all the patches needed to make my machine using this i2c driver actually suspend/resume. 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>
| * i2c: i2c-xiic: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. While we are here, remove the indentation for the array setup because such things always break after some time. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-tegra: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Tested-by: Mikko Perttunen <mperttunen@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com>
| * i2c: i2c-stu300: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org>
| * i2c: i2c-sirf: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-s3c2410: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. While we are here, remove the indentation for the array setup because such things always break after some time. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Tested-by: Sachin Kamat <sachin.kamat@samsung.com>
| * i2c: i2c-rcar: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. While we are here, remove the indentation for the array setup because such things always break after some time. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-omap: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-ocores: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. While we are here, remove the indentation for the array setup because such things always break after some time. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Peter Korsgaard <peter@korsgaard.com>
| * i2c: i2c-nomadik: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. While we are here, remove the indentation for the array setup because such things always break after some time. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org>
| * i2c: i2c-mv64xxx: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-designware-platdrv: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-davinci: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-bfin-twi: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-bcm2835: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: i2c-at91: Drop class based scanning to improve bootup timeWolfram Sang2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | This driver has been flagged to drop class based instantiation. The removal improves boot-up time and is unneeded for embedded controllers. Users have been warned to switch for some time now, so we can actually do the removal. Keep the DEPRECATED flag, so the core can inform users that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: add debug info when class instantiation was droppedWolfram Sang2014-07-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | We have a warning already when support for old-fashioned class based instantiation is about to be dropped somewhen soon from a driver. Let's have another one when it was actually dropped. This allows to remove the cruft a little earlier and still let users know what happened in the rare case they are missing devices after the change. However, there is enough interest to get rid of class based instantiation rather sooner than later because it improves boot up time. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: scx200: drop GPIO based i2c driverWolfram Sang2014-07-163-161/+0
| | | | | | | | | | | | | | | | This driver is marked as deprecated since the pre-git era. Any user left(?) should really have switched to i2c-gpio meanwhile. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Jim Cromie <jim.cromie@gmail.com>
| * i2c: s6000: remove duplicate driverWolfram Sang2014-07-164-494/+0
| | | | | | | | | | | | | | | | | | | | | | It turned out that the s6000 simply has a designware IP core and should use the designated driver for it which is way more maintained and feature complete. There are currently no users in tree, and not even a toolchain for s6000 seems to be available. So, simply remove this duplicate. If someone needs assistance in converting to the designware driver, the i2c list will be there to help. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: taos-evm: Use module_serio_driver()Christoph Jaeger2014-06-271-12/+1
| | | | | | | | | | | | | | | | Get rid of some boilerplate code by using module_serio_driver(). Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI configLan Tianyu2014-06-274-97/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | Clean up ACPI related code in the i2c core and add CONFIG_I2C_ACPI to enable I2C ACPI code. Current there is a race between removing I2C ACPI operation region and ACPI AML code accessing. So make i2c core built-in if CONFIG_I2C_ACPI is set. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * I2C/ACPI: Add i2c ACPI operation region supportLan Tianyu2014-06-273-1/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation region. It allows ACPI aml code able to access such kind of devices to implement some ACPI standard method. ACPI Spec defines some access attribute to associate with i2c protocol. AttribQuick Read/Write Quick Protocol AttribSendReceive Send/Receive Byte Protocol AttribByte Read/Write Byte Protocol AttribWord Read/Write Word Protocol AttribBlock Read/Write Block Protocol AttribBytes Read/Write N-Bytes Protocol AttribProcessCall Process Call Protocol AttribBlockProcessCall Write Block-Read Block Process Call Protocol AttribRawBytes Raw Read/Write N-BytesProtocol AttribRawProcessBytes Raw Process Call Protocol On the Asus T100TA, Bios use GenericSerialBus operation region to access i2c device to get battery info. Sample code From Asus T100TA Scope (_SB.I2C1) { Name (UMPC, ResourceTemplate () { I2cSerialBus (0x0066, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2C1", 0x00, ResourceConsumer, , ) }) ... OperationRegion (DVUM, GenericSerialBus, Zero, 0x0100) Field (DVUM, BufferAcc, NoLock, Preserve) { Connection (UMPC), Offset (0x81), AccessAs (BufferAcc, AttribBytes (0x3E)), FGC0, 8 } ... } Device (BATC) { Name (_HID, EisaId ("PNP0C0A")) // _HID: Hardware ID Name (_UID, One) // _UID: Unique ID ... Method (_BST, 0, NotSerialized) // _BST: Battery Status { If (LEqual (AVBL, One)) { Store (FGC0, BFFG) If (LNotEqual (STAT, One)) { ShiftRight (CHST, 0x04, Local0) And (Local0, 0x03, Local0) If (LOr (LEqual (Local0, One), LEqual (Local0, 0x02))) { Store (0x02, Local1) } ... } The i2c operation region is defined under I2C1 scope. _BST method under battery device BATC read battery status from the field "FCG0". The request would be sent to i2c operation region handler. This patch is to add i2c ACPI operation region support. Due to there are only "Byte" and "Bytes" protocol access on the Asus T100TA, other protocols have not been tested. About RawBytes and RawProcessBytes protocol, they needs specific drivers to interpret reference data from AML code according ACPI 5.0 SPEC(5.5.2.4.5.3.9 and 5.5.2.4.5.3.10). So far, not found such case and will add when find real case. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | Merge tag 'mfd-for-linus-3.17' of ↵Linus Torvalds2014-08-071-5/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD update from Lee Jones: "Changes to existing drivers: - checkpatch fixes throughout the subsystem - use Regmap to handle IRQs in max77686, extcon-max77693 and mc13xxx-core - use DMA in rtsx_pcr - restrict building on unsupported architectures on timberdale, cs5535 - SPI hardening in cros_ec_spi - more robust error handing in asic3, cros_ec, ab8500-debugfs, max77686 and pcf50633-core - reorder PM runtime and regulator handing during shutdown in arizona - enable wakeup in cros_ec_spi - unused variable/code clean-up in pm8921-core, cros_ec, htc-i2cpld, tps65912-spi, wm5110-tables and ab8500-debugfs - add regulator handing into suspend() in sec-core - remove pointless wrapper functions in extcon-max77693 and i2c-cros-ec-tunnel - use cross-architecture friendly data sizes in stmpe-i2c, arizona, max77686 and tps65910 - devicetree documentation updates throughout - provide power management support in max77686 - few OF clean-ups in max77686 - use manged resources in tps6105x New drivers/supported devices: - add support for s2mpu02 to sec-core - add support for Allwinner A32 to sun6i-prcm - add support for Maxim 77802 in max77686 - add support for DA9063 AD in da9063 - new driver for Intel PMICs (generic) and specifically Crystal Cove (Re-)moved drivers == - move out keyboard functionality cros_ec ==> input/keyboard/cros_ec_keyb" * tag 'mfd-for-linus-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (101 commits) MAINTAINERS: Update MFD repo location mfd: omap-usb-host: Fix improper mask use. mfd: arizona: Only free the CTRLIF_ERR IRQ if we requested it mfd: arizona: Add missing handling for ISRC3 under/overclocked mfd: wm5110: Add new interrupt register definitions mfd: arizona: Rename thermal shutdown interrupt mfd: wm5110: Add in the output done interrupts mfd: wm5110: Remove non-existant interrupts mfd: tps65912-spi: Remove unused variable mfd: htc-i2cpld: Remove unused code mfd: da9063: Add support for AD silicon variant mfd: arizona: Map MICVDD from extcon device to the Arizona core mfd: arizona: Add MICVDD to mapped regulators for wm8997 mfd: max77686: Ensure device type IDs are architecture agnostic mfd: max77686: Add Maxim 77802 PMIC support mfd: tps6105x: Use managed resources when allocating memory mfd: wm8997-tables: Suppress 'line over 80 chars' warnings mfd: kempld-core: Correct a variety of checkpatch warnings mfd: ipaq-micro: Fix coding style errors/warnings reported by checkpatch mfd: si476x-cmd: Remedy checkpatch style complains ...
| * | mfd: cros_ec: ec_dev->cmd_xfer() returns number of bytes received from ECBill Richardson2014-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When communicating with the EC, the cmd_xfer() function should return the number of bytes it received from the EC, or negative on error. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | mfd: cros_ec: cleanup: Remove EC wrapper functionsBill Richardson2014-07-091-4/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the three wrapper functions that talk to the EC without passing all the desired arguments and just use the underlying communication function that passes everything in a struct intead. This is internal code refactoring only. Nothing should change. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | Merge tag 'clk-for-linus-3.17' of ↵Linus Torvalds2014-08-041-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/mike.turquette/linux Pull clock framework updates from Mike Turquette: "The clock framework changes for 3.17 are mostly additions of new clock drivers and fixes/enhancements to existing clock drivers. There are also some non-critical fixes and improvements to the framework core. Changes to the clock framework core include: - improvements to printks on errors - flattening the previously hierarchal structure of per-clock entries in debugfs - allow per-clock debugfs entries that are specific to a particular clock driver - configure initial clock parent and/or initial clock rate from Device Tree - several feature enhancements to the composite clock type - misc fixes New clock drivers added include: - TI Palmas PMIC - Allwinner A23 SoC - Qualcomm APQ8084 and IPQ8064 SoCs - Rockchip rk3188, rk3066 and rk3288 SoCs - STMicroelectronics STiH407 SoC - Cirrus Logic CLPS711X SoC Many fixes, feature enhancements and further clock tree support for existing clock drivers also were merged, such as Samsung's "ARMCLK down" power saving feature for their Exynos4 & Exynos5 SoCs" * tag 'clk-for-linus-3.17' of git://git.linaro.org/people/mike.turquette/linux: (86 commits) clk: Add missing of_clk_set_defaults export clk: checking wrong variable in __set_clk_parents() clk: Propagate any error return from debug_init() clk: clps711x: Add DT bindings documentation clk: Add CLPS711X clk driver clk: st: Use round to closest divider flag clk: st: Update frequency tables for fs660c32 and fs432c65 clk: st: STiH407: Support for clockgenA9 clk: st: STiH407: Support for clockgenD0/D2/D3 clk: st: STiH407: Support for clockgenC0 clk: st: Add quadfs reset handling clk: st: Add polarity bit indication clk: st: STiH407: Support for clockgenA0 clk: st: STiH407: Support for A9 MUX Clocks clk: st: STiH407: Support for Flexgen Clocks clk: st: Adds Flexgen clock binding clk: st: Remove uncessary (void *) cast clk: st: use static const for clkgen_pll_data tables clk: st: use static const for stm_fs tables clk: st: Update ST clock binding documentation ...
| * | clk: Support for clock parents and rates assigned from device treeSylwester Nawrocki2014-07-251-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This patch adds helper functions to configure clock parents and rates as specified through 'assigned-clock-parents', 'assigned-clock-rates' DT properties for a clock provider or clock consumer device. The helpers are now being called by the bus code for the platform, I2C and SPI busses, before the driver probing and also in the clock core after registration of a clock provider. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
* | i2c: sun6i-p2wi: Remove duplicate inclusion of module.hSachin Kamat2014-06-271-1/+0
| | | | | | | | | | | | | | | | module.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
OpenPOWER on IntegriCloud