Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303460 > unrolled thread

Re: [PATCH 2/3] RTC/PCF85063: fix time/date reading (part II)

Started byJuergen Borleis <jbe@pengutronix.de>
First post2016-01-07 11:20 +0100
Last post2016-01-07 11:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/3] RTC/PCF85063: fix time/date reading (part II) Juergen Borleis <jbe@pengutronix.de> - 2016-01-07 11:20 +0100

#1303460 — Re: [PATCH 2/3] RTC/PCF85063: fix time/date reading (part II)

FromJuergen Borleis <jbe@pengutronix.de>
Date2016-01-07 11:20 +0100
SubjectRe: [PATCH 2/3] RTC/PCF85063: fix time/date reading (part II)
Message-ID<qOfPI-6JB-21@gated-at.bofh.it>
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/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web