- 13 12月, 2013 2 次提交
-
-
由 Fabio Estevam 提交于
clk_prepare_enable() 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> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Elie De Brauwer 提交于
If a muxed i2c bus gets created the default retry count and timeout of the muxed bus is zero. Hence it it possible that you end up with a situation where the parent controller sets a default retry count and timeout which gets applied and used while the muxed bus (using the same controller) has a default retry count of zero and a default timeout of 1s (set in i2c_add_adapter()). This can be solved by initializing the retry count and timeout of the muxed bus with the values used by the the parent at creation time. Signed-off-by: NElie De Brauwer <eliedebrauwer@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 28 11月, 2013 2 次提交
-
-
由 Florian Meier 提交于
In order to find I2C devices in the device tree, the platform nodes have to be known by the I2C core. This requires setting the dev.of_node parameter of the adapter. Signed-off-by: NFlorian Meier <florian.meier@koalo.de> Tested-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Victor Kamensky 提交于
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: NVictor Kamensky <victor.kamensky@linaro.org> Signed-off-by: NTaras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 26 11月, 2013 4 次提交
-
-
由 Tim Kryger 提交于
Correct a typo that prevented the driver from being built as a module. Reported-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NTim Kryger <tim.kryger@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Martin Vogt 提交于
The previous diolan adapter uses other out/in endpoints than the current DLN-2-U2C in compatibility mode. They changed from 0x2/0x84 to 0x3/0x83. This patch gets the endpoints from the usb interface, instead of hardcode them in the driver. This was tested on a current DLN-2-U2C board. Signed-off-by: NMartin Vogt <mvogt1@gmail.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wei Yongjun 提交于
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: NMarkus Mayer <markus.mayer@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Taras Kondratiuk 提交于
I2C IP block expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: NTaras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 19 11月, 2013 1 次提交
-
-
由 Wei Yongjun 提交于
Fix to return a negative error code from the bus speed parse error handling case instead of 0. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: NTim Kryger <tim.kryger@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 18 11月, 2013 1 次提交
-
-
由 Andreas Werner 提交于
Using the i2c-eg20t driver and call i2cdetect or probe on the bus, the driver will print a lot of error messages if there was no ACK received. i2cdetect normally print a table with all the available devices. If there is no device on the address, the table will be empty. Currently with the i2c-eg20t driver, the table is not visible because the error messages destroy the table. Error message: pch_i2c_getack return -71 This patch prevent the driver to print the messages to syslog. The pch_i2c_wait_for_check_xfer function is the only one who is calling pch_i2c_getack, so we can delete the function and add the read to pch_i2c_wait_for_check_xfer. If no ACK is received, the Message will be printed as a dbg message. Fixed print message to be a one liner so we can grep for the error message. Tested on Intel Atom E6xx and Eg20t Chipset. Signed-off-by: NAndreas Werner <wernerandy@gmx.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 16 11月, 2013 3 次提交
-
-
由 Tim Kryger 提交于
Introduce support for Broadcom Serial Controller (BSC) I2C bus found in the Kona family of Mobile SoCs. FIFO hardware is utilized but only standard mode (100kHz), fast mode (400kHz), fast mode plus (1MHz), and I2C high-speed (3.4 MHz) bus speeds are supported. Signed-off-by: NTim Kryger <tim.kryger@linaro.org> Reviewed-by: NMatt Porter <matt.porter@linaro.org> Reviewed-by: NMarkus Mayer <markus.mayer@linaro.org> [wsa: fixed Kconfig sorting, squashed broken out patches into one] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Tony Lindgren 提交于
As we claim to support device tree for mach-omap2, we should have the necessary flags in the driver to make it usable. Cc: linux-i2c@vger.kernel.org Acked-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Looks like we're missing two lines needed to make it work properly with device tree. Signed-off-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 11月, 2013 8 次提交
-
-
由 Wolfram Sang 提交于
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Jarkko Nikula 提交于
Current I2C adapter id - client address "x-00yy" based device naming scheme is not always stable enough to be used in name based matching, for instance within ALSA SoC subsystem. This is problematic in PC kind of platforms where I2C adapter numbers can change due variable amount of bus controllers, probe order, add-on cards or just because of BIOS settings. This patch addresses the problem by using the ACPI device name with "i2c-" prefix for ACPI enumerated I2C slaves. For them device name "x-00yz" becomes "i2c-INTABCD:ij" after this patch. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Rafael J. Wysocki 提交于
Modify struct acpi_dev_node to contain a pointer to struct acpi_device associated with the given device object (that is, its ACPI companion device) instead of an ACPI handle corresponding to it. Introduce two new macros for manipulating that pointer in a CONFIG_ACPI-safe way, ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the ACPI_HANDLE() macro to take the above changes into account. Drop the ACPI_HANDLE_SET() macro entirely and rework its users to use ACPI_COMPANION_SET() instead. For some of them who used to pass the result of acpi_get_child() directly to ACPI_HANDLE_SET() introduce a helper routine acpi_preset_companion() doing an equivalent thing. The main motivation for doing this is that there are things represented by struct acpi_device objects that don't have valid ACPI handles (so called fixed ACPI hardware features, such as power and sleep buttons) and we would like to create platform device objects for them and "glue" them to their ACPI companions in the usual way (which currently is impossible due to the lack of valid ACPI handles). However, there are more reasons why it may be useful. First, struct acpi_device pointers allow of much better type checking than void pointers which are ACPI handles, so it should be more difficult to write buggy code using modified struct acpi_dev_node and the new macros. Second, the change should help to reduce (over time) the number of places in which the result of ACPI_HANDLE() is passed to acpi_bus_get_device() in order to obtain a pointer to the struct acpi_device associated with the given "physical" device, because now that pointer is returned by ACPI_COMPANION() directly. Finally, the change should make it easier to write generic code that will build both for CONFIG_ACPI set and unset without adding explicit compiler directives to it. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
-
由 Wei Yongjun 提交于
Add the missing clk_disable_unprepare() before return from wmt_i2c_reset_hardware() in the error handling case. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org # 3.11+
-
由 Mika Westerberg 提交于
Newer Intel PCHs with LPSS have the same Designware I2C controllers than Haswell but the ACPI IDs differ. Add these IDs to the driver list. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 James Ralston 提交于
This patch adds the SMBus Device IDs for the Intel Wildcat Point-LP PCH. Signed-off-by: NJames Ralston <james.d.ralston@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sachin Kamat 提交于
clk_disable_unprepare in remove causes an imbalance and hence gives the below crash on module remove. While at it also remove some duplicate code from probe. / $ rmmod i2c-exynos5 [ 6.996374] ------------[ cut here ]------------ [ 6.999523] WARNING: CPU: 2 PID: 1137 at drivers/clk/clk.c:842 clk_disable+0x18/0x24() [ 7.007403] Modules linked in: i2c_exynos5(-) [ 7.011747] CPU: 2 PID: 1137 Comm: rmmod Not tainted 3.12.0-next-20131105-00083-g16f4799-dirty #21 [ 7.020696] [<c0014e0c>] (unwind_backtrace+0x0/0xf4) from [<c0011784>] (show_stack+0x10/0x14) [ 7.029190] [<c0011784>] (show_stack+0x10/0x14) from [<c037acd4>] (dump_stack+0x7c/0xb0) [ 7.037255] [<c037acd4>] (dump_stack+0x7c/0xb0) from [<c001e0ac>] (warn_slowpath_common+0x6c/0x88) [ 7.046190] [<c001e0ac>] (warn_slowpath_common+0x6c/0x88) from [<c001e164>] (warn_slowpath_null+0x1c/0x24) [ 7.055818] [<c001e164>] (warn_slowpath_null+0x1c/0x24) from [<c02dcde4>] (clk_disable+0x18/0x24) [ 7.064670] [<c02dcde4>] (clk_disable+0x18/0x24) from [<bf0002d4>] (exynos5_i2c_remove+0x1c/0x34 [i2c_exynos5]) [ 7.074736] [<bf0002d4>] (exynos5_i2c_remove+0x1c/0x34 [i2c_exynos5]) from [<c02274a8>] (__device_release_driver+0x58/0xb0) [ 7.085836] [<c02274a8>] (__device_release_driver+0x58/0xb0) from [<c0227b88>] (driver_detach+0xac/0xb0) [ 7.095291] [<c0227b88>] (driver_detach+0xac/0xb0) from [<c02271c0>] (bus_remove_driver+0x4c/0xa0) [ 7.104227] [<c02271c0>] (bus_remove_driver+0x4c/0xa0) from [<c00725dc>] (SyS_delete_module+0x124/0x194) [ 7.113682] [<c00725dc>] (SyS_delete_module+0x124/0x194) from [<c000e2e0>] (ret_fast_syscall+0x0/0x30) [ 7.122957] ---[ end trace 23bb6e4e0bf52196 ]--- Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NNaveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Maxime COQUELIN 提交于
This patch adds support to SSC (Synchronous Serial Controller) I2C driver. This IP also supports SPI protocol, but this is not the aim of this driver. This IP is embedded in all ST SoCs for Set-top box platorms, and supports I2C Standard and Fast modes. Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 01 11月, 2013 3 次提交
-
-
由 Naveen Krishna Ch 提交于
Adds support for High Speed I2C driver found in Exynos5 and later SoCs from Samsung. Driver only supports Device Tree method. Signed-off-by: NNaveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: NTaekgyun Ko <taeggyun.ko@samsung.com> Reviewed-by: NSimon Glass <sjg@google.com> Signed-off-by: NYuvaraj Kumar C D <yuvaraj.cd@samsung.com> Signed-off-by: NAndrew Bresticker <abrestic@google.com> [wsa: rebased to v3.12-rc4 (no of_i2c.h anymore)] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Kuninori Morimoto 提交于
b720423a (i2c: rcar: add rcar-H2 support) added R-Car H2 support on i2c-rcar. The R-Car I2C type is based on SoC generation (Gen1 = E1/M1/H1, Gen2 = E2/M2/H2), but added naming was H1/H2 instead of Gen1/Gen2. Gen1/Gen2 is better naming on this driver. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dan Carpenter 提交于
"obj" can't be NULL here. We already know that "pkg->package.elements" gives us a valid pointer so the next pointer after that is also non-NULL. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 31 10月, 2013 4 次提交
-
-
由 Laurent Pinchart 提交于
Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Laurent Pinchart 提交于
Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ionut Nicu 提交于
The i2c-mux driver requires that the chan_id parameter passed to the i2c_add_mux_adapter() function is equal to the reg value for that adapter: for_each_child_of_node(mux_dev->of_node, child) { ret = of_property_read_u32(child, "reg", ®); if (ret) continue; if (chan_id == reg) { priv->adap.dev.of_node = child; break; } } The i2c-mux-gpio driver uses an internal logical index for chan_id when calling i2c_add_mux_adapter() instead of using the reg value. Because of this, there will problems in selecting the right adapter when the i2c-mux-gpio's index into mux->data.values doesn't match the reg value. An example of such a case: mux->data.values = { 1, 0 } For chan_id = 0, i2c-mux will bind the adapter to the of_node with reg = <0>, but when it will call the select() callback with chan_id set to 0, the i2c-mux-gpio will use it as an index into mux->data.values and it will actually select the bus with reg = <1>. Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com> Acked-by: NAlexander Sverdlin <alexander.sverdlin@nsn.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Ionut Nicu 提交于
Some gpio chips may have get/set operations that can sleep. gpio_set_value() only works for chips which do not sleep, for the others we will get a kernel warning. Using gpio_set_value_cansleep() will work for both chips that do sleep and those who don't. Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com> Acked-by: NPeter Korsgaard <peter.korsgaard@barco.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- 30 10月, 2013 1 次提交
-
-
由 Sachin Kamat 提交于
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 10月, 2013 1 次提交
-
-
由 Thierry Reding 提交于
Replace some instances of of_irq_map_one()/irq_create_of_mapping() and of_irq_to_resource() by the simpler equivalent irq_of_parse_and_map(). Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NRob Herring <rob.herring@calxeda.com> [grant.likely: resolved conflicts with core code renames] Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 11 10月, 2013 1 次提交
-
-
由 Lv Zheng 提交于
If the I2C client device is enumerated from ACPI namespace it might have ACPI methods that needs to be called in order to transition the device to different power states (such as _PSx). Implement this for I2C client devices by checking if the device has an ACPI handle and if that's the case, attach it to the ACPI power domain. In addition we make sure that the device is fully powered when its ->probe() function gets called. For non-ACPI devices this patch is a no-op. Signed-off-by: NLv Zheng <lv.zheng@intel.com> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 10 10月, 2013 9 次提交
-
-
由 Wolfram Sang 提交于
If it is not there yet, it might appear later. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
If it is not there yet, it might appear later. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ionut Nicu 提交于
If the i2c-parent bus driver is not loaded, returning -ENODEV will force people to unload and then reload the module again to get it working. Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com> Acked-by: NPeter Korsgaard <peter.korsgaard@barco.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ionut Nicu 提交于
of_get_named_gpio could return -E_PROBE_DEFER or another error code. This error should be passed further instead of being ignored. Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com> Acked-by: NPeter Korsgaard <peter.korsgaard@barco.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Taras Kondratiuk 提交于
Initially commit cb527ede "i2c-omap: Double clear of ARDY status in IRQ handler" added a workaround for undocumented errata ProDB0017052. But then commit 1d7afc95 "i2c: omap: ack IRQ in parts" refactored code and missed one of ARDY clearings. So current code violates errata. It causes often i2c bus timeouts on my Pandaboard. This patch adds a second clearing in place. Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NTaras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Jean Delvare 提交于
The code in acpi_i2c_register_devices() assumes that all i2c adapters have a parent. This is not necessarily the case, for example the i2c-stub driver instantiate a virtual i2c adapter without a parent. Check for this to avoid a NULL pointer deference. Signed-off-by: NJean Delvare <jdelvare@suse.de> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Subsystems like pinctrl and gpio rightfully make use of deferred probing at core level. Now, deferred drivers won't be retried if they don't have a .probe function specified in the driver struct. Fix this driver to have that, so the devices it supports won't get lost in a deferred probe. Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Subsystems like pinctrl and gpio rightfully make use of deferred probing at core level. Now, deferred drivers won't be retried if they don't have a .probe function specified in the driver struct. Fix this driver to have that, so the devices it supports won't get lost in a deferred probe. Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Subsystems like pinctrl and gpio rightfully make use of deferred probing at core level. Now, deferred drivers won't be retried if they don't have a .probe function specified in the driver struct. Fix this driver to have that, so the devices it supports won't get lost in a deferred probe. Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-