<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Stefan,<br>
<br>
Thanks for the review, I'll see if I have time to spin another patch.<br>
<br>
<blockquote type="cite">
  <div class="moz-text-plain" wrap="true"
 style="font-family: -moz-fixed; font-size: 15px;" lang="x-western">
  <blockquote type="cite" style="font-size: large; color: rgb(0, 0, 0);">
    <pre wrap=""><span class="moz-txt-citetags">> </span>+     const uint8_t stat_bit_WPP = (1 << 4);
    </pre>
  </blockquote>
  <pre wrap="">carldani has preferred shorter variables in the past. we usually don't
use such constants and verbose comments (although it would help newbies
to understand the code).</pre>
  </div>
</blockquote>
<br>
Yep, that was my aim.<br>
<br>
<blockquote type="cite">
  <div class="moz-text-plain" wrap="true"
 style="font-family: -moz-fixed; font-size: 15px;" lang="x-western">
  <pre wrap=""> i think anyone able to read a datasheet
would prefer these inline (if not they should be macros instead).
look at the other functions in at25.c for examples.
  </pre>
  </div>
</blockquote>
<br>
OK, cool.  I'm happy to go with house style - tho' macros always seem
like a bit of an anachronism with modern compilers (and are
debugger-hostile of course).<span class="moz-txt-citetags"></span><br>
<br>
<blockquote type="cite">
  <div class="moz-text-plain" wrap="true"
 style="font-family: -moz-fixed; font-size: 15px;" lang="x-western">
  <pre wrap="">would that buy us anything if used?

+               /* Supports spi_at26_write_sequential too, but it's untested */
  </pre>
  </div>
</blockquote>
<br>
<br>
Probably not, but carldani said on IRC (at the time I wrote the
original patch) that he'd like to add a mechanism to support multiple
alternative write modes in the future, so this comment was with the aim
of making that transition easier.<br>
<br>
<blockquote type="cite">
  <div class="moz-text-plain" wrap="true"
 style="font-family: -moz-fixed; font-size: 15px;" lang="x-western">
  <blockquote type="cite" style="font-size: large; color: rgb(0, 0, 0);">
    <pre wrap=""><span class="moz-txt-citetags">> </span>-             .write          = NULL /* Incompatible Page write */,
<span class="moz-txt-citetags">> </span>+              .unlock         = spi_disable_blockprotect_at26f040,
<span class="moz-txt-citetags">> </span>+              /* also supports spi_chip_write_1, but nothing else */
    </pre>
  </blockquote>
  <pre wrap="">have you tested spi_chip_write_1?
  </pre>
  </div>
</blockquote>
<br>
Yes I have, and it worked (I implemented the write_sequential code
whilst I was waiting for the spi_chip_write_1 test to complete!).<br>
<br>
<br>
Thanks for the review.  ACK on all other comments!<br>
<br>
Tim.<br>
</body>
</html>