[U-Boot] [PATCH V2 0/9] OMAP3-5: TWL[46]03[05]: cleanup register access and misc minimal cleanups

Nishanth Menon nm at ti.com
Mon Mar 25 19:20:18 CET 2013


Hi Sricharan,

On Mon, Mar 25, 2013 at 12:47 PM, Sricharan R <r.sricharan at ti.com> wrote:
>    All of TWL[46]03[05]_i2c_[write/read]_u8 is doing the same. (ie)
>       i2c_write(chip_no, reg, 1, &val, 1);
>       i2c_read(chip_no, reg, 1, val, 1);
>
>     We always seem to use 1 byte addresses and length.
>
>     Then why can't we move to to twl_common.h and use just one function
>     every where ?
>
>     Otherwise, this is a required cleanup.
>

I had initially considered that, but then having twl6030, 6035, 4030
as API names help us to know from readability angle which register is
being accessed and if it the right one.
Further, the PMICs are drastically different that using a
twl_read_write_u8 might end up confusing reviewer/readability.
+ the fact that they are inline allows us to have no overhead.
---
Regards,
Nishanth Menon


More information about the U-Boot mailing list