[U-Boot] [PATCH v2 3/6] ARM: tegra: i2c: add nvec driver

Heiko Schocher hs at denx.de
Tue Apr 29 10:07:51 CEST 2014


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<danindrey at mail.ru>
>>> CC: Stephen Warren<swarren at nvidia.com>
>>> CC: Marc Dietrich<marvin24 at gmx.de>
>>> CC: Julian Andres Klode<jak at jak-linux.org>
>>> 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


More information about the U-Boot mailing list