[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 --- drivers/i2c/busses/Kconfig |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 646068e..08748db

[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 --- Changes since v1: - Remove unneeded parenthesis drivers/i2c/busses/Kconfig |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b

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

2011-10-21 Thread Fabio Estevam
Hi Uwe, On 10/21/2011 4:48 PM, Uwe Kleine-König wrote: > On Fri, Oct 21, 2011 at 04:27:44PM -0200, Fabio Estevam wrote: >> MX23 and MX28 share the same I2C block, so let i2c-mxs be built for MX23 too. >> >> Signed-off-by: Fabio Estevam > arch/arm/mach-mxs/devices/pl

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 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 unsubscribe from this

[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 --- drivers/i2c/busses/i2c-mxs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/d

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 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

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

2012-04-27 Thread Fabio Estevam
L_CLR); 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

Re: [alsa-devel] [PATCH 10/11] ARM: imx6q_sabrelite: clkdev_add cko1 for sgtl5000

2012-05-01 Thread Fabio Estevam
On Tue, May 1, 2012 at 8:39 PM, Shawn Guo wrote: > On Tue, May 01, 2012 at 08:47:10PM +0800, Shawn Guo wrote: >> > +   clk_register_clkdev(cko1, NULL, "0-000a"); >> >> This dev_id looks a little strange to me.  I understand that's the >> consequence of having sgtl5000 clock managed in ASoC machine

[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 --- 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..df3e0bf 100644 --- a

[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 --- drivers/i2c/busses/i2c-imx.c |2 +-

[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 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 --- drivers/i2c/busses/i2c-imx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a

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

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

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

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

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 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 > CC: Fabio Estevam > Cc: linux-i2c@vger.kernel.org >

I2C_FUNC_SMBUS_QUICK on i2c-mxs

2012-08-27 Thread Fabio Estevam
*adap) { - 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? Thank

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 wrote: >> Tested-by: Fabio Estevam > > 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 -- To unsubscribe from this list: s

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

2012-11-14 Thread Fabio Estevam
split 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
nd 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/majordomo-info.html

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

2012-11-17 Thread Fabio Estevam
From: Fabio Estevam 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 --- drivers/i2c/busses/Kconfig |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

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 wrote: > > Won't i.MX23/i.MX28 instead of MXS be less confusing? Either way: > > Acked-by: Marek Vasut I kept MXS to let it consistent with other Kconfig files, such as spi-mxs, mmcmxs, etc. Thanks, Fabio Estevam -- To unsubscri

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 wrote: > On Sat, Nov 17, 2012 at 05:48:54PM -0200, Fabio Estevam wrote: >> From: Fabio Estevam >> >> 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
- [ 33.83] mxs-i2c 80058000.i2c: Failed to get PIO reg. 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? C

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

2013-01-07 Thread Fabio Estevam
From: Fabio Estevam 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: comparison between

[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 Cc: Signed-off-by: Fabio Estevam --- drivers/i2c/busses/i2c-mxs.c |6 -- 1

[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 Cc: Signed-off-by: Fabio Estevam --- drivers/i2c/busses/i2c-imx.c |8 1

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 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
ntion 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&quo

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

2013-07-01 Thread Fabio Estevam
From: Fabio Estevam 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-i2c&m=137235593101385&w=2 - https://lkml.org/lkml/2013/6/24/430 Let's use DMA mode even for sm

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

2013-07-01 Thread Fabio Estevam
From: Fabio Estevam 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-i2c&m=137235593101385&w=2 - https://lkml.org/lkml/2013/6/24/430 Let's use DMA mode even for sm

[PATCH] i2c: i2c_mxs: Set ACK_MODE bit

2013-07-02 Thread Fabio Estevam
his fix in order to have SMBus to work properly. Reported-by: Christoph Baumann Signed-off-by: Fabio Estevam --- 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 6d8094d..ce7ac86 100644 --- a/d

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

2013-07-02 Thread Fabio Estevam
Hi Uwe, On 07/02/2013 03:11 PM, Uwe Kleine-König 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 (AC

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

2013-07-10 Thread Fabio Estevam
From: Fabio Estevam 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 --- drivers/i2c/busses/i2c-mxs.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-mx

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

2013-07-10 Thread Fabio Estevam
From: Fabio Estevam 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 --- Changes since v1: - Check the return value of all occurences of mxs_i2c_reset() drivers/i2c/busses/i2c-mxs.c

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

2013-07-15 Thread Fabio Estevam
Hi Wolfram, On Mon, Jul 1, 2013 at 11:23 PM, Shawn Guo wrote: > On Mon, Jul 01, 2013 at 06:14:21PM -0300, Fabio Estevam wrote: >> From: Fabio Estevam >> >> Recently we have been seing some reports about PIO mode not working properly. >> >> - http://www.spinics.

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 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 li

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

2013-07-23 Thread Fabio Estevam
can reach 3.10, 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) i

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 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 message to m

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 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... > > Honestl

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

2013-12-04 Thread Fabio Estevam
From: 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: Fabio Estevam --- drivers/i2c/busses/i2c-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/dr

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

2014-02-05 Thread Fabio Estevam
>clk); 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

[PATCH] i2c: i2c-st: Use %pa to print 'resource_size_t' type

2014-07-10 Thread Fabio Estevam
From: Fabio Estevam When building multi_v7_defconfig with CONFIG_ARM_LPAE=y the following warning is seen: drivers/i2c/busses/i2c-st.c:818:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat=] Use

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

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

[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 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

[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 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

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

2014-11-17 Thread Fabio Estevam
: Map OF IRQ at probe time") > Signed-off-by: Geert Uytterhoeven With this patch applied my codec and PMIC can be probed again: Tested-by: Fabio Estevam 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/majordomo-info.html

[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 --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1

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

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

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

2015-11-01 Thread Fabio Estevam
From: 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 --- drivers/i2c/busses/i2c-imx.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/i2c

[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 --- Changes since v1: - Rebased against latest tree drivers/i2c/busses/i2c-imx.c | 12 1 file changed, 12 deletions