<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Dear Alexandre,</span><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Thanks for your comments.</span><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><font color="#000000"><span style="caret-color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">I will store the part number to global parameter in probe and use it to check before setting time.</span></font><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Thanks.</span><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Best regard,</span><br style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="-webkit-text-size-adjust: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Mia</span><br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On Aug 29, 2023, at 10:22 PM, Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>On 29/08/2023 21:35:36+0800, Minying Lin wrote:</span><br><blockquote type="cite"><blockquote type="cite"><span>Do you really have to check the part number every time you set the time?</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>I don't expect it to change once read in probe.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><span>[Mia] Due to the 3018Y's topology, we need to set the TWO bit first to</span><br></blockquote><blockquote type="cite"><span>obtain the write time capability, but the 3015Y does not have this problem.</span><br></blockquote><blockquote type="cite"><span>Therefore, we use part number & TWO bit to determine whether we need to set</span><br></blockquote><blockquote type="cite"><span>the TWO bit first before set time.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span>Sure but why don't you store the info somewhere instead of reading it</span><br><span>from the RTC every time?</span><br><span></span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>+ if (part_num < 0) {</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>+ dev_dbg(&client->dev, "%s: Failed to read part info</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>reg.\n", __func__);</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>+ return part_num;</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>+ }</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>+</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>--</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Alexandre Belloni, co-owner and COO, Bootlin</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Embedded Linux and Kernel engineering</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>https://bootlin.com</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span></span><br><span>-- </span><br><span>Alexandre Belloni, co-owner and COO, Bootlin</span><br><span>Embedded Linux and Kernel engineering</span><br><span>https://bootlin.com</span><br></div></blockquote></body></html>