- 23 8月, 2013 2 次提交
-
-
由 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 21 次提交
-
-
由 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>
-
由 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-ocores.c:460:12: warning: 'ocores_i2c_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-ocores.c:471:12: warning: 'ocores_i2c_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-designware-platdrv.c:211:12: warning: 'dw_i2c_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-designware-platdrv.c:221:12: warning: 'dw_i2c_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-mpc.c:724:12: warning: 'mpc_i2c_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-mpc.c:734:12: warning: 'mpc_i2c_resume' defined but not used [-Wunused-function] Also, this patch makes mpc_i2c_pm_ops static, because mpc_i2c_pm_ops is not exported. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fabio Estevam 提交于
stmp_reset_block() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 07 8月, 2013 8 次提交
-
-
由 Wolfram Sang 提交于
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wolfram Sang 提交于
Since commit ab78029e (drivers/pinctrl: grab default handles from device core), we can rely on device core for setting the default pins. Compile tested only. Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Guenter Roeck 提交于
The I2C adapters on Freescale MPC107/824x/85xx/512x/52xx/83xx/86xx all have the same name "MPC adapter". Since I2C adapter numbers can change across reboots and even after loading/unloading an I2C bus master driver, adapter names have to be used to identify adapters and thus should be unique and well defined. Since this is not the case with this driver, it is difficult if not impossible to identify a specific adapter from user space on affected platforms. To remedy the problem, use the adapter memory address as part of the adapter name. With this patch, adapter names are: On P2020: MPC adapter at 0xfff703000 MPC adapter at 0xfff703100 On P5040: MPC adapter at 0xffe118000 MPC adapter at 0xffe118100 MPC adapter at 0xffe119000 MPC adapter at 0xffe119100 Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NJean Delvare <khali@linux-fr.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sebastian Hesselbarth 提交于
i2c_put_adapter dereferences i2c_adapter pointer passed without check for NULL. This adds a check for non-NULL pointer to allow i2c_put_adapter called with NULL and behave the same way i2c_release_client does already. It allows to simplify drivers where you need to release the adapter during probe failures. Signed-off-by: NSebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Phil Carmody 提交于
In 0826374b - i2c: Multiplexed I2C bus core support core i2c code increased in size and complexity even when I2C_MUX wasn't selected. Turning this check into a constant NULL in the n case lets the client functions in be simplified too, not needing to include never-called calls to the mux-specific helpers. Signed-off-by: NPhil Carmody <phil.carmody@partner.samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Chew, Chiau Ee 提交于
If both IC_EMPTYFIFO_HOLD_MASTER_EN and IC_RESTART_EN are set to 1, the Designware I2C controller doesn't generate RESTART unless user specifically requests it by setting RESTART bit in IC_DATA_CMD register. Since IC_EMPTYFIFO_HOLD_MASTER_EN setting can't be detected from hardware register, we must always manually set the restart bit between messages. Signed-off-by: NChew, Chiau Ee <chiau.ee.chew@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Leilei Shang 提交于
To enter high speed mode, following steps should be done: 1. When running in high speed mode, i2c clock rate is different from standard mode. Clock rate must be set according to specification first. 2. When i2c controller sends a master code and wins arbitration, high speed mode is entered. If you want to enable high speed mode, the following members of platform data should be set to proper value: 1. "high_mode" should be set to "1". 2. "master_code" should be set to "8'b 0000_1xxx"(x is 0 or 1). If no master_code is set, set to default value 0xe. 3. "rate" should be set according to specification. Signed-off-by: NLeilei Shang <shangll@marvell.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Maxime Ripard 提交于
Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 05 8月, 2013 3 次提交
-
-
由 Michael Brunner 提交于
Add some necessary braces that have been removed during driver cleanup. This fixes the I2C prescaler calculation. Signed-off-by: NMichael Brunner <michael.brunner@kontron.com> Tested-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fabio Estevam 提交于
Recently we have been seing some reports about PIO mode not working properly. - http://www.spinics.net/lists/linux-i2c/msg11985.html - http://marc.info/?l=linux-i2c&m=137235593101385&w=2 - https://lkml.org/lkml/2013/6/24/430 Let's use DMA mode even for small transfers. Without this patch, i2c reads the incorrect sgtl5000 version on a mx28evk when touchscreen is enabled: [ 5.856270] sgtl5000 0-000a: Device with ID register 0 is not a sgtl5000 [ 9.877307] sgtl5000 0-000a: ASoC: failed to probe CODEC -19 [ 9.883528] mxs-sgtl5000 sound.12: ASoC: failed to instantiate card -19 [ 9.892955] mxs-sgtl5000 sound.12: snd_soc_register_card failed (-19) Cc: <stable@vger.kernel.org> Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NMarek Vasut <marex@denx.de> [wsa: we have a proper solution for -next, so this non intrusive solution is OK for now] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Linus Torvalds 提交于
-