Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-14 Thread Neelesh Gupta
On 11/13/2014 01:28 PM, Wolfram Sang wrote: Hi, I am basically fine if this goes via the powerpc-tree and I was hoping that I could ack it right now. However, the driver looks a bit rushed and definately needs updates before it is ready to go. On Mon, Nov 10, 2014 at 11:35:39AM +0530, Neelesh

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-13 Thread Benjamin Herrenschmidt
On Fri, 2014-11-14 at 07:53 +1100, Benjamin Herrenschmidt wrote: > > > > > + adapter->dev.parent = &pdev->dev; > > > > > + adapter->dev.of_node = of_node_get(pdev->dev.of_node); > > > > > + pname = of_get_property(pdev->dev.of_node, "port-name", NULL); > > > > > > > > I have neve

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-13 Thread Benjamin Herrenschmidt
On Thu, 2014-11-13 at 14:10 +0100, Wolfram Sang wrote: > > > Please sort the includes. > > > > Ugh ? Since when do we do that ? :-) > > Since I realised it is more readable and reduces likeliness of > duplicated includes. Ok, I assume alphabetical rather than Ingo's aesthetic "tree" ? > > > > +

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-13 Thread Neelesh Gupta
On 11/13/2014 06:10 PM, Benjamin Herrenschmidt wrote: On Thu, 2014-11-13 at 21:56 +1100, Benjamin Herrenschmidt wrote: No, there is no timeout, if that fails something went quite wrong, it could almost be a BUG_ON (basically we passed a wrong token or a NULL msg). + } + + rc = be64_to_cpu

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-13 Thread Wolfram Sang
> > Please sort the includes. > > Ugh ? Since when do we do that ? :-) Since I realised it is more readable and reduces likeliness of duplicated includes. > > > + rc = opal_i2c_request(token, bus_id, req); > > > + if (rc != OPAL_ASYNC_COMPLETION) { > > > + rc = -EIO; > > > + got

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-13 Thread Benjamin Herrenschmidt
On Thu, 2014-11-13 at 21:56 +1100, Benjamin Herrenschmidt wrote: > > No, there is no timeout, if that fails something went quite wrong, it > could almost be a BUG_ON (basically we passed a wrong token or a NULL > msg). > > > > + } > > > + > > > + rc = be64_to_cpu(msg.params[1]); > > > + if

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-13 Thread Benjamin Herrenschmidt
On Thu, 2014-11-13 at 08:58 +0100, Wolfram Sang wrote: > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > Please sort the includes. Ugh ? Since when do we do that ? :-) > > +static int i2c_opa

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-12 Thread Wolfram Sang
Hi, I am basically fine if this goes via the powerpc-tree and I was hoping that I could ack it right now. However, the driver looks a bit rushed and definately needs updates before it is ready to go. On Mon, Nov 10, 2014 at 11:35:39AM +0530, Neelesh Gupta wrote: > The patch exposes the available

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-12 Thread Michael Ellerman
On Wed, 2014-11-12 at 17:07 +1100, Benjamin Herrenschmidt wrote: > On Mon, 2014-11-10 at 11:35 +0530, Neelesh Gupta wrote: > > The patch exposes the available i2c busses on the PowerNV platform > > to the kernel and implements the bus driver to support i2c and > > smbus commands. > > The driver use

Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-11 Thread Benjamin Herrenschmidt
On Mon, 2014-11-10 at 11:35 +0530, Neelesh Gupta wrote: > The patch exposes the available i2c busses on the PowerNV platform > to the kernel and implements the bus driver to support i2c and > smbus commands. > The driver uses the platform device infrastructure to probe the busses > on the platform

[PATCH] i2c: Driver to expose PowerNV platform i2c busses

2014-11-09 Thread Neelesh Gupta
The patch exposes the available i2c busses on the PowerNV platform to the kernel and implements the bus driver to support i2c and smbus commands. The driver uses the platform device infrastructure to probe the busses on the platform and registers them with the i2c driver framework. Signed-off-by: