- 27 8月, 2015 2 次提交
-
-
由 Dmitry Torokhov 提交于
Instead of having each i2c driver individually parse device tree data in case it or platform supports separate wakeup interrupt, and handle enabling and disabling wakeup interrupts in their power management routines, let's have i2c core do that for us. Platforms wishing to specify separate wakeup interrupt for the device should use named interrupt syntax in their DTSes: interrupt-parent = <&intc1>; interrupts = <5 0>, <6 0>; interrupt-names = "irq", "wakeup"; This patch is inspired by work done by Vignesh R <vigneshr@ti.com> for pixcir_i2c_ts driver. Note that the original code tried to preserve any existing wakeup settings from userspace but was not quite right in that regard: it would preserve wakeup flag set by userspace upon driver rebinding; but it would re-arm the wakeup flag if it was disabled by userspace. We think that resetting the flag upon re-binding the driver is proper behavior as the driver is responsible for setting up and handling wakeups. Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: NVignesh R <vigneshr@ti.com> [wsa: updated the commit message] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dmitry Torokhov 提交于
Similarly to of_get_irq(), let's export of_irq_get_byname(), so if a bus core can be compiled as a module (such as I2C) it can have access to the symbol. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 8月, 2015 16 次提交
-
-
由 Dan Carpenter 提交于
The dma_mapping_error() function returns true if there is an error, it doesn't return an error code. We should return -ENOMEM. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Javier Martinez Canillas 提交于
The ChromeOS EC tunnel I2C bus driver depend on CROS_EC_PROTO but MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends on is bad practice as it may lead to circular Kconfig dependencies. Since the platform device that is matched with the I2C bus driver is registered by the ChromeOS EC mfd driver, I2C_CROS_EC_TUNNEL really depends on MFD_CROS_EC. And because this config option selects CROS_EC_PROTO, that dependency is met as well. So make the driver to depend on MFD_CROS_EC instead of CROS_EC_PROTO. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Irina Tirdea 提交于
For i2c busses that support only SMBUS extensions, the eeprom at24 driver reads data from the device using the SMBus block, word or byte read protocols depending on availability. Replace the block read emulation from the driver with the i2c_smbus_read_i2c_block_data_or_emulated call from i2c core. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Irina Tirdea 提交于
There are devices that need to handle block transactions regardless of the capabilities exported by the adapter. For performance reasons, they need to use i2c read blocks if available, otherwise emulate the block transaction with word or byte transactions. Add support for a helper function that would read a data block using the best transfer available: I2C_FUNC_SMBUS_READ_I2C_BLOCK, I2C_FUNC_SMBUS_READ_WORD_DATA or I2C_FUNC_SMBUS_READ_BYTE_DATA. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Joachim Eastwood 提交于
Add support for the I2C controller found on several NXP devices including LPC2xxx, LPC178x/7x and LPC18xx/43xx. The controller is implemented as a state machine and the driver act upon the state changes when the bus is accessed. The I2C controller supports master/slave operation, bus arbitration, programmable clock rate, and speeds up to 1 Mbit/s. Signed-off-by: NJoachim Eastwood <manabian@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 York Sun 提交于
Based on i2c-mux-gpio driver, similarly the register-based mux switch from one bus to another by setting a single register. The register can be on PCIe bus, local bus, or any memory-mapped address. The endianness of such register can be specified in device tree if used, or in platform data. Signed-off-by: NYork Sun <yorksun@freescale.com> Acked-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Start a new file which describes the generic bindings used for I2C with device tree. So we have a central place to look for them, increase visibility of them, and hopefully reduce the amount of custom properties introduced. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NVaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Address collisions will be rare, but we should let the user know that slaves have their own address space nonetheless. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We now have seperate address spaces for 10 bit and we-are-slave clients. Update the sysfs device instantiation method to support these types by accepting the address offsets that are assigned to the extra address spaces. Update the documentation, too. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
It is not enough to compare the plain address value, we also need to check the flags enabling a different address space. E.g. it is valid to have address 0x50 as a 7-bit address and 0x050 as 10-bit address on the same bus. Same for addresses when we are the slave. Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Check for slave and 10-bit flags when probing and mark the client when found. Improve the address validity check, too Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We want to use this function with struct boardinfo soon, so let's just pass the parameters really needed. We also extend the type of addr, so more types can be input. Remove a superfluous dangling comment while here. Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The current naming is based on the arguments of the functions and not on what they do. Even I as the maintainer find this confusing, so let's rename them to something more descriptive. Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We want a separate address range for being an I2C slave. Add an offset of 0x1000, so it can be combined with ten bit addresses as well. Add a separate function to create the address value, we will need it later in other places. Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
And update indentation with one more tab, sigh... Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Tested-by: NAndrey Danin <danindrey@mail.ru> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 11 8月, 2015 2 次提交
-
-
由 Eddie Huang 提交于
When occur i2c ack error, i2c controller generate two interrupts, first is the ack error interrupt, then the complete interrupt. i2c interrupt handler should keep the two interrupt value, and only call complete() for the complete interrupt. Signed-off-by: NLiguo Zhang <liguo.zhang@mediatek.com> Signed-off-by: NEddie Huang <eddie.huang@mediatek.com> Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Eddie Huang 提交于
Reset DMA in hardware init function to avoid unknown hardware state before do any I2C operation. Signed-off-by: NLiguo Zhang <liguo.zhang@mediatek.com> Signed-off-by: NEddie Huang <eddie.huang@mediatek.com> Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 10 8月, 2015 20 次提交
-
-
由 Colin Ian King 提交于
Minor clean up of indenting, no functional change Signed-off-by: NColin Ian King <colin.king@canonical.com> [wsa: squashed two lines into one] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
The owner of the adapter is missing, while this driver is tristate. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The I2C dir is not for I2C client devices! Move it to the proper folder. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Wolfram Sang 提交于
The I2C dir is not for I2C client devices! Move it to the proper folder. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Wolfram Sang 提交于
The I2C dir is not for I2C client devices! Move it to the proper folder. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Wolfram Sang 提交于
The I2C dir is not for I2C client devices! Move it to the proper folder. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NPavel Machek <pavel@denx.de>
-
由 Javier Martinez Canillas 提交于
The I2C core always reports the MODALIAS uevent as "i2c:<client name>" regardless if the driver later is match using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jarkko Nikula 提交于
Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging. While at it remove extra space from "enabled= 0x" and use "%#x" for printing "0x" prefixed hexadecimal values. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> [wsa: made it a oneliner] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Vladimir Zapolskiy 提交于
This change is needed to properly lock I2C parent bus driver. Prior to this change i2c_put_adapter() is misused, which may lead to an overflow over zero of I2C bus driver user counter. Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Vladimir Zapolskiy 提交于
of_find_i2c_adapter_by_node() call requires quite often missing put_device(), and i2c_put_adapter() releases a device locked by i2c_get_adapter() only. In general module_put(adapter->owner) and put_device(dev) are not interchangeable. This is a common error reproduction scenario as a result of the misusage described above (for clearness this is run on iMX6 platform with HDMI and I2C bus drivers compiled as kernel modules): root@mx6q:~# lsmod | grep i2c i2c_imx 10213 0 root@mx6q:~# lsmod | grep dw_hdmi_imx dw_hdmi_imx 3631 0 dw_hdmi 11846 1 dw_hdmi_imx imxdrm 8674 3 dw_hdmi_imx,imx_ipuv3_crtc,imx_ldb drm_kms_helper 113765 5 dw_hdmi,imxdrm,imx_ipuv3_crtc,imx_ldb root@mx6q:~# rmmod dw_hdmi_imx root@mx6q:~# lsmod | grep i2c i2c_imx 10213 -1 ^^^^^ root@mx6q:~# rmmod i2c_imx rmmod: ERROR: Module i2c_imx is in use To fix existing users of these interfaces and to avoid any further confusion and misusage in future, add one more interface of_get_i2c_adapter_by_node(), it is similar to i2c_get_adapter() in sense that an I2C bus device driver found and locked by user can be correctly unlocked by i2c_put_adapter(). Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Vladimir Zapolskiy 提交于
In addition to module_get()/module_put() add get_device()/put_device() calls into i2c_get_adapter()/i2c_put_adapter() exported interfaces. This is done to lock I2C bus device, if it is in use by a client. Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Krzysztof Kozlowski 提交于
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Krzysztof Kozlowski 提交于
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
The mentioned flag fixes a warning on Intel Edison board since one of the I2C controller shares IRQ line with watchdog timer. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Denis Carikli 提交于
This adds devicetree documentation for the bindings of the ads7828 driver. Signed-off-by: NDenis Carikli <denis@eukrea.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ondrej Zary 提交于
Add support for VCT-jig parallel port I2C adapter to i2c-parport. The adapter schematic can be found here (in the RAR file): http://remont-aud.net/shop/22/desc/vct-jig-komplekt-dlja-samostojatelnoj-sborkiSigned-off-by: NOndrej Zary <linux@rainbow-software.org> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Anurag Kumar Vulisha 提交于
Cadence 1.0 version has bugs which have been fixed in the cadence 1.4 version. This patch removes the quirks present in the driver for cadence 1.4 version. Signed-off-by: NAnurag Kumar Vulisha <anuragku@xilinx.com> [wsa: fixed indentation issues in r1p10_i2c_def] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Laxman Dewangan 提交于
Tegra I2C controller required to configure the clock divisor register inside controller to different value based on the clock speed. The recommended clock divisor for the I2C controller for standard/fast mode is 0x19 and for fast-mode plus is 0x10. Add support to configure clock divisor register of I2C controller based on bus clock rate. This clock divisor is supported form T114 onwards. Signed-off-by: NChaitanya Bandi <bandik@nvidia.com> Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Laxman Dewangan 提交于
Once the new configuration is set on the conifg register of I2C controller, it is require to update the CONFIG_LOAD register to transfer the new SW configuration to actual HW internal registers that would be used in the actual logic. It is like, SW is programming only shadow registers through regular configuration and when these load_config bit fields are set to 1, it causes the regular/shadows registers configuration transferred to the HW internal active registers. So SW has to set these bit fields at the end of all regular registers configuration. And these config_load bits are HW auto-clear bits. HW clears these bit fields once the register configuration is moved to HW internal active registers. So SW has to wait until these bits are auto-cleared before going for any further programming This mechanism is supported on T124 and after this SoCs. Signed-off-by: NChaitanya Bandi <bandik@nvidia.com> Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Patch "i2c: omap: abolish variable name confusion" triggered a coccinelle warning which we fix here: drivers/i2c/busses/i2c-omap.c:1333:5-24: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 1334 Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-