- 25 10月, 2016 9 次提交
-
-
由 Jean Delvare 提交于
Starting with the 8-Series/C220 PCH (Lynx Point), the SMBus controller includes a SPD EEPROM protection mechanism. Once the SPD Write Disable bit is set, only reads are allowed to slave addresses 0x50-0x57. However the legacy implementation of I2C Block Read since the ICH5 looks like a write, and is therefore blocked by the SPD protection mechanism. This causes the eeprom and at24 drivers to fail. So assume that I2C Block Read is implemented as an actual read on these chipsets. I tested it on my Q87 chipset and it seems to work just fine. Signed-off-by: NJean Delvare <jdelvare@suse.de> Tested-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> [wsa: rebased to v4.9-rc2] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Hoan Tran 提交于
SMBus block command uses the first byte of buffer for the data length. The dma_buffer should be increased by 1 to avoid the overrun issue. Reported-by: NPhil Endecott <phil_gjouf_endecott@chezphil.org> Signed-off-by: NHoan Tran <hotran@apm.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Acked-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Greg Ungerer 提交于
The i2c controller used by Freescales iMX processors is the same hardware module used on Freescales ColdFire family of processors. We can use the existing i2c-imx driver on ColdFire family members. Modify the configuration to allow it to be selected when compiling for ColdFire targets. Signed-off-by: NGreg Ungerer <gerg@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 David Wu 提交于
We found a bug that i2c transfer sometimes failed on 3066a board with stabel-4.8, the con register would be updated by uninitialized tuning value, it made the i2c transfer failed. So give the tuning value to be zero during rk3x_i2c_v0_calc_timings. Signed-off-by: NDavid Wu <david.wu@rock-chips.com> Tested-by: NAndy Yan <andy.yan@rock-chips.com> Reviewed-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Ruqiang Ju 提交于
This driver should be buildable with ARCH_HISI, because some of other HiSilicon SoCs also use it. Signed-off-by: NRuqiang Ju <juruqiang@huawei.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 29 9月, 2016 1 次提交
-
-
由 Mika Westerberg 提交于
ACPI WDAT table is the preferred way to use hardware watchdog over the native iTCO_wdt. Windows only uses this table for its hardware watchdog implementation so we should be relatively safe to trust it has been validated by OEMs Prevent iTCO watchdog creation if we detect that there is ACPI WDAT table. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 24 9月, 2016 4 次提交
-
-
由 Alexey Khoroshilov 提交于
axxia_i2c_probe() does not disable clock in case of failure in i2c_add_adapter(). Also it ignores returned value from clk_prepare_enable(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jan Glauber 提交于
Do not infinitely retry register readq and writeq operations in order to not lock up the CPU in case the TWSI gets stuck. Return -ETIMEDOUT in case of a failed data read. For all other cases just return so subsequent operations will fail. Signed-off-by: NJan Glauber <jglauber@cavium.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
Currently, the status register FI2C_SR is checked immediately after a STOP condition is issued in case of the deferred STOP condition. It takes typically 5-10 usec until the corresponding bits in the register are set, so the error check for "stop condition was not completed" is very likely to be false positive. Add wait code to relax the status register check. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
Intel Kaby Lake PCH-H has the same legacy SMBus host controller than Intel Sunrisepoint PCH. It also has same iTCO watchdog on the bus. Add Kaby Lake PCH-H PCI ID to the list of supported devices. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 23 9月, 2016 3 次提交
-
-
由 Sudeep Holla 提交于
If the i2c device is already runtime suspended, if qup_i2c_suspend is executed during suspend-to-idle or suspend-to-ram it will result in the following splat: WARNING: CPU: 3 PID: 1593 at drivers/clk/clk.c:476 clk_core_unprepare+0x80/0x90 Modules linked in: CPU: 3 PID: 1593 Comm: bash Tainted: G W 4.8.0-rc3 #14 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) PC is at clk_core_unprepare+0x80/0x90 LR is at clk_unprepare+0x28/0x40 pc : [<ffff0000086eecf0>] lr : [<ffff0000086f0c58>] pstate: 60000145 Call trace: clk_core_unprepare+0x80/0x90 qup_i2c_disable_clocks+0x2c/0x68 qup_i2c_suspend+0x10/0x20 platform_pm_suspend+0x24/0x68 ... This patch fixes the issue by executing qup_i2c_pm_suspend_runtime conditionally in qup_i2c_suspend. Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 David Wu 提交于
This patch fixs the following warning: drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_v1_calc_timings': drivers/i2c/busses/i2c-rk3x.c:745:41: warning: variable 'min_total_ns' set but not used [-Wunused-but-set-variable] Reported-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NDavid Wu <david.wu@rock-chips.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 David Wu 提交于
This patch fixes the following sparse warning: drivers/i2c/busses/i2c-rk3x.c:888:17: warning: cast truncates bits from constant value (ffffffffff00 becomes ffffff00) Reported-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NDavid Wu <david.wu@rock-chips.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 22 9月, 2016 4 次提交
-
-
由 Jan Glauber 提交于
In case the high-level controller (HLC) is used the status code is reported at a different location. Check that location after HLC write operations if the ready bit is not set and return an appropriate error code instead of always returning -EAGAIN. Signed-off-by: NJan Glauber <jglauber@cavium.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dmitry Bazhenov 提交于
Due to a bug in the ThunderX I2C hardware sending STOP during a recovery attempt could lock up the hardware. To work around this problem do not send STOP at the beginning of the recovery but use the override registers to bring the TWSI including the high-level controller out of the bad state. Signed-off-by: NDmitry Bazhenov <dmitry.bazhenov@auriga.com> Signed-off-by: NJan Glauber <jglauber@cavium.com> [Changed commit message] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dmitry Bazhenov 提交于
The set SCL recovery function unconditionally pulls the SCL line low. Only pull SCL line low according to val parameter. Signed-off-by: NDmitry Bazhenov <dmitry.bazhenov@auriga.com> Signed-off-by: NJan Glauber <jglauber@cavium.com> [Changed commit message] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Yadi.hu 提交于
the eg20t driver call request_irq() function before the pch_base_address, base address of i2c controller's register, is assigned an effective value. there is one possible scenario that an interrupt which isn't inside eg20t arrives immediately after request_irq() is executed when i2c controller shares an interrupt number with others. since the interrupt handler pch_i2c_handler() has already active as shared action, it will be called and read its own register to determine if this interrupt is from itself. At that moment, since base address of i2c registers is not remapped in kernel space yet,so the INT handler will access an illegal address and then a error occurs. Signed-off-by: NYadi.hu <yadi.hu@windriver.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- 17 9月, 2016 1 次提交
-
-
由 Ulrich Hecht 提交于
Same as r8a7795. Signed-off-by: NUlrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 16 9月, 2016 2 次提交
-
-
由 Yang Li 提交于
Since commit 1c4b6c3b ("i2c: imx: implement bus recovery") the driver starts to use gpio/pinctrl to support optional bus recovery feature. But pinctrl is not always usable. There are platforms such as ls1021a and ls1043a that don't support pinctrl, and it could just be broken due to old/broken device tree. The patch makes it really optional that the probe function won't bailout on pinctrl problems instead it just disables bus recovery and prints out notification when there is problem with pinctrl. Since pinctrl is only used by bus recovery in this driver, move pinctrl initialization into bus recovery init function to prevent confusion. Signed-off-by: NLi Yang <leoyang.li@nxp.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Neil Armstrong 提交于
Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 09 9月, 2016 13 次提交
-
-
由 Doug Anderson 提交于
Depending on a number of factors including: - Which exact Rockchip SoC we're working with - How deep we suspend - Which i2c port we're on We might lose the state of the i2c registers at suspend time. Specifically we've found that on rk3399 the i2c ports that are not in the PMU power domain lose their state with the current suspend depth configured by ARM Tursted Firmware. Note that there are very few actual i2c registers that aren't configured per transfer anyway so all we actually need to re-configure are the clock config registers. We'll just add a call to rk3x_i2c_adapt_div() at resume time and be done with it. NOTE: On rk3399 on ports whose power was lost, I put printouts in at resume time. I saw things like: before: con=0x00010300, div=0x00060006 after: con=0x00010200, div=0x00180025 Signed-off-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NDavid Wu <david.wu@rock-chips.com> Tested-by: NDavid Wu <david.wu@rock-chips.com> [wsa: removed duplicate const] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
Currently, the adapter is set to the master mode at the first use. Since then, it is kept in the slave mode, so unexpected glitch signals on the I2C lines may cause the adapter into insane state. Setting it to the master mode along with initialization solves the problem. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reported-by: NAkio Noda <noda.akio@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
If clk_prepare_enable() fails, clk_disable_unprepare() is called in the failure path, where the enable_count is still zero, so it hits WARN_ON(core->enable_count == 0) in the clk_core_disable(). To fix this, make the clock setting more linear in the probe function so that it can exploit "goto err" in case of error. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
If clk_prepare_enable() fails, clk_disable_unprepare() is called in the failure path, where the enable_count is still zero, so it hits WARN_ON(core->enable_count == 0) in the clk_core_disable(). To fix this, make the clock setting more linear in the probe function so that it can exploit "goto err" in case of error. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jon Hunter 提交于
Fix the following warnings reported by coccinelle for the Tegra I2C driver. drivers/i2c/busses/i2c-tegra.c:513:2-23: WARNING: Assignment of bool to 0/1 drivers/i2c/busses/i2c-tegra.c:539:3-24: WARNING: Assignment of bool to 0/1 Reported-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shardar Shariff Md 提交于
To summarize the issue observed in error cases: SW Flow: For i2c message transfer, packet header and data payload is posted and then required error/packet completion interrupts are enabled later. HW flow: HW process the packet just after packet header is posted, if ARB lost/NACK error occurs (SW will not handle immediately when error happens as error interrupts are not enabled at this point). HW assumes error is acknowledged and clears current data in FIFO, But SW here posts the remaining data payload which still stays in FIFO as stale data (data without packet header). Now once the interrupts are enabled, SW handles ARB lost/NACK error by clearing the ARB lost/NACK interrupt. Now HW assumes that SW attended the error and will parse/process stale data (data without packet header) present in FIFO which causes invalid NACK errors. Fix: Enable the error interrupts before posting the packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shardar Shariff Md 提交于
Use readl_poll_timeout_atomic() function as *wait_for_config_load() function can be called from interrupt context. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shardar Shariff Md 提交于
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shardar Shariff Md 提交于
During i2c controller initialization, when fifo flush fails return error instead of returning the error during exit. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shardar Shariff Md 提交于
After CONFIG_LOAD register is programmed instead of explicitly waiting for timeout, use readl_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Geert Uytterhoeven 提交于
"i2c-sh_mobile" is used on sh7343, sh7366, sh7722, sh7723, and sh7724 only. As all of the above select ARCH_SHMOBILE, restrict its driver dependencies from SUPERH to ARCH_SHMOBILE. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Zhuo-hao Lee 提交于
There are several ways to set the SDA hold time for i2c controller, including: Device Tree, built-in device properties and ACPI. However, if the SDA hold time is not specified by above method, we should read the value, where it is preset by firmware, and save it to sda_hold_time. This is needed because when i2c controller enters runtime suspend, the DW_IC_SDA_HOLD value will be reset to chipset default value. And during runtime resume, i2c_dw_init will be called to reconfigure i2c controller. If sda_hold_time is zero, the chipset default hold time will be used, that will be too short for some platforms. Therefore, to have a better tolerance, the DW_IC_SDA_HOLD value should be kept by sda_hold_time. Signed-off-by: NZhuo-hao Lee <zhuo-hao.lee@intel.com> Reviewed-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>
-
- 31 8月, 2016 3 次提交
-
-
由 Jon Hunter 提交于
On Tegra124/132 the pins for I2C6 are shared with the Display Port AUX (DPAUX) channel and on Tegra210 the pins for I2C4 and I2C6 are shared with DPAUX1 and DPAUX0, respectively. The multiplexing of the pins is handled by a register in the DPAUX and so the Tegra DPAUX driver has been updated to register a pinctrl device for managing these pins. The pins for these particular I2C devices are bound to the I2C device prior to probing. However, these I2C devices are in a different power partition to the DPAUX devices that own the pins. Hence, it is desirable to place the pins in the 'idle' state and allow the DPAUX power partition to switch off, when these I2C devices is not in use. Therefore, add calls to place the I2C pins in the 'default' and 'idle' states when the I2C device is runtime resumed and suspended, respectively. Please note that the pinctrl functions that set the state of the pins check to see if the devices has pins associated and will return zero if they do not. Therefore, it is safe to call these pinctrl functions even for I2C devices that do not have any pins associated. Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jon Hunter 提交于
Update the Tegra I2C driver to use runtime PM and move the code in the tegra_i2c_clock_enable/disable() functions to the PM runtime resume and suspend callbacks, respectively. Note that given that CONFIG_PM is not mandatory for Tegra, if CONFIG_PM is not enabled and so runtime PM is not enabled, ensure that the I2C clocks are turned on during probe and kept on by calling the resume callback directly. In the function tegra_i2c_init(), the variable 'err' does not need to be initialised to zero in tegra_i2c_init() because it is initialised when pm_runtime_get_sync() is called. Furthermore, to ensure we only return 0 from tegra_i2c_init(), it is necessary to re-initialise 'err' to 0 after a successful call to pm_runtime_get_sync() because it can return a positive value on success. However, alternatively re-initialise 'err' by using the return value of the function tegra_i2c_flush_fifos() because it can only be 0 or -ETIMEDOUT. Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jon Hunter 提交于
The I2C adapter is unlocked regardless of whether the tegra_i2c_init() called during the resume is successful or not. However, if the tegra_i2c_init() is not successful, then ->is_suspended is not set to false. Simplify the resume code by only setting ->is_suspended to false if tegra_i2c_init() is successful and return the error code from tegra_i2c_init(). Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-