[PATCH] i2c: mxs: Let i2c-mxs be built for MX23

2011-10-21 Thread Fabio Estevam
MX23 and MX28 share the same I2C block, so let i2c-mxs be built for MX23 too. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/Kconfig |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses

[PATCH v2] i2c: mxs: Let i2c-mxs be built for MX23

2011-10-21 Thread Fabio Estevam
MX23 and MX28 share the same I2C block, so let i2c-mxs be built for MX23 too. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v1: - Remove unneeded parenthesis drivers/i2c/busses/Kconfig |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v3 6/6] mfd: mc13xxx: Add i2c driver

2012-03-14 Thread Fabio Estevam
Hi Marc, On Wed, Mar 14, 2012 at 5:43 PM, Marc Reilly m...@cpdesign.com.au wrote: + +static const struct i2c_device_id mc13xxx_i2c_device_id[] = { +       { +               .name = mc13783, +               .driver_data = MC13XXX_ID_MC13783 mc13783 does not have i2c interface. -- To

[PATCH] i2c: i2c-mxs: Fix build warning

2012-04-05 Thread Fabio Estevam
Fix the following build warning: drivers/i2c/busses/i2c-mxs.c:207:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-mxs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

Re: [PATCH] i2c: i2c-mxs: Fix build warning

2012-04-05 Thread Fabio Estevam
On Thu, Apr 5, 2012 at 5:16 PM, Wolfram Sang w.s...@pengutronix.de wrote: On Thu, Apr 05, 2012 at 05:09:55PM -0300, Fabio Estevam wrote: Fix the following build warning: drivers/i2c/busses/i2c-mxs.c:207:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized] Signed

Re: [PATCH] i2c: mxs: disable QUEUE when sending is done

2012-04-27 Thread Fabio Estevam
); When setting the QUEUE_RUN, do we really want to clear all the other bits of QUEUECTRL_CLR register? I am wondering if we should only set QUEUE_RUN bit here. My mx28evk does not come with i2c eeprom. I hope I will solder one soon so I can test it. Thanks, Fabio Estevam -- To unsubscribe from

[PATCH] i2c: i2c-smbus: Use module_i2c_driver()

2012-07-02 Thread Fabio Estevam
Using module_i2c_driver() makes the code smaller and cleaner. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/i2c-smbus.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 9836d08

[PATCH] i2c: i2c-imx: Adapt the clock name to the new clock framework

2012-07-06 Thread 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: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-imx.c |2 +- 1

[PATCH 1/2] i2c: imx: Use dev_info to indicate that i2c driver was succesfully registered

2012-08-01 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com 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: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-imx.c |2 +- 1 files

[PATCH 2/2] i2c: imx: Use dev_dbg logging style

2012-08-01 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Use dev_dbg logging style as it is done in other parts of this driver. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-imx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH] i2c: mxs: Indicate that i2c driver was succesfully registered

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com It is useful information in dmesg to have a message indicating that the i2c driver was succesfully registered. Signed-off-by: Fabio Estevam fabio.este...@freescale.com -- drivers/i2c/busses/i2c-mxs.c |2 ++ 1 file changed, 2 insertions

Re: [PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-08-27 Thread Fabio Estevam
On Fri, Aug 24, 2012 at 12:44 AM, Marek Vasut ma...@denx.de wrote: This patch implements DMA support into mxs-i2c. DMA transfers are now enabled via DT. The DMA operation is enabled by default. Signed-off-by: Marek Vasut ma...@denx.de CC: Fabio Estevam fabio.este...@freescale.com Cc: linux

I2C_FUNC_SMBUS_QUICK on i2c-mxs

2012-08-27 Thread Fabio Estevam
) { - return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL ~I2C_FUNC_SMBUS_QUICK); + return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; } static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) -- 1.7.9.5 Could anyone clarify whether I2C_FUNC_SMBUS_QUICK option could be turned on or not? Thanks, Fabio

Re: [PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-09-16 Thread Fabio Estevam
Hi Wolfram, On Sun, Sep 16, 2012 at 7:44 AM, Wolfram Sang w.s...@pengutronix.de wrote: Tested-by: Fabio Estevam fabio.este...@freescale.com Thanks, may I ask what your tests were? I used i2c-tools to read/write to an i2c at24 eeprom connected to my mx28evk. Regards, Fabio Estevam

Re: [PATCH] i2c: mxs: Handle i2c DMA failure properly

2012-11-14 Thread Fabio Estevam
into two patches? Regards, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c: mxs: Handle i2c DMA failure properly

2012-11-16 Thread Fabio Estevam
and and doing a i2cdetect -r 0. Thanks for the explanation. Maybe you could post your proposed patch? Thanks, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH] i2c: Kconfig: Allow I2C_MXS to be selected by MX23

2012-11-17 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com With the recent DMA support addition to the i2c-mxs driver, it is now possible to also run it on mx23, so update the Kconfig entry accordingly. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/Kconfig |6

Re: [PATCH] i2c: Kconfig: Allow I2C_MXS to be selected by MX23

2012-11-17 Thread Fabio Estevam
On Sun, Nov 18, 2012 at 3:23 AM, Marek Vasut ma...@denx.de wrote: Won't i.MX23/i.MX28 instead of MXS be less confusing? Either way: Acked-by: Marek Vasut ma...@denx.de I kept MXS to let it consistent with other Kconfig files, such as spi-mxs, mmcmxs, etc. Thanks, Fabio Estevam

Re: [PATCH] i2c: Kconfig: Allow I2C_MXS to be selected by MX23

2012-11-19 Thread Fabio Estevam
Hi Wolfram, On Mon, Nov 19, 2012 at 6:49 AM, Wolfram Sang w.s...@pengutronix.de wrote: On Sat, Nov 17, 2012 at 05:48:54PM -0200, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com With the recent DMA support addition to the i2c-mxs driver, it is now possible to also run

Re: [PATCH 2/2] i2c: mxs: Do not disable the I2C SMBus quick mode

2012-11-20 Thread Fabio Estevam
. write descrip. -- -- [ 34.83] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descrip. -- -- [ 35.83] mxs-i2c 80058000.i2c: Failed to get PIO reg. write descrip. Which I2C device you have in the bus? Can you share your dts? Regards, Fabio Estevam -- To unsubscribe from this list

[PATCH] i2c: i2c-mxs: Fix type of error code

2013-01-07 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com cmd_err is used to handle error code, so it should not be unsigned. This fixes the following warning when building with W=1 option: drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg': drivers/i2c/busses/i2c-mxs.c:331:19: warning

[PATCH 03/13] i2c: i2c-mxs: Let device core handle pinctrl

2013-05-06 Thread Fabio Estevam
Since commit ab78029 (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. Cc: Wolfram Sang w...@the-dreams.de Cc: linux-i2c@vger.kernel.org Signed-off-by: Fabio Estevam fabio.este

[PATCH 02/13] i2c: i2c-imx: Let device core handle pinctrl

2013-05-06 Thread Fabio Estevam
Since commit ab78029 (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. Cc: Wolfram Sang w...@the-dreams.de Cc: linux-i2c@vger.kernel.org Signed-off-by: Fabio Estevam fabio.este

Re: [PATCH 03/13] i2c: i2c-mxs: Let device core handle pinctrl

2013-05-26 Thread Fabio Estevam
Hi Wolfram, On Mon, May 6, 2013 at 3:05 PM, Fabio Estevam fabio.este...@freescale.com wrote: Since commit ab78029 (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. Cc

Re: [PATCH 03/13] i2c: i2c-mxs: Let device core handle pinctrl

2013-06-08 Thread Fabio Estevam
. And mention if the patches are depending on each other. Otherwise I don't really know what to do with these patches. Ok, understood, Wolfram. Please apply in your tree, if it looks good for you. Thanks, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body

[PATCH v2] i2c: i2c-mxs: Use DMA mode even for small transfers

2013-07-01 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Recently we have been seing some reports about PIO mode not working properly. - http://www.spinics.net/lists/linux-i2c/msg11985.html - http://marc.info/?l=linux-i2cm=137235593101385w=2 - https://lkml.org/lkml/2013/6/24/430 Let's use DMA mode even

[PATCH] i2c: i2c_mxs: Set ACK_MODE bit

2013-07-02 Thread Fabio Estevam
to have SMBus to work properly. Reported-by: Christoph Baumann c...@sgoc.de Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-mxs.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index

[PATCH] i2c: i2c-mxs: Check the return value from stmp_reset_block()

2013-07-10 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com stmp_reset_block() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-mxs.c | 12 +--- 1 file changed, 9 insertions(+), 3

[PATCH v2] i2c: i2c-mxs: Check the return value from stmp_reset_block()

2013-07-10 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com stmp_reset_block() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v1: - Check the return value of all occurences of mxs_i2c_reset

Re: [PATCH v2] i2c: i2c-mxs: Use DMA mode even for small transfers

2013-07-23 Thread Fabio Estevam
Wolfram, On Mon, Jul 15, 2013 at 10:30 AM, Fabio Estevam feste...@gmail.com wrote: Any comment about this patch, please? If you are happy with it, could we please have it applied into stable? 3.10 is currently broken without this patch. Ping? -- To unsubscribe from this list: send the line

Re: [PATCH v2] i2c: i2c-mxs: Use DMA mode even for small transfers

2013-07-23 Thread Fabio Estevam
, and then we can use your PIO fix later. Regards, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c: i2c_mxs: Set ACK_MODE bit

2013-08-19 Thread Fabio Estevam
On 08/15/2013 07:08 AM, Wolfram Sang wrote: On Tue, Jul 02, 2013 at 01:01:00PM -0300, Fabio Estevam wrote: According to mx23 erratum 2727: 2727 : I2C 9th Clock Pulse (ACK) not generated when RETAIN_CLOCK set. Description: When RETAIN_CLOCK is set, the ninth clock pulse (ACK) is not generated

Re: [PATCH] i2c: i2c_mxs: Set ACK_MODE bit

2013-08-20 Thread Fabio Estevam
On Tue, Aug 20, 2013 at 4:04 PM, Wolfram Sang w...@the-dreams.de wrote: According to the mx23 erratum 2727 this patch is needed. Have you measured it yourself? No, only relying on the mx23 errata doc here. -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a

Re: [PATCH] i2c: i2c_mxs: Set ACK_MODE bit

2013-08-20 Thread Fabio Estevam
On Tue, Aug 20, 2013 at 4:20 PM, Wolfram Sang w...@the-dreams.de wrote: Have you measured it yourself? No, only relying on the mx23 errata doc here. Only send patches when you KNOW what you are changing, i.e. you verified to the best of your knowledge. Really! Docs have so many bugs...

[PATCH] i2c: i2c-imx: Check the return value from clk_prepare_enable()

2013-12-04 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

Re: [PATCH 14/17] i2c: nomadik: Fixup deployment of runtime PM

2014-02-05 Thread Fabio Estevam
); Previously the code was checking the return value from clk_prepare_enable(). You should keep the check here. Regards, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH] i2c-imx: Disable the clock on probe failure

2014-10-04 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com In the case of errors during probe, we should disable i2c_imx-clk. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/i2c/busses/i2c-imx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/i2c

[PATCH 1/2] i2c-imx: Use the preferred form for passing a size of a struct

2014-11-06 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com 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

[PATCH 2/2] i2c-mxs: Use the preferred form for passing a size of a struct

2014-11-06 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com 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

Re: [PATCH] i2c: core: Fix probing of i2c slaves without interrupts

2014-11-17 Thread Fabio Estevam
With this patch applied my codec and PMIC can be probed again: Tested-by: Fabio Estevam fabio.este...@freescale.com Thanks -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH] i2c: i2c-imx: Use -ENXIO as error in the NACK case

2015-10-22 Thread Fabio Estevam
According to Documentation/i2c/fault-codes the response to a bus NACK should be -ENXIO, so fix the error code. This change is similar to commit 6ff4b1051632 ("i2c: rcar: fix NACK error code"). Signed-off-by: Fabio Estevam <fabio.este...@freescale.com> --- drivers/i2c/busses/i2c

[PATCH 1/2] i2c: imx: Improve message log when DMA is not used

2015-11-01 Thread Fabio Estevam
From: Fabio Estevam <fabio.este...@freescale.com> When DMA cannot be used, it is better to state that the I2C controller will operate in PIO mode. Signed-off-by: Fabio Estevam <fabio.este...@freescale.com> --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 2/2] i2c: imx: Remove unneeded comments

2015-11-01 Thread Fabio Estevam
From: Fabio Estevam <fabio.este...@freescale.com> 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: Fabio Estevam <fabio.este...@freescale.com> --- drivers/i2c/busses/i2

[PATCH v2] i2c: imx: Remove unneeded comments

2016-01-04 Thread 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: Fabio Estevam <fabio.este...@nxp.com> --- Changes since v1: - Rebased against latest tree drivers/i2c/busses/i2c-imx.c | 12