- 24 2月, 2016 1 次提交
-
-
由 Sricharan R 提交于
QUP cores can be attached to a BAM module, which acts as a dma engine for the QUP core. When DMA with BAM is enabled, the BAM consumer pipe transmitted data is written to the output FIFO and the BAM producer pipe received data is read from the input FIFO. With BAM capabilities, qup-i2c core can transfer more than 256 bytes, without a 'stop' which is not possible otherwise. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 21 2月, 2016 6 次提交
-
-
由 Wolfram Sang 提交于
I request this for drivers, so the core should adhere to sorted includes as well. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
I request this for drivers, so the core should adhere to sorted includes as well. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
I request this for drivers, so the core should adhere to sorted includes as well. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
I request this for drivers, so the core should adhere to sorted includes as well. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
I request this for drivers, so the core should adhere to sorted includes as well. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
I request this for drivers, so the core should adhere to sorted includes as well. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 2月, 2016 12 次提交
-
-
由 Ray Jui 提交于
The current iProc I2C driver only allows each TX transfer up to 63 bytes (the TX FIFO has a size of 64 bytes, and one byte is reserved for slave address). This patch enhances the driver to support TX transfer in each I2C message for up to 65535 bytes (a practical maximum, since member 'max_write_len' of 'struct i2c_adapter_quirks is of type 'u16') This works by loading up the I2C TX FIFO and enabling the TX underrun interrupt for each burst. After each burst of TX data is finished, i.e., when the TX FIFO becomes empty, the TX underrun interrupt will be triggered and another burst of TX data can be loaded into the TX FIFO. This repeats until all TX data are finished Signed-off-by: NRay Jui <rjui@broadcom.com> Tested-by: NIcarus Chau <ichau@broadcom.com> Reviewed-by: NScott Branden <sbranden@broadcom.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ray Jui 提交于
Fix typo in the driver from 'I2C_TIMEOUT_MESC' to 'I2C_TIMEOUT_MSEC' Signed-off-by: NRay Jui <rjui@broadcom.com> Reviewed-by: NScott Branden <sbranden@broadcom.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ray Jui 提交于
Add proper recovery mechanism to the iProc I2C driver in error cases. Signed-off-by: NIcarus Chau <ichau@broadcom.com> Signed-off-by: NRay Jui <rjui@broadcom.com> Tested-by: NIcarus Chau <ichau@broadcom.com> Reviewed-by: NScott Branden <sbranden@broadcom.com> [wsa: whitespace fixes] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
Add COMPILE_TEST for the compilation test coverage. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Liguo Zhang 提交于
If 4GB mode is enabled, we should add 4GB DMA mode support in i2c driver. Set 4GB mode register to support 4GB mode. Signed-off-by: NLiguo Zhang <liguo.zhang@mediatek.com> Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org> Reviewed-by: NYingjoe Chen <yingjoe.chen@mediatek.com> [wsa: updated commit message] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jarkko Nikula 提交于
There can be unnecessary runtime suspend-resume cycle during i2c-designware-platdrv probe when it registers the I2C adapter device. This happens because i2c-designware-platdrv is set to initially active platform device in its probe function and is a parent of I2C adapter. In that case power.usage_count of i2c-designware device is zero and pm_runtime_get()/pm_runtime_put() cycle during probe could put it into runtime suspend. This happens when the i2c_register_adapter() calls the device_register(): i2c_register_adapter device_register device_add bus_probe_device device_initial_probe __device_attach if (dev->parent) pm_runtime_get_sync(dev->parent) ... if (dev->parent) pm_runtime_put(dev->parent) After that the i2c_register_adapter() continues registering I2C slave devices. In case slave device probe does I2C transfers the parent will resume again and thus get a needless runtime suspend/resume cycle during adapter registration. Prevent this while retaining the runtime PM status of i2c-designware by only incrementing/decrementing device power usage count during I2C adapter registration. That makes sure there won't be spurious runtime PM status changes and lets the driver core to idle the device after probe finishes. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jean Delvare 提交于
The i2c-designware-platform module has duplicate module information when CONFIG_I2C_DESIGNWARE_BAYTRAIL is set. It gets the information from both i2c-designware-platdrv and i2c-designware-baytrail. The latter is optional extra code which ends up in the same module so it should not export module information. Signed-off-by: NJean Delvare <jdelvare@suse.de> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Baruch Siach 提交于
The per adapter bus_lock already projects from concurrent calls to the master_xfer callback. No need to add a driver internal lock. Also, rephrase a comment to drop mention of this lock. Reported-by: Rongrong Zou <zourongrong@gmail.com> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
The definition of i2c_msg says that "If this is the last message in a group, it is followed by a STOP. Otherwise it is followed by the next @i2c_msg transaction segment, beginning with a (repeated) START" So the expectation is that there is no 'STOP' bit inbetween individual i2c_msg segments with repeated 'START'. Adding the support for the same. This is required for some clients like touchscreen which keeps incrementing counts across individual transfers and 'STOP' bit inbetween resets the counter, which is not required. This patch adds the support in non-dma mode. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> [wsa: updated commit message] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
QUP from version 2.1.1 onwards, supports a new format of i2c command tags. Tag codes instructs the controller to perform a operation like read/write. This new tagging version supports bam dma and transfers of more than 256 bytes without 'stop' in between. Adding the support for the same. For each block a data_write/read tag and data_len tag is added to the output fifo. For the final block of data write_stop/read_stop tag is used. Signed-off-by: NAndy Gross <andy.gross@linaro.org> Signed-off-by: NSricharan R <sricharan@codeaurora.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
qup_wait_writeready waits only on a output fifo empty event. Change the same function to accept the event and data length to wait as parameters. This way the same function can be used for timeouts in other places as well. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
This driver allows an I2C bus to switch between multiple masters. This is not hot-switching because connected I2C slaves will be re-instantiated. It is meant to select the best I2C core at runtime once the task is known. Example: Prefer i2c-gpio over another I2C core because of HW errata affecting your use case. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 29 1月, 2016 1 次提交
-
-
由 Jean Delvare 提交于
The I2C bus names are supposed to be stable as they can be used by userspace to uniquely identify a specific I2C bus. So restore the original names for all legacy (pre-SB800) devices. For SB800 devices and later, improve the names. "SDA" refers to the serial data pin of each SMBus port, it's an implementation detail the user doesn't need to know. Use "port" instead, which is easier to understand. Signed-off-by: NJean Delvare <jdelvare@suse.de> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Tested-by: NChristian Fetzer <fetzer.ch@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 26 1月, 2016 3 次提交
-
-
由 Andy Shevchenko 提交于
This is effectively reapplies the commit b0898fda ("i2c: designware-pci: use IRQF_COND_SUSPEND flag") after the commit d80d1341 ("i2c: designware: Move common probe code into i2c_dw_probe()"). Original message as follows. The mentioned flag fixes a warning on Intel Edison board since one of the I2C controller shares IRQ line with watchdog timer. Fixes: d80d1341 (i2c: designware: Move common probe code into i2c_dw_probe()) Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jean Delvare 提交于
This closes a race window where I2C device drivers attempt to access I2C buses which aren't fully initialized yet. Signed-off-by: NJean Delvare <jdelvare@suse.de> Tested-by: NChristian Fetzer <fetzer.ch@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jean Delvare 提交于
We need a single mutex for all 4 shared SMBus ports on the SB800. A per-port mutex doesn't protect us from concurrent access. In theory the mutex should be per PCI device, however in practice we know that there's only ever a single instance of the device in a given system so we can use a global. Also take the mutex during initialization, as first port may be already in use when second port is initialized. Signed-off-by: NJean Delvare <jdelvare@suse.de> Tested-by: NChristian Fetzer <fetzer.ch@gmail.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> [wsa: made mutex static] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 10 1月, 2016 5 次提交
-
-
由 Gao Pan 提交于
In i2c_imx_dma_xfer(), when dmaengine_submit() returns error, the context goto label err_submit and then return. However, the memory allocated for txdesc has not been freed yet, which leads to resource leak. Signed-off-by: NGao Pan <b54642@freescale.com> Signed-off-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Suravee Suthikulpanit 提交于
The current driver uses input clock source frequency to calculate values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not currently have a good way to provide the frequency information. Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used to directly provide these values. So, the clock information should no longer be required during probing. However, since clk can be invalid, additional checks must be done where we are making use of it. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: NLoc Ho <lho@apm.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
RuntimePM of the adapter device is now taken care of by the core. So, we can remove these calls. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The adapter device is a logical device. Because of that, it already uses pm_runtime_no_callbacks() in the core. To ensure proper propagation from the children (i2c devices) to the parent of the adapter (the HW device), make sure RuntimePM is enabled in any case. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Baruch Siach 提交于
Set the i2c_adapter retries field to a sensible value. This allows the i2c core to retry master_xfer() when it returns -EAGAIN. Currently the i2c-designware driver returns -EAGAIN only on Tx arbitration failure (DW_IC_TX_ARB_LOST). Reported-by: Rolland Chau <zourongrong@gmail.com> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 07 1月, 2016 1 次提交
-
-
由 Loc Ho 提交于
Enable APM X-Gene ACPI I2C device support by adding the corresponding ACPI ID. The platform ACPI APD corresponding change is required to provide the proper clock frequency input. Signed-off-by: NLoc Ho <lho@apm.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 05 1月, 2016 3 次提交
-
-
由 Stephen Rothwell 提交于
Fixes: e1dba01c ("i2c: add generic routine to parse DT for timing information") Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Suravee Suthikulpanit 提交于
Add device HID AMDI0510 to match the I2C controlers on AMD Seattle platform Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fabio Estevam 提交于
These multi-lines comments do not follow the standard kernel coding style. In fact, they are not useful comments, so get rid of them. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 1月, 2016 8 次提交
-
-
由 Geliang Tang 提交于
Use to_platform_device() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Geliang Tang 提交于
Use to_pci_dev() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Kamal Dasu 提交于
Broadcoms DSL, CM (cable modem)and STB I2C core implementation have 8 data in/out registers that can transfer 8 bytes or 32 bytes max. Cable and DSL "Peripheral" i2c cores use single byte per data register and the STB can use 4 byte per data register transfer. Adding support to take care of this difference. Accordingly added the compatible string for SoCs using the "Peripheral" I2C block. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Liguo Zhang 提交于
For mt8173 platform with auto restart support, when doing i2c multi transfer in high speed, we should ignore the first restart irq after the master code, otherwise the first transfer will be discarded. Signed-off-by: NLiguo Zhang <liguo.zhang@mediatek.com> Reviewed-by: NEddie Huang <eddie.huang@mediatek.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Gao Pan 提交于
Replace of_get_named_gpio_flags with of_get_named_gpio because the latter has less parameters, which improves code readability. Signed-off-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NGao Pan <b54642@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fabio Estevam 提交于
When DMA cannot be used, it is better to state that the I2C controller will operate in PIO mode. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Gao Pan 提交于
In our former i2c driver, i2c clk is enabled and disabled in xfer function, which contributes to power saving. However, the clk enable process brings a busy wait delay until the core is stable. As a result, the performance is sacrificed. To weigh the power consumption and i2c bus performance, runtime pm is the good solution for it. The clk is enabled when a i2c transfer starts, and disabled after a specifically defined delay. If CONFIG_PM is disabled the net result of this patch is that the clock is never disabled. Without the patch the test case (many eeprom reads) executes with approx: real 1m7.735s user 0m0.488s sys 0m20.040s With the patch the same test case (many eeprom reads) executes with approx: real 0m54.241s user 0m0.440s sys 0m5.920s Signed-off-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NGao Pan <b54642@freescale.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> [wsa: sorted includes] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Gao Pan 提交于
During driver probe, i2c_imx_init_recovery_info() must come before i2c_add_numbered_adapter(), because the get/set_scl() functions are assigned in i2c_register_adapter() under the conditon that bus recover_info are initialized. Otherwise, get/set_scl() function pointers never get assigned. In such case, when i2c_generic_gpio_recovery() is used for bus recovery, there will be kernel crash because bri->set_scl is NULL. The solution to this bug is moving i2c_imx_init_recovery_info() before i2c_register_adapter(). Signed-off-by: NGao Pan <b54642@freescale.com> Signed-off-by: NFugang Duan <B38611@freescale.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-