lkml.org 
[lkml]   [2016]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] RTC/PCF85063: fix time/date reading (part II)
Date
Hi Alexandre,

(please keep me on CC...)

> [...]
> > - /* read registers */
> > - if ((i2c_transfer(client->adapter, msgs, 2)) != 2) {
> > - dev_err(&client->dev, "%s: read error\n", __func__);
> > - return -EIO;
>
> Isn't that already reading the time and date register in one block? I'd
> say you are simply reading less registers. Also, maybe you could use
> i2c_smbus_read_block_data?

Its just a "try" to make the code more readable, by a named subfunction and
more comments why things must happen that way.
Will check for the suggested smbus function.

Regards,
Juergen

--
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |


\
 
 \ /
  Last update: 2016-01-07 11:41    [W:0.091 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site