- 04 9月, 2013 1 次提交
-
-
由 Nguyen Viet Dung 提交于
This patch modify I2C driver of rcar-H1 to usable on both rcar-H1 and rcar-H2. Signed-off-by: NNguyen Viet Dung <nv-dung@jinso.co.jp> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 28 8月, 2013 10 次提交
-
-
由 Zhiwu Song 提交于
let i2c core retry 3 times as sometimes we get random noack and timeout even when we access an existing i2c client. Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Zhiwu Song 提交于
if users set I2C_M_REV_DIR_ADDR, revert the direction of address. Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com> Signed-off-by: NRongjun Ying <rongjun.ying@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Zhiwu Song 提交于
there is a typo before, it makes the final bitrate wrong, this patch fixes it. Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Zhiwu Song 提交于
this fixes the issue that we lost to wait the i2c reset finished. Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Zhiwu Song 提交于
Due to hardware ANOMALY, we need to reset I2C earlier after we get NOACK while accessing non-existing clients, otherwise we will get errors even we access existing clients later Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
Some Intel LPSS I2C devices make the SDA hold time and *CNT parameters available via SSCN (standard mode) and FMCN (fast mode) ACPI methods. Implement support for this so that we check whether an ACPI method exists and if it does, fill in the SDA hold time and *CNT values to the device private structure for core to use. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each of the I2C speed modes (standard and fast). These registers are programmed based on the input clock speed in the driver. The current code calculates these values based on the input clock speed and tries hard to meet the I2C bus timing requirements. This could result non-optimal values with regarding to the bus speed. For example on Intel BayTrail we get bus speed of 315.41kHz which is ~20% slower than we would expect (400kHz) in fast mode (even though the timing requirements are met). This patch makes it possible for the platform code to pass more optimal HCNT/LCNT values to the core driver if they are known beforehand. If these are not set we use the calculated and more conservative values. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NShinya Kuribayashi <skuribay@pobox.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Gerhard Sittig 提交于
make the MPC I2C driver get, prepare and enable the gated clock item for register access during probe; disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use clock lookup is non-fatal in this implementation as not all platforms may provide clock specs in their device tree, but failure to enable a clock when specified is considered fatal Signed-off-by: NGerhard Sittig <gsi@denx.de> Signed-off-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wei Yongjun 提交于
Fix to return a negative error code in the irq get error handling case instead of 0, as done elsewhere in this function. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> [wsa: fixed wrong exit point, too] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Return error code in the error case, and not success. Acked-by: NNeil Horman <nhorman@tuxdriver.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 8月, 2013 1 次提交
-
-
由 Wolfram Sang 提交于
Reported-by: NMark Rutland <mark.rutland@arm.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 23 8月, 2013 5 次提交
-
-
由 Jingchang Lu 提交于
use exact SoC revision instead of wildcard describing the compatible property requirement in the binding document. This will make the binding more clearer. Signed-off-by: NJingchang Lu <b35083@freescale.com> Acked-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
This follows what has already been done for the DeviceTree helpers. Move the ACPI helpers from drivers/acpi/acpi_i2c.c to the I2C core and update documentation accordingly. This also solves a problem reported by Jerry Snitselaar that we can't build the ACPI I2C helpers as a module. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child nodes in the core instead of doing this manually in each driver. So, fix the drivers and documentation, too. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Gregory CLEMENT 提交于
All the Armada XP (mv78230, mv78260 and mv78460) have a silicon issue in the I2C controller which violate the i2c repeated start timing. The I2C standard requires a minimum of 4.7us for the repeated start condition whereas the I2C controller of the Armada XP this time is 2.9us. So this patch adds a 5us delay for the start case only if the the compatible i2c-mv78230 is set. Based on the initals patches from Zbigniew Bodek Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NZbigniew Bodek <zbb@semihalf.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Gregory CLEMENT 提交于
The I2C Transaction Generator offloads CPU from managing I2C transfer step by step. This feature is currently only available on Armada XP, so usage of this mechanism is activated through device tree. Based on the work of Piotr Ziecik and rewrote to use the new way of handling multiples i2c messages. Signed-off-by: NPiotr Ziecik <kosmo@semihalf.com> Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 21 8月, 2013 1 次提交
-
-
由 Wolfram Sang 提交于
We want to bail out immediately if i2c_add_adapter failed and not try to register child nodes with a nilled adapter structure. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 20 8月, 2013 3 次提交
-
-
由 Sachin Kamat 提交于
__initdata should be placed between the variable name and equal sign for the variable to be placed in the intended section. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jussi Kivilinna 提交于
Patch fixes i2c-tiny-usb not to use stack as URB transfer_buffer. URB buffers need to be DMA-able, which stack is not. Patch is only compile tested. Signed-off-by: NJussi Kivilinna <jussi.kivilinna@iki.fi> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 19 8月, 2013 1 次提交
-
-
由 Grygorii Strashko 提交于
According to I2C specification the NACK should be handled as folowing: "When SDA remains HIGH during this ninth clock pulse, this is defined as the Not Acknowledge signal. The master can then gene rate either a STOP condition to abort the transfer, or a repeated START condition to start a new transfer." [http://www.nxp.com/documents/user_manual/UM10204.pdf] The same is recomened by TI I2C wiki: http://processors.wiki.ti.com/index.php/I2C_Tips Currently, the OMAP I2C driver interrupts I2C trunsfer in case of NACK, but It queries Stop condition OMAP_I2C_CON_REG.STP=1 only if NACK has been received during the last message transmitting/recieving. This may lead to stuck Bus in "Bus Busy" until I2C IP reset (idle/enable). Hence, fix it by querying Stop condition (STP) always when NACK is received. Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Acked-by: NHein Tibosch <hein_tibosch@yahoo.es> Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 8月, 2013 1 次提交
-
-
由 Lothar Waßmann 提交于
The timing calculation is rather bogus and gives extremely wrong results for higher frequencies (on an i.MX28). E.g. instead of 400 kHz I measured 770 kHz. Implement a calculation that adheres to the I2C spec and gives exact results for I2C frequencies from 12.56 kHz to 960 kHz. Also the bus_free and leadin parameters are programmed according to the I2C spec for standard and fast mode. This was tested on a Ka-Ro TX28 module with a DS1339, TSC2007, PCA9554 and SGTL5000 client. Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de> Acked-by: NMarek Vasut <marex@denx.de> [wsa: patch fixes whitespace issue, too] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 8月, 2013 17 次提交
-
-
由 Julia Lawall 提交于
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
Add Freescale Vybrid VF610 I2C controller support to imx I2C driver framework. Signed-off-by: NJason Jin <Jason.jin@freescale.com> Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
This add struct imx_i2c_hwdata to hold more quirks data which may vary between SoCs, thus the driver can operate on more differences to support more SoCs. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
This add bits operation macro that differ between SoCs. Interrupt flags clear operation in I2SR differ between SoCs: write zero to clear(w0c) INT flag on i.MX, but write one to clear(w1c) INT flag on Vybrid. I2C module enable operation in I2CR also differ between SoCs: set I2CR_IEN bit enable the module on i.MX, but clear I2CR_IEN bit enable the module on Vybrid. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
the I2C register offset may different between SoCs, to provid support for all these chips, split the register offset into a fixed base address and a variable shift value, then the full register offset will be calculated by reg_off = ( reg_base_addr << reg_shift) Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
wrap the readb(), writeb() into inline function calls. It would make the driver more clearer to support platform with different register offset. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
The id_entry field should be changed by platform driver core, driver should prevent changing it derectly. Use local variable to save and extract platform_device_id info of the dts devices instead. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
The module clk should be enabled before write to its register in probe(), and the clk can be disabled after. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
using struct representing the i2c clk{div, val} pair would make the i2c_clk_div array more clear. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Rudolf Marek 提交于
Add support for the secondary SMBus controller on the AMD SB800 and AMD FCH chipsets. Signed-off-by: NRudolf Marek <r.marek@assembler.cz> Tested-by: NPaul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Lutomirski 提交于
While writing the i2c-imc driver, I noticed that the warning message when the i2c core can't figure out how to probe is mostly useless. This trivial patch improves it. Signed-off-by: NAndy Lutomirski <luto@amacapital.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Santosh Shilimkar 提交于
Keystone SOCs uses the same I2C IP as available on DaVinci SOCs. Update the config so that ARCH_KEYSTONE can use it. Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Santosh Shilimkar 提交于
This driver no longer uses definitions from mach/hardware.h. On the other hand, including this header breaks this driver on non-davinci platforms which don't have such a header. Acked-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/i2c/busses/i2c-bfin-twi.c:585:12: warning: 'i2c_bfin_twi_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-bfin-twi.c:600:12: warning: 'i2c_bfin_twi_resume' defined but not used [-Wunused-function] Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Add CONFIG_PM_SLEEP to suspend function to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/i2c/busses/i2c-puv3.c:249:12: warning: 'puv3_i2c_suspend' defined but not used [-Wunused-function] Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/i2c/busses/i2c-pnx.c:599:12: warning: 'i2c_pnx_controller_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-pnx.c:608:12: warning: 'i2c_pnx_controller_resume' defined but not used [-Wunused-function] Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/i2c/busses/i2c-stu300.c:945:12: warning: 'stu300_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-stu300.c:954:12: warning: 'stu300_resume' defined but not used [-Wunused-function] Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-