From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 29 Apr 2014 10:07:51 +0200 Subject: [U-Boot] [PATCH v2 3/6] ARM: tegra: i2c: add nvec driver In-Reply-To: <535F517B.8040702@mail.ru> References: <[PATCH 0/3] ARM: tegra: add nvec keyboard support for paz00> <1398561270-25091-1-git-send-email-danindrey@mail.ru> <1398561270-25091-4-git-send-email-danindrey@mail.ru> <535F3C01.10300@denx.de> <535F517B.8040702@mail.ru> Message-ID: <535F5DD7.4010806@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Andrey, Am 29.04.2014 09:15, schrieb Andrey Danin: > On 29.04.2014 9:43, Heiko Schocher wrote: >> Hello Andrey, >> > Hello Heiko. > > First of all, thank you for the review! You are welcome. >> Am 27.04.2014 03:14, schrieb Andrey Danin: >>> Signed-off-by: Andrey Danin >>> CC: Stephen Warren >>> CC: Marc Dietrich >>> CC: Julian Andres Klode >>> CC: ac100 at lists.launchpad.net >>> --- >>> Changes for v2: >>> - NVEC driver was reworked to use tegra-i2c >>> >>> arch/arm/include/asm/arch-tegra/tegra_nvec.h | 130 ++++++++++++ >>> board/nvidia/common/board.c | 12 ++ >>> drivers/i2c/Makefile | 1 + >>> drivers/i2c/tegra_nvec.c | 294 >>> ++++++++++++++++++++++++++ >>> include/fdtdec.h | 1 + >>> lib/fdtdec.c | 1 + >>> 6 files changed, 439 insertions(+) >>> create mode 100644 arch/arm/include/asm/arch-tegra/tegra_nvec.h >>> create mode 100644 drivers/i2c/tegra_nvec.c [...] >>> diff --git a/drivers/i2c/tegra_nvec.c b/drivers/i2c/tegra_nvec.c >>> new file mode 100644 >>> index 0000000..b568988 >>> --- /dev/null >>> +++ b/drivers/i2c/tegra_nvec.c >>> @@ -0,0 +1,294 @@ [...] >>> + /* TODO Parse response */ >> >> ? >> >> Is this not a complete driver? >> > The driver is complete. This part is not mandatory because request and response are processed synchronously. I will write a proper comment here. Ok, thanks! >>> + >>> + return 0; >>> +} >>> + >>> + >>> +/** >>> + * Decode the nvec information from the fdt. >>> + * >>> + * @param blob fdt blob >>> + * @param nvec nvec device sturct >>> + * @return 0 if ok, -ve on error >> >> What is "-ve" ? >> > It means -error_code. > I will rework return codes, comments, style issues according to all your remarks. Thanks! [...] >>> +int nvec_read_events(void) >>> +{ >>> + int res; >>> + int cnt = 0; >>> + >>> + while (++cnt<= 8) { >>> + res = nvec_do_io(&nvec_data); >>> + if (res) >>> + break; >>> + >>> + /* TODO Process nvec communication errors */ >> >> Again a "TODO" ? >> > I will implement. Sounds great, thanks! [...] bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany