- 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 1 次提交
-
-
由 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>
-
- 13 1月, 2015 1 次提交
-
-
由 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>
-
- 19 11月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NYao Yuan <yao.yuan@freescale.com>
-
- 18 11月, 2014 2 次提交
-
-
由 Yao Yuan 提交于
Add dma support for i2c. This function depend on DMA driver. You can turn on it by write both the dmas and dma-name properties in dts node. DMA is optional, even DMA request unsuccessfully, i2c can also work well. Signed-off-by: NYuan Yao <yao.yuan@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Yao Yuan 提交于
If the inlcude headers aren't sorted alphabetically, then the logical choice is to append new ones, however that creates a lot of potential for conflicts or duplicates because every change will then add new includes in the same location. Signed-off-by: NYuan Yao <yao.yuan@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 10 11月, 2014 1 次提交
-
-
由 Fabio Estevam 提交于
According to Documentation/CodingStyle - Chapter 14: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed to a memory allocator is not." So do it as recommeded. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 08 11月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
We have a central copy of the GPL for that. Some addresses were already outdated. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 07 10月, 2014 1 次提交
-
-
由 Fabio Estevam 提交于
In the case of errors during probe, we should disable i2c_imx->clk. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 30 9月, 2014 1 次提交
-
-
由 Haibo Chen 提交于
According to the i.mx spec, for multimaster mode, if I2C is enabled when the bus is busy and asserts start, hardware inhibits the transmission, clears MSTA without signaling a stop, generate an interrupt, and set I2C_I2SR[IAL] to indicate a failed attempt to engage the bus, which means arbitration lost. In this case, we should first test I2C_I2SR[IAL], and clear this bit if it is set, and then I2C controller default to slave receive mode. This patch check the IAL bit every time before an I2c transmission. if IAL is set, clear it and make I2C controller to default mode. Signed-off-by: NHaibo Chen <haibo.chen@freescale.com> Acked-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 07 8月, 2014 1 次提交
-
-
由 Xiubo Li 提交于
Fixes the following by using %pR: drivers/i2c/busses/i2c-imx.c: In function i2c_imx_probe() drivers/i2c/busses/i2c-imx.c:689:2: warning: format 0x%x expects argument of type unsigned int, but argument 4 has type resource_size_t [-Wformat=] dev_dbg(&i2c_imx->adapter.dev, "device resources from 0x%x to 0x%x\n", ^ ... Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 6月, 2014 3 次提交
-
-
由 Jingoo Han 提交于
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. For example, k.alloc and v.alloc failures use dump_stack(). Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NJean Delvare <jdelvare@suse.de> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NFelipe Balbi <balbi@ti.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fugang Duan 提交于
Since IMX serial SOCs support low bus freq mode, some clocks freq may change to save power. I2C needs to check the clock source and update the divider. For example: i.MX6SL I2C clk is from IPG_PERCLK which is sourced from IPG_CLK. Under normal operation, IPG_CLK is 66MHz, ipg_perclk is at 22MHz. In low bus freq mode, IPG_CLK is at 12MHz and IPG_PERCLK is down to 4MHz. So the I2C driver must update the divider register for each transaction when the current IPG_PERCLK is not equal to the clock of previous transaction. Signed-off-by: NFugang Duan <B38611@freescale.com> [wsa: removed an outdated comment and simplified debug output] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fugang Duan 提交于
Test i2c device Maxim max44009, datasheet is located at: http://www.maximintegrated.com/datasheet/index.mvp/id/7175 The max44009 support repeat operation like: read -> repeat restart -> read/write The current i2c imx host controller driver don't support this operation that causes i2c bus hang due to "MTX" is cleared in .i2c_imx_read(). If "read" is the last message there have no problem, so the current driver supports all SMbus operation like: write -> repeat restart -> read/write IMX i2c controller for master receiver has some limitation: - If it is the last byte for one operation, it must generate STOP signal before read I2DR to prevent controller from generating another clock cycle. - If it is the last byte in the read, and then do repeat restart, it must set "MTX" before read I2DR to prevent controller from generating another extra clock cycle. The patch is to fix the issue. Signed-off-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 22 5月, 2014 1 次提交
-
-
由 Kaushal Butala 提交于
The smbus block read is not currently supported for imx i2c devices. This patchset adds the support to imx i2c bus so that blocks of data can be read using SMbus block reads.(using i2c_smbus_read_block_data() function from the i2c_core.c.). Tested with 3.10.9 kernel. Reviewed-by: NShawn Guo <shawn.guo@freescale.com> Signed-off-by: NKaushal Butala <kaushalkernelmailinglist@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 1月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
smatch rightfully says: drivers/i2c/busses/i2c-imx.c:610 i2c_imx_probe() info: why not propagate 'irq' from platform_get_irq() instead of (-2)? Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 12月, 2013 1 次提交
-
-
由 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>
-
- 10 10月, 2013 1 次提交
-
-
由 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>
-
- 23 8月, 2013 1 次提交
-
-
由 Wolfram Sang 提交于
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child nodes in the core instead of doing this manually in each driver. So, fix the drivers and documentation, too. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 20 8月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 8月, 2013 8 次提交
-
-
由 Jingchang Lu 提交于
Add Freescale Vybrid VF610 I2C controller support to imx I2C driver framework. Signed-off-by: NJason Jin <Jason.jin@freescale.com> Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
This add struct imx_i2c_hwdata to hold more quirks data which may vary between SoCs, thus the driver can operate on more differences to support more SoCs. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
This add bits operation macro that differ between SoCs. Interrupt flags clear operation in I2SR differ between SoCs: write zero to clear(w0c) INT flag on i.MX, but write one to clear(w1c) INT flag on Vybrid. I2C module enable operation in I2CR also differ between SoCs: set I2CR_IEN bit enable the module on i.MX, but clear I2CR_IEN bit enable the module on Vybrid. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
the I2C register offset may different between SoCs, to provid support for all these chips, split the register offset into a fixed base address and a variable shift value, then the full register offset will be calculated by reg_off = ( reg_base_addr << reg_shift) Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
wrap the readb(), writeb() into inline function calls. It would make the driver more clearer to support platform with different register offset. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
The id_entry field should be changed by platform driver core, driver should prevent changing it derectly. Use local variable to save and extract platform_device_id info of the dts devices instead. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
The module clk should be enabled before write to its register in probe(), and the clk can be disabled after. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingchang Lu 提交于
using struct representing the i2c clk{div, val} pair would make the i2c_clk_div array more clear. Signed-off-by: NJingchang Lu <b35083@freescale.com> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 26 6月, 2013 1 次提交
-
-
由 Arnaud Patard \(Rtp\) 提交于
Allow udev to autoload the module when booting with device-tree Signed-off-by: NArnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 6月, 2013 2 次提交
-
-
由 Wolfram Sang 提交于
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fabio Estevam 提交于
Since commit ab78029e (drivers/pinctrl: grab default handles from device core), we can rely on device core for handling pinctrl. So remove devm_pinctrl_get_select_default() from the driver. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 22 2月, 2013 1 次提交
-
-
由 Doug Anderson 提交于
There is simply no reason to be manually setting the private driver data to NULL in the remove/fail to probe cases. This is just extra cruft code that can be removed. A few notes: * Nothing relies on drvdata being set to NULL. * The __device_release_driver() function eventually calls dev_set_drvdata(dev, NULL) anyway, so there's no need to do it twice. * I verified that there were no cases where xxx_get_drvdata() was being called in these drivers and checking for / relying on the NULL return value. This could be cleaned up kernel-wide but for now just take the baby step and remove from the i2c subsystem. Reported-by: NWolfram Sang <wsa@the-dreams.de> Reported-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NDoug Anderson <dianders@chromium.org> Reviewed-by: NJean Delvare <khali@linux-fr.org> Acked-by: NPeter Korsgaard <jacmet@sunsite.dk> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NWolfram Sang <wolfram@the-dreams.de>
-
- 25 1月, 2013 1 次提交
-
-
由 Thierry Reding 提交于
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 10月, 2012 1 次提交
-
-
由 Shawn Guo 提交于
This is some amount of work left/forgot from device tree conversion. Instead of checking cpu_is_xxx to determine the controller type, the driver should use platform_device_id, which should match the device tree compatible string. The patch changes the driver to use platform_device_id rather than cpu_is_xxx to determine the controller type/version. It also updates the platform code and device tree source accordingly. As the result, mach/hardware.h inclusion gets removed from the driver. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NArnd Bergmann <arnd@arndb.de> Cc: Wolfram Sang <w.sang@pengutronix.de> Cc: linux-i2c@vger.kernel.org
-
- 14 9月, 2012 1 次提交
-
-
由 Arnd Bergmann 提交于
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the imx include directories Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NNicolas Pitre <nico@linaro.org> Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com> Acked-by: NSascha Hauer <kernel@pengutronix.de> Acked-by: NVinod Koul <vinod.koul@linux.intel.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Dan Williams <djbw@fb.com> Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org> Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Cox <alan@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Liam Girdwood <lrg@ti.com> Cc: Javier Martin <javier.martin@vista-silicon.com> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-
- 12 9月, 2012 2 次提交
-
-
由 Fabio Estevam 提交于
Use dev_dbg logging style as it is done in other parts of this driver. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Fabio Estevam 提交于
It is useful information in dmesg to have a message indicating that the i2c driver was succesfully registered, so promote it to dev_info. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
- 10 7月, 2012 1 次提交
-
-
由 Wolfram Sang 提交于
sparse found this assignment of u32 to an int. Fix it: drivers/i2c/busses/i2c-imx.c:540:56: warning: incorrect type in argument 3 (different signedness) and also fix the type in platform_data. All current users use values which fit into the old and new type, so it is a safe change. Signed-off-by: NWolfram Sang <wolfram@the-dreams.de> Reviewed-by: NRichard Zhao <richard.zhao@freescale.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
-
- 09 7月, 2012 1 次提交
-
-
由 Fabio Estevam 提交于
With the new i.mx clock framework the i2c clock is registered as: clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx-i2c.0") So we do not need to pass "i2c_clk" string and can use NULL instead. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> [wsa: rebased on top of the devm-conversion] Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-