Skip to content

drivers: SPI NOR: Inconsistency with flash interface docs #11513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gon1332 opened this issue Nov 19, 2018 · 1 comment
Closed

drivers: SPI NOR: Inconsistency with flash interface docs #11513

gon1332 opened this issue Nov 19, 2018 · 1 comment
Assignees
Labels
area: API Changes to public APIs area: Flash bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@gon1332
Copy link
Contributor

gon1332 commented Nov 19, 2018

Describe the bug
The addition of SPI NOR flash driver introduced an incosistency with the docs for flash.
According to the docs, flash_read/flash_write return 0 on success. On the contrary, spi_nor_read/spi_nor_write return the amount of bytes read/written from/to spi flash.

The big difference can be seen in the usage of flash interface in spi_flash sample vs this spi_flash test in which the reader of the code should assume the underlying hardware flash scheme. This destroys the abstraction that should be taken for granted.

Impact
I created a sample for my board that has a SPI NOR. It took me some time to see why the tests were failing, since I followed the docs descriptions.

@galak galak added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug area: Flash area: API Changes to public APIs labels Nov 20, 2018
@gon1332
Copy link
Contributor Author

gon1332 commented Nov 26, 2018

This issue is fixed by #11628.

@gon1332 gon1332 closed this as completed Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Flash bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants