- 28 3月, 2014 2 次提交
-
-
由 Nishanth Menon 提交于
we use IS_ERR_VALUE to check for error values of pm_runtime_get_sync, when the value can only be < 0 in the case of err. Replace the check with a simpler < 0 check. This fixes the coccicheck warnings: linux-2.6/drivers/i2c/busses/i2c-omap.c:1157:5-24: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 1158 linux-2.6/drivers/i2c/busses/i2c-omap.c:1278:7-26: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 1279 drivers/i2c/busses/i2c-omap.c:638:5-24: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 639 Signed-off-by: NNishanth Menon <nm@ti.com> Reviewed-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Uwe Kleine-König 提交于
This was tested on a EFM32GG-DK3750 devboard that has a temperature sensor and an eeprom on its i2c bus. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 3月, 2014 5 次提交
-
-
由 Jingoo Han 提交于
Remove unnecessary cast of void pointer, because 'algo_data' of 'struct i2c_adapter' is a void pointer. Casting the void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Reviewed-by: NNaveen Krishna Chatradhi <ch.naveen@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. warning: 'exynos5_i2c_suspend_noirq' defined but not used [-Wunused-function] warning: 'exynos5_i2c_resume_noirq' defined but not used [-Wunused-function] Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ben Dooks 提交于
When using device-tree and the i2c-gpio driver is called before the GPIO node has been probed then it needs to correctly defer the probe instead of returning a permanent error that the gpio numbers are not valid. This fixes the following error: /i2c@2: invalid GPIO pins, sda=-517/scl=-517 Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 David Howells 提交于
The SMBUS tracepoints can be enabled thusly: echo 1 >/sys/kernel/debug/tracing/events/i2c/enable and will dump messages that can be viewed in /sys/kernel/debug/tracing/trace that look like: ... smbus_read: i2c-0 a=051 f=0000 c=fa BYTE_DATA ... smbus_reply: i2c-0 a=051 f=0000 c=fa BYTE_DATA l=1 [39] ... smbus_result: i2c-0 a=051 f=0000 c=fa BYTE_DATA rd res=0 formatted as: i2c-<adapter-nr> a=<addr> f=<flags> c=<command> <protocol-name> <rd|wr> res=<result> l=<data-len> [<data-block>] The adapters to be traced can be selected by something like: echo adapter_nr==1 >/sys/kernel/debug/tracing/events/i2c/filter Note that this shares the same filter and enablement as i2c. Signed-off-by: NDavid Howells <dhowells@redhat.com> Reviewed-by: NSteven Rostedt <rostedt@goodmis.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 David Howells 提交于
Add tracepoints into the I2C message transfer function to retrieve the message sent or received. The following config options must be turned on to make use of the facility: CONFIG_FTRACE CONFIG_ENABLE_DEFAULT_TRACERS The I2C tracepoint can be enabled thusly: echo 1 >/sys/kernel/debug/tracing/events/i2c/enable and will dump messages that can be viewed in /sys/kernel/debug/tracing/trace that look like: ... i2c_write: i2c-5 #0 a=044 f=0000 l=2 [02-14] ... i2c_read: i2c-5 #1 a=044 f=0001 l=4 ... i2c_reply: i2c-5 #1 a=044 f=0001 l=4 [33-00-00-00] ... i2c_result: i2c-5 n=2 ret=2 formatted as: i2c-<adapter-nr> #<message-array-index> a=<addr> f=<flags> l=<datalen> n=<message-array-size> ret=<result> [<data>] The operation is done between the i2c_write/i2c_read lines and the i2c_reply and i2c_result lines so that if the hardware hangs, the trace buffer can be consulted to determine the problematic operation. The adapters to be traced can be selected by something like: echo adapter_nr==1 >/sys/kernel/debug/tracing/events/i2c/filter These changes are based on code from Steven Rostedt. Signed-off-by: NSteven Rostedt <rostedt@goodmis.org> Signed-off-by: NDavid Howells <dhowells@redhat.com> Reviewed-by: NSteven Rostedt <rostedt@goodmis.org> [wsa: adapted path for 'enable' in the commit msg] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 3月, 2014 3 次提交
-
-
由 Jingoo Han 提交于
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Simon Glass 提交于
There is a rather odd feature of the exynos i2c controller that if it is left enabled, it can lock itself up with the clk line held low. This makes the bus unusable. Unfortunately, the s3c24xx_i2c_set_master() function does not notice this, and reports a timeout. From then on the bus cannot be used until the AP is rebooted. The problem happens when any sort of interrupt occurs (e.g. due to a bus transition) when we are not in the middle of a transaction. We have seen many instances of this when U-Boot leaves the bus apparently happy, but Linux cannot access it. The current code is therefore pretty fragile. This fixes things by leaving the bus disabled unless we are actually in a transaction. We enable the bus at the start of the transaction and disable it at the end. That way we won't get interrupts and will not lock up the bus. It might be possible to clear pending interrupts on start-up, but this seems to be a more robust solution. We can't service interrupts when we are not in a transaction, and anyway would rather not lock up the bus while we try. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NNaveen Krishna Chatradhi <ch.naveen@samsung.com> Acked-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com>
-
- 12 3月, 2014 3 次提交
-
-
由 Marek Roszko 提交于
This adds the ability to set "clock-frequency" in the device tree for the at91 i2cbus following the naming of other i2c bus implementations. If the property is not set,the clock frequency will default to the previously used define of 100KHz. Signed-off-by: NMarek Roszko <mark.roszko@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Chew, Chiau Ee 提交于
On Intel BayTrail, there was case whereby the resulting fast mode bus speed becomes slower (~20% slower compared to expected speed) if using the HCNT/LCNT calculated in the core layer. Thus, this patch is added to allow pci glue layer to pass in optimal HCNT/LCNT/SDA hold time values to core layer since the core layer supports cofigurable HCNT/LCNT/SDA hold time values now. Signed-off-by: NChew, Chiau Ee <chiau.ee.chew@intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 11 3月, 2014 5 次提交
-
-
由 Maxime COQUELIN 提交于
This patch fixes the error returned to the i2c_transfer function to -EAGAIN in case of arbitratin lost, so that the retry mechanism can be used. Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sachin Kamat 提交于
Commit 436d42c6 ("ARM: samsung: move platform_data definitions") moved the files to the current location but forgot to remove the pointer to its previous location. Clean it up. While at it also change the header file protection macros appropriately. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We now have a central place to put this code to. Tested-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Calling the state machine with a definite state which is only used in this context is superfluous. Do it directly. Tested-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
For start and restart, we are doing the same thing. Let's consolidate that. Tested-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 10 3月, 2014 4 次提交
-
-
由 Chew, Chiau Ee 提交于
All the I2C controllers on Intel BayTrail LPSS subsystem able to support 10-bit addressing mode functionality. Signed-off-by: NChew, Chiau Ee <chiau.ee.chew@intel.com> Signed-off-by: NOng, Boon Leong <boon.leong.ong@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource(). Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource(). Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Chew, Kean ho 提交于
Add Device ID of Intel BayTrail SMBus Controller. Signed-off-by: NChew, Kean ho <kean.ho.chew@intel.com> Signed-off-by: NChew, Chiau Ee <chiau.ee.chew@intel.com> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 09 3月, 2014 5 次提交
-
-
由 Mika Westerberg 提交于
Intel Baytrail I2C controllers can be enumerated from PCI as well as from ACPI. In order to support this add the Baytrail PCI IDs to the driver. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
The PCI part of the DesignWare I2C driver does a lot of things that are not required anymore. For example drivers aren't supposed to handle PCI state transitions themselves. This is all provided by the PCI bus core already. In addition to that there is no point scheduling RPM suspend on driver's idle hook but instead we can use RPM autosuspend for this (which is enabled in the driver already). As a bonus, this patch also fixes following compile warning which is emitted when the driver was compiled without CONFIG_PM_RUNTIME set: drivers/i2c/busses/i2c-designware-pcidrv.c:245:12: warning: ‘i2c_dw_pci_runtime_idle’ defined but not used [-Wunused-function] Reported-by: Nxinhui.pan <xinhuix.pan@intel.com> Reported-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Romain Baeriswyl 提交于
This patch allows to set independantly SCL and SDA falling times. The tLOW period is computed by taking into account the SCL falling time. The tHIGH period is computed by taking into account the SDA falling time. For instance in case the margin on tLOW is considered too small, it can be increased by increasing the SCL falling time which is by default set at 300ns. The same applies for tHIGH period with the help of SDA falling time. Signed-off-by: NRomain Baeriswyl <romainba@abilis.com> Reviewed-by: NChristian Ruppert <christian.ruppert@abilis.com> Acked-by: NShinya Kuribayashi <skuribay@pobox.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sonic Zhang 提交于
Put necessary SSYNC code into blackfin twi arch header. The generic TWI driver should not contain any architecture specific code. Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sonic Zhang 提交于
The ADI TWI peripheral is not binding to the Blackfin processor only. The bits macros and structs should be put in the generic include header. And update head file path in drivers accordingly. Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 07 3月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
Commit 370136bc ("i2c: mv64xxx: Add reset deassert call") introduced: drivers/video/Kconfig:42:error: recursive dependency detected! ARCH_SUNXI selects RESET_CONTROLLER anyhow. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 3月, 2014 12 次提交
-
-
由 Maxime Ripard 提交于
The Allwinner A31 I2C controller is almost identical to the one used in the other Allwinner SoCs, except for the fact that it needs to clear the interrupt by setting the INT_FLAGS bit in the control register, instead of clearing it. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Tested-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Maxime Ripard 提交于
The Allwinner A31 SoC using that IP has a reset controller maintaining it reset unless told otherwise. Add some optional reset support to the driver. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Tested-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NStephen Warren <swarren@nvidia.com>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NPeter Korsgaard <jacmet@sunsite.dk>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NSonic Zhang <sonic.zhang@analog.com>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
-
由 Wolfram Sang 提交于
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Class based instantiation can cause noticeable delays when booting. This mechanism is used when it is not possible to describe slaves on I2C busses. As we do have other mechanisms, most embedded I2C will not need classes and for embedded it is explicitly not recommended to use them. Add a deprecation warning for drivers which want to disable class based instantiation in the near future to gain boot-up time, so users relying on this technique can switch to something better. They really should. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ulf Hansson 提交于
We should never be busy performing transfers at suspend late, thus there are no reason to check for it. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-