On 17 April 2017 at 13:00, Maxim Sloyko <max...@google.com> wrote: > Add Device Model based I2C driver for ast2500/ast2400 SoCs. > The driver is very limited, it only supports master mode and > synchronous byte-by-byte reads/writes, no DMA or Pool Buffers. > > Signed-off-by: Maxim Sloyko <max...@google.com> > > --- > > Changes in v1: > - Style fixes > > > --- > drivers/i2c/Kconfig | 9 ++ > drivers/i2c/Makefile | 1 + > drivers/i2c/ast_i2c.c | 357 > ++++++++++++++++++++++++++++++++++++++++++++++++++ > drivers/i2c/ast_i2c.h | 132 +++++++++++++++++++ > 4 files changed, 499 insertions(+) > create mode 100644 drivers/i2c/ast_i2c.c > create mode 100644 drivers/i2c/ast_i2c.h
Reviewed-by: Simon Glass <s...@chromium.org> nit below [..] > +static int ast_i2c_ofdata_to_platdata(struct udevice *dev) > +{ > + struct ast_i2c_priv *priv = dev_get_priv(dev); > + int ret; > + > + priv->regs = dev_get_addr_ptr(dev); > + if (IS_ERR(priv->regs)) > + return PTR_ERR(priv->regs); Should be if (!priv->regs) I think > + > + ret = clk_get_by_index(dev, 0, &priv->clk); > + if (ret < 0) { > + debug("%s: Can't get clock for %s: %d\n", __func__, dev->name, > + ret); > + return ret; Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot