- 17 2月, 2015 1 次提交
-
-
由 Andy Shevchenko 提交于
While here, fix few indentations issues across the code. There is no functional change. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 2月, 2015 3 次提交
-
-
由 Max Filippov 提交于
Allow bus clock specification as a common clock handle. This makes this controller easier to use in a setup based on common clock framework. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Zhangfei Gao 提交于
Commit 9439eb3a ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") has added {read,write}{b,w,l,q}_relaxed to include/asm-generic/io.h. So COMPILE_TEST can be added. Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Max Filippov 提交于
clock-frequency property is meant to control the bus frequency for i2c bus drivers, but it was incorrectly used to specify i2c controller input clock frequency. Introduce new attribute, opencores,ip-clock-frequency, that specifies i2c controller clock frequency and make clock-frequency attribute compatible with other i2c drivers. Maintain backwards compatibility in case opencores,ip-clock-frequency attribute is missing. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 27 1月, 2015 2 次提交
-
-
由 Dmitry Osipenko 提交于
Support CPU BE mode by adding endianness conversion for memcpy interactions. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
IOSF_MBI depends on PCI, so we should not select it but depend on it. This ensures also we compile on X86 only, other archs will break because of an arch specific include. Also depend on ACPI since this driver uses it. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NDavid E. Box <david.e.box@linux.intel.com>
-
- 26 1月, 2015 3 次提交
-
-
由 Jarkko Nikula 提交于
Do SCL timing parameter calculation conditionally depending are custom parameters provided since calculated values will get instantly overwritten by provided parameters. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 David Box 提交于
This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the X-Powers AXP288 PMIC. On these platforms access to the PMIC must be shared with platform hardware. The hardware unit assumes full control of the I2C bus and the host must request access through a special semaphore. Hardware control of the bus also makes it necessary to disable runtime pm to avoid interfering with hardware transactions. Signed-off-by: NDavid E. Box <david.e.box@linux.intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 David Box 提交于
Adds support for acquiring and releasing a hardware bus lock in the i2c designware core transfer function. This is needed for i2c bus controllers that are shared with but not controlled by the kernel. Signed-off-by: NDavid E. Box <david.e.box@linux.intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 1月, 2015 1 次提交
-
-
由 Jisheng Zhang 提交于
readl/writel is too expensive especially on Cortex A9 w/ outer L2 cache. This introduces i2c read/write delays on Marvell BG2/BG2Q SoCs when there are heavy L2 cache maintenance operations at the same time. The driver does not perform DMA, so it's safe to use the relaxed version. From another side, the relaxed io accessor macros are available on all architectures now, so we can use the relaxed versions instead. Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 23 1月, 2015 2 次提交
-
-
由 Andy Shevchenko 提交于
The clk_khz field makes sense only if SS counters are not provided. Since we provide them for Haswell and Baytrail explicitly we may omit the clk_khz parameter. Reviewed-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
The Moorestown support bits were removed few years ago. This is a follow up to that changes. Suggested-by: NDavid Cohen <david.a.cohen@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 22 1月, 2015 1 次提交
-
-
由 Philipp Zabel 提交于
This patch fixes up some whitespace issues and addresses a few checkpatch warnings. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 1月, 2015 2 次提交
-
-
由 Philipp Zabel 提交于
The ret variable is set and never used in the error path of i2c_imx_dma_request. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Harini Katakam 提交于
Cadence I2C controller has the following bugs: - completion indication is not given to the driver at the end of a read/receive transfer with HOLD bit set. - Invalid read transaction are generated on the bus when HW timeout condition occurs with HOLD bit set. As a result of the above, if a set of messages to be transferred with repeated start includes any message following a read message, completion is never indicated and timeout occurs. Hence a check is implemented to return -EOPNOTSUPP for such sequences. Signed-off-by: NHarini Katakam <harinik@xilinx.com> Signed-off-by: NVishnu Motghare <vishnum@xilinx.com> [wsa: fixed some whitespaces] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 1月, 2015 5 次提交
-
-
由 Nicholas Mc Guire 提交于
wait_for_completion_timeout does not return negative values so "result" handling here should be simplified to cover the actually possible cases only. Signed-off-by: NNicholas Mc Guire <der.herr@hofr.at> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Doug Anderson 提交于
On Rockchip I2C the controller drops SDA low slightly too soon to meet the "repeated start" requirements. >From my own experimentation over a number of rates: - controller appears to drop SDA at .875x (7/8) programmed clk high. - controller appears to keep SCL high for 2x programmed clk high. The first rule isn't enough to meet tSU;STA requirements in Standard-mode on the system I tested on. The second rule is probably enough to meet tHD;STA requirements in nearly all cases (especially after accounting for the first), but it doesn't hurt to account for it anyway just in case. Even though the repeated start requirement only need to be accounted for during a small part of the transfer, we'll adjust the timings for the whole transfer to meet it. I believe that adjusting the timings in just the right place to switch things up for repeated start would require several extra interrupts and that doesn't seem terribly worth it. With this change and worst case rise/fall times, I see 100kHz i2c going to ~85kHz. With slightly optimized rise/fall (800ns / 50ns) I see i2c going to ~89kHz. Fast-mode isn't affected much because tSU;STA is shorter relative to tHD;STA there. As part of this change we needed to account for the SDA falling time. The specification indicates that this should be the same, but we'll follow Designware's lead and add a binding. Note that we deviate from Designware and assign the default SDA falling time to be the same as the SCL falling time, which is incredibly likely. Signed-off-by: NDoug Anderson <dianders@chromium.org> [wsa: rebased to i2c/for-next] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 addy ke 提交于
The number of clock cycles to be written into the CLKDIV register that determines the I2C clk high phase includes the rise time. So to meet the timing requirements defined in the I2C specification which defines the minimal time SCL has to be high, the rise time has to taken into account. The same applies to the low phase with falling time. In my test on RK3288-Pink2 board, which is not an upstream board yet, if external pull-up resistor is 4.7K, rise_ns is about 700ns. So the measured high_ns is about 3900ns, which is less than 4000ns (the minimum high_ns in I2C specification for Standard-mode). To fix this bug min_low_ns should include fall time and min_high_ns should include rise time. This patch merged the patch from chromium project which can get the rise and fall times for signals from the device tree. This allows us to more accurately calculate timings. see: https://chromium-review.googlesource.com/#/c/232774/Signed-off-by: NAddy Ke <addy.ke@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> [wsa: fixed a typo in the docs] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Harini Katakam 提交于
The I2C controller sends a NACK to the slave when transfer size register reaches zero, irrespective of the hold bit. So, in order to handle transfers greater than 252 bytes, the transfer size register has to be maintained at a value >= 1. This patch implements the same. The interrupt status is cleared at the beginning of the isr instead of the end, to avoid missing any interrupts. Signed-off-by: NHarini Katakam <harinik@xilinx.com> [wsa: added braces around else branch] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
CPPCHECK rightfully says: drivers/i2c/busses/i2c-pmcmsp.c:151: style: The function 'pmcmsptwi_reg_to_clock' is never used. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 20 12月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 18 12月, 2014 5 次提交
-
-
由 Geert Uytterhoeven 提交于
If NO_DMA=y: drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap': i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single' drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma': i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single' i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error' Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
DMA is opt-in for this driver. So, we can't use deferred probing for requesting DMA channels in probe, because our driver would get endlessly deferred if DMA support is compiled in AND the DMA driver is missing. Because we can't know when the DMA driver might show up, we always try again when a DMA transfer would be possible. The downside is that there is more overhead for setting up PIO transfers under the above scenario. But well, having DMA enabled and the proper DMA driver missing looks like a broken or test config anyhow. Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Refactor DMA setup to keep the errno so we can implement better deferred probe support in the next step. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Thomas Petazzoni 提交于
Originally, the I2C controller supported by the i2c-mv64xxx driver requires a lot of software support: an interrupt is generated at each step of an I2C transaction (after the start bit, after sending the address, etc.) and the driver is in charge of re-programming the I2C controller to do the next step of the I2C transaction. This explains the fairly complex state machine that the driver has. On Marvell Armada XP and later processors (Armada 375, 38x, etc.), the I2C controller was extended with a part called the "I2C Bridge", which allows to offload the I2C transaction completely to the hardware. Initial support for this mechanism was added in commit 930ab3d4 ("i2c: mv64xxx: Add I2C Transaction Generator support"). However, the implementation done in this commit has two related issues, which this commit fixes by completely changing how the offload implementation is done: * SMBus read transfers, where there is one write to select the register immediately followed in the same transaction by one read, were making the processor hang. This was easier visible on the Marvell Armada XP WRT1900AC platform using a driver for an I2C LED controller, or on other Armada XP platforms by using a simple 'i2cget' command to read an I2C EEPROM. * The implementation was based on the fact that the offload engine was re-programmed to transfer each message of an I2C xfer: this meant that each message sent with the offload engine was starting with a normal I2C start sequence. However, the I2C subsystem assumes that all messages belonging to the same xfer will use the so-called "repeated start" so that the entire I2C xfer is seen as one transfer by the I2C devices and cannot be interrupt by other I2C masters on the same bus. In fact, the "I2C Bridge" allows to offload three types of xfer: - xfer of one write message - xfer of one read message - xfer of one write message followed by one read message For all other situations, we have to fallback to not using the "I2C Bridge" in order to get proper I2C semantics. Therefore, this commit reworks the offload implementation to put it not at the message level, but at the xfer level: in the mv64xxx_i2c_xfer() function, we decide if the transaction can be offloaded (in which case it is handled by the mv64xxx_i2c_offload_xfer() function), or otherwise it is handled by the slow path (implemented in the existing mv64xxx_i2c_execute_msg()). This allows to simplify the state machine, which no longer needs to have any state related to the offload implementation: the offload implementation is now completely separated from the slow path (with the exception of the interrupt handler, of course). In summary: - mv64xxx_i2c_can_offload() will analyze an I2C xfer and decided of the "I2C Bridge" can be used to offload it or not. - mv64xxx_i2c_offload_xfer() will actually program the "I2C Bridge" to offload one xfer (of either one or two messages), and block using mv64xxx_i2c_wait_for_completion() until the xfer completes. - The interrupt handler mv64xxx_i2c_intr() is modified to push the offload related code to a separate function, mv64xxx_i2c_intr_offload(). It will take care of reading the received data if needed. This commit was tested on: - Armada XP OpenBlocks AX3-4 (EEPROM on I2C and RTC on I2C) - Armada XP WRT1900AC (LED controller on I2C) - Armada XP GP (EEPROM on I2C) Fixes: 930ab3d4 ("i2c: mv64xxx: Add I2C Transaction Generator support") Cc: <stable@vger.kernel.org> # v3.12+ Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> [wsa: fixed checkpatch warnings] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Thomas Petazzoni 提交于
Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 12月, 2014 1 次提交
-
-
由 Neelesh Gupta 提交于
The patch exposes the available i2c busses on the PowerNV platform to the kernel and implements the bus driver to support i2c and smbus commands. The driver uses the platform device infrastructure to probe the busses on the platform and registers them with the i2c driver framework. Signed-off-by: NNeelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> (I2C part, excluding the bindings) Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 12 12月, 2014 2 次提交
-
-
由 Wolfram Sang 提交于
We don't need the mask since we obtain the channels via DT. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The first I2C slave provider using the new generic interface. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 12月, 2014 1 次提交
-
-
由 Rafael J. Wysocki 提交于
After commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so some #ifdef blocks depending on CONFIG_PM_RUNTIME may be dropped now. Do that in drivers/i2c/busses/i2c-omap.c. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NWolfram Sang <wsa@the-dreams.de>
-
- 05 12月, 2014 4 次提交
-
-
由 Vishnu Motghare 提交于
Cadence I2C controller has bug wherein it generates invalid read transactions after timeout in master receiver mode. This driver does not use the HW timeout and this interrupt is disabled but the feature itself cannot be disabled. Hence, this patch writes the maximum value (0xFF) to this register. This is one of the workarounds to this bug and it will not avoid the issue completely but reduces the chances of error. Signed-off-by: NVishnu Motghare <vishnum@xilinx.com> Signed-off-by: NHarini Katakam <harinik@xilinx.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Grygorii Strashko 提交于
According to I2C specification the NACK should be handled as follows: "When SDA remains HIGH during this ninth clock pulse, this is defined as the Not Acknowledge signal. The master can then generate either a STOP condition to abort the transfer, or a repeated START condition to start a new transfer." [I2C spec Rev. 6, 3.1.6: http://www.nxp.com/documents/user_manual/UM10204.pdf] Currently the Davinci i2c driver interrupts the transfer on receipt of a NACK but fails to send a STOP in some situations and so makes the bus stuck until next I2C IP reset (idle/enable). For example, the issue will happen during SMBus read transfer which consists from two i2c messages write command/address and read data: S Slave Address Wr A Command Code A Sr Slave Address Rd A D1..Dn A P <--- write -----------------------> <--- read ---------------------> The I2C client device will send NACK if it can't recognize "Command Code" and it's expected from I2C master to generate STP in this case. But now, Davinci i2C driver will just exit with -EREMOTEIO and STP will not be generated. Hence, fix it by generating Stop condition (STP) always when NACK is received. This patch fixes Davinci I2C in the same way it was done for OMAP I2C commit cda2109a ("i2c: omap: query STP always when NACK is received"). Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reported-by: NHein Tibosch <hein_tibosch@yahoo.es> Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Grygorii Strashko 提交于
Switch Davinci I2C driver to use platform_get_irq(), because it is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ, ..) for requesting IRQ resources any more, as they can be not ready yet in case of DT-boot. Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We can simply pass the pointer to the private structure to the irq routine instead of passing the platform device and looking up its driver_data. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 12月, 2014 1 次提交
-
-
由 Rafael J. Wysocki 提交于
The SET_PM_RUNTIME_PM_OPS() and SET_RUNTIME_PM_OPS() macros are identical except that one of them is not empty for CONFIG_PM set, while the other one is not empty for CONFIG_PM_RUNTIME set, respectively. However, after commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so one of these macros is now redundant. For this reason, replace SET_PM_RUNTIME_PM_OPS() with SET_RUNTIME_PM_OPS() everywhere and redefine the SET_PM_RUNTIME_PM_OPS symbol as SET_RUNTIME_PM_OPS in case new code is starting to use the macro being removed here. Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NKevin Hilman <khilman@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 26 11月, 2014 2 次提交
-
-
由 Petr Cvek 提交于
Add support for SCCB by implementing I2C_M_IGNORE_NAK and I2C_M_STOP flags and advertising functionality flag I2C_FUNC_PROTOCOL_MANGLING. Also fixed missing functionality flag I2C_FUNC_NOSTART. Signed-off-by: NPetr Cvek <petr.cvek@tul.cz> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alexander Kochetkov 提交于
Commit 0f5768bf ("i2c: omap: implement workaround for handling invalid BB-bit values") introduce the error result in boot test fault on OMAP3530 boards. The patch fix the error (disable i2c bus test for OMAP3530). Reported-by: NKevin Hilman <khilman@kernel.org> Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com> Fixes: 0f5768bf ("i2c: omap: implement workaround for handling invalid BB-bit values") Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NKevin Hilman <khilman@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 11月, 2014 3 次提交
-
-
由 Pankaj Dubey 提交于
Let's handle i2c interrupt re-configuration in i2c driver. This will help us in removing some soc specific checks from machine files and will help in removing static iomapping of SYS register in exynos.c Also handle saving and restoring of SYS_I2C_CFG register during suspend and resume of i2c driver. Signed-off-by: NPankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Max Schwarz 提交于
Now that we are using the clk notifier framework we get compile errors without COMMON_CLK. But the driver fails to probe without COMMON_CLK anyways, so just add that as a Kconfig dependency. Signed-off-by: NMax Schwarz <max.schwarz@online.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alexander Kochetkov 提交于
No functional changes. Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com> Reviewed-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-