[Letux-kernel] [PATCH] letux/gta04: do not mess with RTC_HOURS

H. Nikolaus Schaller hns at goldelico.com
Fri Feb 3 07:34:26 CET 2017


> Am 02.02.2017 um 19:33 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi Nikolaus,
> 
> 
> On Thu, 2 Feb 2017 19:17:27 +0100
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>> Ah, you were faster!
>> 
>> Could you please add a description why it is wrong and what has
>> changed? It looks as if the function parameter sequence has changed.
> 
> parameter order was wrong, yes.
> But in twl4030-additions.c I did not find any wrong usage, so why
> did that not harm earlier...?

It is as I had suspected:

http://git.goldelico.com/?p=gta04-uboot.git;a=blob;f=include/twl4030.h;h=11504a51d521dc72b58054f1b37cdf7159e54d39;hb=refs/heads/letux-2011.03-rc1#l513
static inline int twl4030_i2c_write_u8(u8 chip_no, u8 val, u8 reg)

vs.

http://git.goldelico.com/?p=gta04-uboot.git;a=blob;f=include/twl4030.h;h=103137372d309c2d2e906297d619d5841040e04f;hb=refs/heads/letux-2016.11#l652
static inline int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)

So just copying a source code snippet that uses this function from 2011.03 to 2016.11 introduces this bug.

BR,
Nikolaus

> That line it part of a bigger commit just copying files over.
> 
> Regards,
> Andreas
> 
>> 
>> BR and thanks,
>> Nikolaus
>> 
>>> Am 02.02.2017 um 19:13 schrieb Andreas Kemnade
>>> <andreas at kemnade.info>:
>>> 
>>> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
>>> ---
>>> board/goldelico/letux-gta04/gta04.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/board/goldelico/letux-gta04/gta04.c
>>> b/board/goldelico/letux-gta04/gta04.c index 5c93d26..46ccb94 100644
>>> --- a/board/goldelico/letux-gta04/gta04.c
>>> +++ b/board/goldelico/letux-gta04/gta04.c
>>> @@ -359,9 +359,9 @@ static void tps65950_init(void)
>>> #define TWL4030_BB_CFG_BBISEL_500UA	2
>>> 
>>> 	/* Enable battery backup capacitor (3.2V, 0.5mA charge
>>> current) */
>>> -	twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER,
>>> +	twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER,
>>> TWL4030_PM_RECEIVER_BB_CFG, TWL4030_BB_CFG_BBCHEN |
>>> TWL4030_BB_CFG_BBSEL_3200MV |
>>> -
>>> TWL4030_BB_CFG_BBISEL_500UA, TWL4030_PM_RECEIVER_BB_CFG);
>>> +
>>> TWL4030_BB_CFG_BBISEL_500UA); #endif
>>> 
>>> }
>>> --
>>> 2.1.4
>>> 
>>> _______________________________________________
>>> http://projects.goldelico.com/p/gta04-kernel/
>>> Letux-kernel mailing list
>>> Letux-kernel at openphoenux.org
>>> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
>> 
>> _______________________________________________
>> http://projects.goldelico.com/p/gta04-kernel/
>> Letux-kernel mailing list
>> Letux-kernel at openphoenux.org
>> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
>> 
> 
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170203/c0fc5759/attachment-0001.asc>


More information about the Letux-kernel mailing list