7 comments:
Patch Set #2, Line 476: static void lspcon_i2c_spi_boot_block_info(int fd)
move this function after `lspcon_i2c_spi_map_page(int fd, unsigned int offset)`
ret |= lspcon_i2c_spi_write_register(fd, 0xbc, 0xc0);
ret |= lspcon_i2c_spi_write_register(fd, 0xbc, 0x40);
The first two magics programmed here are equiv to `lspcon_i2c_spi_reset_mpu_stop(int fd) {}` and so not needed.
ret |= lspcon_i2c_spi_write_register(fd, 0x8e, 0x00);
ret |= lspcon_i2c_spi_write_register(fd, 0x8f, 0x00);
Put a comment above, `/* Set rom addr to beginning. */`
and,
```
#define ROMADDR_BYTE1 0x8e
#define ROMADDR_BYTE2 0x8f
```
so you can just use `lspcon_i2c_spi_map_page(int fd, unsigned int offset)`
Patch Set #2, Line 484: struct timespec wait_10ms = { 0, (unsigned)1e7 };
I suspect this wait is for the unnecessary MPU reset above, so you can get rid of it here.
Perhaps this should be a #define or have a inline comment /* .. */ that has the name of what the vendor calls this special command magic.
{} unnecessary for single lines.
Patch Set #2, Line 491: pdbg("F
msg_perr() and use `%s: Failed to..` with __func__.
As mentioned before, consider yourself as a user seeing the word "Error/Failed" in a log - what are you going to grep for?
To view, visit change 41779. To unsubscribe, or for help writing mail filters, visit settings.