Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-12 Thread Cédric Le Goater
Hello Brendan, [ ... ] > +static bool aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus) > +{ > + u32 irq_status, status_ack = 0, command = 0; > + struct i2c_msg *msg; > + u8 recv_byte; > + > + spin_lock(>lock); > + irq_status = readl(bus->base + ASPEED_I2C_INTR_STS_REG); > +

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-12 Thread Cédric Le Goater
Hello Brendan, [ ... ] > +static bool aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus) > +{ > + u32 irq_status, status_ack = 0, command = 0; > + struct i2c_msg *msg; > + u8 recv_byte; > + > + spin_lock(>lock); > + irq_status = readl(bus->base + ASPEED_I2C_INTR_STS_REG); > +

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-09 Thread Benjamin Herrenschmidt
On Mon, 2017-05-08 at 16:28 -0700, Brendan Higgins wrote: > > I am curious what everyone thinks about this. It seemed that, earlier > on, people did not like me disabling multi-master mode, but I think > that it would make bus recovery not work as well. Given that, I think > it makes the most

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-09 Thread Benjamin Herrenschmidt
On Mon, 2017-05-08 at 16:28 -0700, Brendan Higgins wrote: > > I am curious what everyone thinks about this. It seemed that, earlier > on, people did not like me disabling multi-master mode, but I think > that it would make bus recovery not work as well. Given that, I think > it makes the most

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-08 Thread Wolfram Sang
> > + /* TODO: provide device tree option for multi-master mode. > > */ > > > I am curious what everyone thinks about this. It seemed that, earlier on, > people did not like me disabling multi-master mode, but I think that it > would make bus recovery not work as well. Given that,

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-08 Thread Wolfram Sang
> > + /* TODO: provide device tree option for multi-master mode. > > */ > > > I am curious what everyone thinks about this. It seemed that, earlier on, > people did not like me disabling multi-master mode, but I think that it > would make bus recovery not work as well. Given that,

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-08 Thread Brendan Higgins
Sorry for the spam everyone, email client did not do what I expected it to do. I would like to release another version this week or next week, and I think that we are pretty closed to having something we can apply, but before I do that, I want to get something resolved: > +static int

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-05-08 Thread Brendan Higgins
Sorry for the spam everyone, email client did not do what I expected it to do. I would like to release another version this week or next week, and I think that we are pretty closed to having something we can apply, but before I do that, I want to get something resolved: > +static int

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-25 Thread Brendan Higgins
Adding Ryan to thread. >> +static int __aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus, >> +struct platform_device *pdev) >> +{ > > Minor nit ... I'm really not fan of those underscores. > > We use __ functions in some cases in the kernel for low level > helpers,

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-25 Thread Brendan Higgins
Adding Ryan to thread. >> +static int __aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus, >> +struct platform_device *pdev) >> +{ > > Minor nit ... I'm really not fan of those underscores. > > We use __ functions in some cases in the kernel for low level > helpers,

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-24 Thread Benjamin Herrenschmidt
On Mon, 2017-04-24 at 11:18 -0700, Brendan Higgins wrote: > +static int __aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus, > +    struct platform_device *pdev) > +{ Minor nit ... I'm really not fan of those underscores. We use __ functions in some cases in the kernel

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-24 Thread Benjamin Herrenschmidt
On Mon, 2017-04-24 at 11:18 -0700, Brendan Higgins wrote: > +static int __aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus, > +    struct platform_device *pdev) > +{ Minor nit ... I'm really not fan of those underscores. We use __ functions in some cases in the kernel

[PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-24 Thread Brendan Higgins
Added initial master support for Aspeed I2C controller. Supports fourteen busses present in AST24XX and AST25XX BMC SoCs by Aspeed. Signed-off-by: Brendan Higgins --- Changes for v2: - Added single module_init (multiple was breaking some builds). Changes for v3: -

[PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-24 Thread Brendan Higgins
Added initial master support for Aspeed I2C controller. Supports fourteen busses present in AST24XX and AST25XX BMC SoCs by Aspeed. Signed-off-by: Brendan Higgins --- Changes for v2: - Added single module_init (multiple was breaking some builds). Changes for v3: - Removed "bus" device tree