Re: [PATCH-v5 5/5] i2c: pxa: Add ILCR (tLow & tHigh) configuration support

2015-08-05 Thread Vaibhav Hiremath



On Thursday 06 August 2015 12:41 AM, Robert Jarzmik wrote:

My next slot is probably this comming Sunday. I'll do the test and report


Thanks a lot.

Thanks,
Vaibhav
--
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: [RFT 1/2] i2c: rcar: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Wolfram Sang

> My bad. I should go to bed. And so should you by the way ;-)

Acked-by: Wolfram Sang 



signature.asc
Description: Digital signature


Re: [PATCH v2 4/4] i2c: arb-gpio-challenge: use of_get_i2c_adapter_by_node interface

2015-08-05 Thread Wolfram Sang
On Mon, Jul 27, 2015 at 05:30:51PM +0300, Vladimir Zapolskiy wrote:
> 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.
> 
> By the way added a missing of_node_put() to eliminate memory leak,
> if OF_DYNAMIC is enabled.
> 
> Signed-off-by: Vladimir Zapolskiy 
> Cc: Doug Anderson 

Applied to for-next! However...

> + of_node_put(parent_np);

I removed this line. Please resend this as a seperate patch since it
fixes a seperate issue.

Thanks,

   Wolfram



signature.asc
Description: Digital signature


Re: [PATCH v2 3/4] i2c: core: add and export of_get_i2c_adapter_by_node() interface

2015-08-05 Thread Wolfram Sang
On Mon, Jul 27, 2015 at 05:30:50PM +0300, Vladimir Zapolskiy wrote:
> 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_imx10213  0
> root@mx6q:~# lsmod | grep dw_hdmi_imx
> dw_hdmi_imx 3631  0
> dw_hdmi11846  1 dw_hdmi_imx
> imxdrm  8674  3 dw_hdmi_imx,imx_ipuv3_crtc,imx_ldb
> drm_kms_helper113765  5 dw_hdmi,imxdrm,imx_ipuv3_crtc,imx_ldb
> root@mx6q:~# rmmod dw_hdmi_imx
> root@mx6q:~# lsmod | grep i2c
> i2c_imx10213  -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: Vladimir Zapolskiy 

Applied to for-next, thanks!



signature.asc
Description: Digital signature


Re: [PATCH v2 2/4] i2c: core: manage i2c bus device refcount in i2c_[get|put]_adapter

2015-08-05 Thread Wolfram Sang
On Mon, Jul 27, 2015 at 05:30:49PM +0300, Vladimir Zapolskiy wrote:
> 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: Vladimir Zapolskiy 

Applied to for-next, thanks!



signature.asc
Description: Digital signature


Re: [RFT 1/2] i2c: rcar: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Laurent Pinchart
On Thursday 06 August 2015 02:38:49 Wolfram Sang wrote:
> On Thu, Aug 06, 2015 at 03:34:05AM +0300, Laurent Pinchart wrote:
> > Hi Wolfram,
> > 
> > Thank you for the patch.
> > 
> > On Wednesday 05 August 2015 15:18:25 Wolfram Sang wrote:
> > > From: Wolfram Sang 
> > > 
> > > Enable the I2C core for this SoC. I add a new type because this version
> > > has new features (e.g. DMA) which will be added somewhen later.
> > > 
> > > Signed-off-by: Wolfram Sang 
> 
> ...
> 
> > > @@ -625,6 +627,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] =
> > > {
> > >   { .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2
> > >   },
> > >   { .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2
> > >   },
> > >   { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2
> > >   },
> > > + { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3
> > > },
> > 
> > If H3 is compatible with Gen2, can't you just use I2C_RCAR_GEN2 here ? You
> > can always add I2C_RCAR_GEN3 later if you find differences.
> 
> Is the patch description not clear enough?

My bad. I should go to bed. And so should you by the way ;-)

-- 
Regards,

Laurent Pinchart

--
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: [RFT 1/2] i2c: rcar: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Wolfram Sang
On Thu, Aug 06, 2015 at 03:34:05AM +0300, Laurent Pinchart wrote:
> Hi Wolfram,
> 
> Thank you for the patch.
> 
> On Wednesday 05 August 2015 15:18:25 Wolfram Sang wrote:
> > From: Wolfram Sang 
> > 
> > Enable the I2C core for this SoC. I add a new type because this version
> > has new features (e.g. DMA) which will be added somewhen later.
> > 
> > Signed-off-by: Wolfram Sang 
...
> > @@ -625,6 +627,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
> > { .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2 },
> > { .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
> > { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
> > +   { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
> 
> If H3 is compatible with Gen2, can't you just use I2C_RCAR_GEN2 here ? You 
> can 
> always add I2C_RCAR_GEN3 later if you find differences.

Is the patch description not clear enough?



signature.asc
Description: Digital signature


Re: [RFT 1/2] i2c: rcar: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Laurent Pinchart
Hi Wolfram,

Thank you for the patch.

On Wednesday 05 August 2015 15:18:25 Wolfram Sang wrote:
> From: Wolfram Sang 
> 
> Enable the I2C core for this SoC. I add a new type because this version
> has new features (e.g. DMA) which will be added somewhen later.
> 
> Signed-off-by: Wolfram Sang 
> ---
>  Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
>  drivers/i2c/busses/i2c-rcar.c  | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt index
> 16b3e07aa98fdd..ea406eb20fa5ad 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> @@ -10,6 +10,7 @@ Required properties:
>   "renesas,i2c-r8a7792"
>   "renesas,i2c-r8a7793"
>   "renesas,i2c-r8a7794"
> + "renesas,i2c-r8a7795"
>  - reg: physical base address of the controller and length of memory mapped
>region.
>  - interrupts: interrupt specifier.
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index d8361dada58455..3e125654bb288a 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -103,6 +103,7 @@
>  enum rcar_i2c_type {
>   I2C_RCAR_GEN1,
>   I2C_RCAR_GEN2,
> + I2C_RCAR_GEN3,
>  };
> 
>  struct rcar_i2c_priv {
> @@ -178,6 +179,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv
> *priv, cdf_width = 2;
>   break;
>   case I2C_RCAR_GEN2:
> + case I2C_RCAR_GEN3:
>   cdf_width = 3;
>   break;
>   default:
> @@ -625,6 +627,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
>   { .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2 },
>   { .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
>   { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
> + { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },

If H3 is compatible with Gen2, can't you just use I2C_RCAR_GEN2 here ? You can 
always add I2C_RCAR_GEN3 later if you find differences.

>   {},
>  };
>  MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);

-- 
Regards,

Laurent Pinchart

--
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: [RFT 1/2] i2c: rcar: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Simon Horman
On Wed, Aug 05, 2015 at 03:18:25PM +0200, Wolfram Sang wrote:
> From: Wolfram Sang 
> 
> Enable the I2C core for this SoC. I add a new type because this version
> has new features (e.g. DMA) which will be added somewhen later.

Minor nit: s/somewhen/sometime/
or: s/somewhen //

> Signed-off-by: Wolfram Sang 
> ---
>  Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
>  drivers/i2c/busses/i2c-rcar.c  | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt 
> b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> index 16b3e07aa98fdd..ea406eb20fa5ad 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> @@ -10,6 +10,7 @@ Required properties:
>   "renesas,i2c-r8a7792"
>   "renesas,i2c-r8a7793"
>   "renesas,i2c-r8a7794"
> + "renesas,i2c-r8a7795"
>  - reg: physical base address of the controller and length of memory mapped
>region.
>  - interrupts: interrupt specifier.
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index d8361dada58455..3e125654bb288a 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -103,6 +103,7 @@
>  enum rcar_i2c_type {
>   I2C_RCAR_GEN1,
>   I2C_RCAR_GEN2,
> + I2C_RCAR_GEN3,
>  };
>  
>  struct rcar_i2c_priv {
> @@ -178,6 +179,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv 
> *priv,
>   cdf_width = 2;
>   break;
>   case I2C_RCAR_GEN2:
> + case I2C_RCAR_GEN3:
>   cdf_width = 3;
>   break;
>   default:
> @@ -625,6 +627,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
>   { .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2 },
>   { .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
>   { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
> + { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
>   {},
>  };
>  MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
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-v5 5/5] i2c: pxa: Add ILCR (tLow & tHigh) configuration support

2015-08-05 Thread Robert Jarzmik
Vaibhav Hiremath  writes:

> Robert,
>
> It would be helpful if you can test this patch-series and confirm that
> it now fixes the NULL pointer deference issue.
>
> Thanks,
> Vaibhav
Hi Vaibhav,

My next slot is probably this comming Sunday. I'll do the test and report.

Cheers.

-- 
Robert
--
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-v5 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa

2015-08-05 Thread Matt Porter
On Wed, Aug 05, 2015 at 10:49:18AM +0200, Wolfram Sang wrote:
> 
> > Yeah, we could start i2c.txt, probably better to have separate new
> > patch all together.
> 
> I will start such a file today as part of the i2c slave framework
> update which introduces flags to the reg property. Will post to the i2c
> list this week.
> 

That sounds great, Wolfram, that will be a nice improvement for the
binding docs.

Thanks,
Matt



signature.asc
Description: Digital signature


Re: [PATCH-v5 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa

2015-08-05 Thread Vaibhav Hiremath



On Wednesday 05 August 2015 07:50 PM, Matt Porter wrote:

On Wed, Aug 05, 2015 at 12:04:25PM +0530, Vaibhav Hiremath wrote:



On Monday 27 July 2015 07:39 PM, Matt Porter wrote:

On Tue, Jul 21, 2015 at 06:11:02PM +0530, Vaibhav Hiremath wrote:

Driver will now supports enable/disable across msg xfer, which user
can control it by new DT property -

i2c-disable-after-xfer : If set, driver will disable I2C module after msg
  xfer and enable it back before xfer.


If this is a new property specific to this Marvell part, it needs
the vendor prefix as in mrvl,i2c-disable-after-xfer



We discussed about this, I think in V1 or V2. Decided to use generic
name, as feature (in turn property) could be used by other drivers as
well.


Ahh, ok, thanks...coming in too late on this one. :)


Or, it couldn't hurt to start an i2c.txt for generic i2c bindings
and store it there as this and others later in this series would
reasonably apply to other controllers.



Yeah, we could start i2c.txt, probably better to have separate new
patch all together.


Great, yes, I've always found it hard to follow i2c generic bindings
since they aren't defined in a clear place like other similar hardware
(e.g. SPI).



Wolfram has already owned up on creating i2c.txt for generic properties.
So, we will be soon close to others.

And thanks for your comments.
Please let me know if you have any other comments on patch-series, so
that I can incorporate it in next version.

Thanks,
Vaibhav
--
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-v5 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa

2015-08-05 Thread Matt Porter
On Wed, Aug 05, 2015 at 12:04:25PM +0530, Vaibhav Hiremath wrote:
> 
> 
> On Monday 27 July 2015 07:39 PM, Matt Porter wrote:
> >On Tue, Jul 21, 2015 at 06:11:02PM +0530, Vaibhav Hiremath wrote:
> >>Driver will now supports enable/disable across msg xfer, which user
> >>can control it by new DT property -
> >>
> >>i2c-disable-after-xfer : If set, driver will disable I2C module after msg
> >>  xfer and enable it back before xfer.
> >
> >If this is a new property specific to this Marvell part, it needs
> >the vendor prefix as in mrvl,i2c-disable-after-xfer
> >
> 
> We discussed about this, I think in V1 or V2. Decided to use generic
> name, as feature (in turn property) could be used by other drivers as
> well.

Ahh, ok, thanks...coming in too late on this one. :)

> >Or, it couldn't hurt to start an i2c.txt for generic i2c bindings
> >and store it there as this and others later in this series would
> >reasonably apply to other controllers.
> >
> 
> Yeah, we could start i2c.txt, probably better to have separate new
> patch all together.

Great, yes, I've always found it hard to follow i2c generic bindings
since they aren't defined in a clear place like other similar hardware
(e.g. SPI).

-Matt
--
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: allow specifying separate wakeup interrupt in device tree

2015-08-05 Thread Tony Lindgren
* Dmitry Torokhov  [150803 13:05]:
> On Mon, Aug 03, 2015 at 03:21:21AM -0700, Tony Lindgren wrote:
> > 
> > Hmm why do we need the check for if (device_can_wakeup(&client->dev)))?
> 
> Because of the code in device_wakeup_attach_irq():
> 
>   ws = dev->power.wakeup;
>   if (!ws) {
>   dev_err(dev, "forgot to call call device_init_wakeup?\n");
>   return -EINVAL;
>   }

OK :) 

> > Also wondering about the dev vs &client->dev usage here.. But I take
> > you have checked that we end up calling the runtime PM calls of the
> > client instead of the i2c bus controller :)
> 
> dev *is* clent->dev in this context:
> 
>   struct i2c_client *client = i2c_verify_client(dev);

OK thanks for confirming that.

Regards,

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


[RFT 0/2] i2c: add support for r8a7795 (RCar H3)

2015-08-05 Thread Wolfram Sang
Here are the driver updates to support this new SoC. Since I don't have HW
access, this is a request for testing. The IP cores are backwards compatible to
Gen2. So, as long as the clocks are properly setup and the bus speed is OK,
the rest should work out of the box.

Question: Shall I prototype the dtsi additions for these modules? On the one
hand, this is quite some change for not being able to test. On the other hand,
other people might be so busy setting up the rest, so it may be useful after
all.


Wolfram Sang (2):
  i2c: rcar: add support for r8a7795 (R-Car H3)
  i2c: sh_mobile: add support for r8a7795 (R-Car H3)

 Documentation/devicetree/bindings/i2c/i2c-rcar.txt  | 1 +
 Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | 1 +
 drivers/i2c/busses/i2c-rcar.c   | 3 +++
 drivers/i2c/busses/i2c-sh_mobile.c  | 1 +
 4 files changed, 6 insertions(+)

-- 
2.1.4

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


[RFT 1/2] i2c: rcar: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Wolfram Sang
From: Wolfram Sang 

Enable the I2C core for this SoC. I add a new type because this version
has new features (e.g. DMA) which will be added somewhen later.

Signed-off-by: Wolfram Sang 
---
 Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
 drivers/i2c/busses/i2c-rcar.c  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt 
b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index 16b3e07aa98fdd..ea406eb20fa5ad 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -10,6 +10,7 @@ Required properties:
"renesas,i2c-r8a7792"
"renesas,i2c-r8a7793"
"renesas,i2c-r8a7794"
+   "renesas,i2c-r8a7795"
 - reg: physical base address of the controller and length of memory mapped
   region.
 - interrupts: interrupt specifier.
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index d8361dada58455..3e125654bb288a 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -103,6 +103,7 @@
 enum rcar_i2c_type {
I2C_RCAR_GEN1,
I2C_RCAR_GEN2,
+   I2C_RCAR_GEN3,
 };
 
 struct rcar_i2c_priv {
@@ -178,6 +179,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv 
*priv,
cdf_width = 2;
break;
case I2C_RCAR_GEN2:
+   case I2C_RCAR_GEN3:
cdf_width = 3;
break;
default:
@@ -625,6 +627,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
{ .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2 },
{ .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
{ .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
+   { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
{},
 };
 MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
-- 
2.1.4

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


[RFT 2/2] i2c: sh_mobile: add support for r8a7795 (R-Car H3)

2015-08-05 Thread Wolfram Sang
From: Wolfram Sang 

Enable the I2C core for this SoC. It is compitable to Gen2 SoCs, so
reuse the settings.

Signed-off-by: Wolfram Sang 
---
 Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | 1 +
 drivers/i2c/busses/i2c-sh_mobile.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt 
b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
index 2bfc6e7ed09473..214f94c25d370b 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -10,6 +10,7 @@ Required properties:
- "renesas,iic-r8a7792" (R-Car V2H)
- "renesas,iic-r8a7793" (R-Car M2-N)
- "renesas,iic-r8a7794" (R-Car E2)
+   - "renesas,iic-r8a7795" (R-Car H3)
- "renesas,iic-sh73a0" (SH-Mobile AG5)
 - reg : address start and address range size of device
 - interrupts  : interrupt of device
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c 
b/drivers/i2c/busses/i2c-sh_mobile.c
index 47659a925e09cd..7d2bd3ec2d2d25 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -836,6 +836,7 @@ static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
{ .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config },
+   { .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config },
{},
 };
-- 
2.1.4

--
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-v5 2/5] i2c: pxa: enable/disable i2c module across msg xfer

2015-08-05 Thread Vaibhav Hiremath



On Wednesday 05 August 2015 04:16 PM, Shubhrajyoti Datta wrote:

hi ,
On Tue, Jul 21, 2015 at 6:11 PM, Vaibhav Hiremath
 wrote:

From: Yi Zhang 

Enable i2c module/unit before transmission and disable when it
finishes.

why?
It's because the i2c bus may be disturbed if the slave device,
typically a touch, powers on.


Why should that be an issue?
Is it an errata.



Not I am aware of.


In which mode it is an issue slave / master or both?



since it talks about touch, I expect it to be master mode.

Thanks,
Vaibhav
--
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-v5 2/5] i2c: pxa: enable/disable i2c module across msg xfer

2015-08-05 Thread Shubhrajyoti Datta
hi ,
On Tue, Jul 21, 2015 at 6:11 PM, Vaibhav Hiremath
 wrote:
> From: Yi Zhang 
>
> Enable i2c module/unit before transmission and disable when it
> finishes.
>
> why?
> It's because the i2c bus may be disturbed if the slave device,
> typically a touch, powers on.

Why should that be an issue?
Is it an errata.

In which mode it is an issue slave / master or both?

>
> As we do not want to break slave mode support, this patch introduces
> DT property to control disable of the I2C module after xfer in master
> mode of operation.
>
> i2c-disable-after-xfer : If set, driver will disable I2C module after
> msg xfer
>
> Signed-off-by: Yi Zhang 
> Signed-off-by: Vaibhav Hiremath 
> ---
--
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-v5 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa

2015-08-05 Thread Vaibhav Hiremath



On Wednesday 05 August 2015 02:19 PM, Wolfram Sang wrote:

I will start such a file today as part of the i2c slave framework
update which introduces flags to the reg property. Will post to the i2c
list this week.


Great and thanks for taking this.

I believe, better to wait for your patch and then rebase my patch-
series against it. right?

Request to review the this patch-series, so that I can incorporate all
comments in V6.

Thanks,
Vaibhav
--
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-v5 5/5] i2c: pxa: Add ILCR (tLow & tHigh) configuration support

2015-08-05 Thread Vaibhav Hiremath



On Tuesday 21 July 2015 06:11 PM, Vaibhav Hiremath wrote:

With addition of PXA910 family of devices, the TWSI module supports
SCL clock adjustment using ILCR register.

This patch enables the control and configuration of ICLR through DT
properties,

i2c-sclk-high-time-ns:
   SCLK high time (tHigh), for standard/fast/high speed mode
i2c-sclk-low-time-ns:
   SCLK low time (tLow), for standard/fast/high speed mode

Note that in case of standard and fast mod, the tLow and tHigh counters
are same, and software will use tLow value.

Also, brought up devm_clk_get() fn above i2c_pxa_probe_dt(), as it
uses clk rate for timing calculations.

Signed-off-by: Vaibhav Hiremath 
Signed-off-by: Jett.Zhou 
Signed-off-by: Yi Zhang 
---
  drivers/i2c/busses/i2c-pxa.c | 69 
  1 file changed, 63 insertions(+), 6 deletions(-)



Robert,

It would be helpful if you can test this patch-series and confirm that
it now fixes the NULL pointer deference issue.

Thanks,
Vaibhav
--
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-v5 1/5] Documentation: binding: add new property 'disable_after_xfer' to i2c-pxa

2015-08-05 Thread Wolfram Sang

> Yeah, we could start i2c.txt, probably better to have separate new
> patch all together.

I will start such a file today as part of the i2c slave framework
update which introduces flags to the reg property. Will post to the i2c
list this week.



signature.asc
Description: Digital signature