Skip to content
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

Add a new smbus_writeread command to perform a write followed by a read in one transaction. #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jmeurin
Copy link
Contributor

@jmeurin jmeurin commented Mar 30, 2017

Signed-off-by: [email protected]

smbus_rw.c Outdated
@@ -557,6 +626,8 @@ MAKE_PREREQ_PARAMS_FIXED_ARGS(smbus_send_byte_params, 4,
"<adapter> <address> <value>", 0);
MAKE_PREREQ_PARAMS_FIXED_ARGS(smbus_quick_params, 4,
"<adapter> <address> <0|1>", 0);
MAKE_PREREQ_PARAMS_FIXED_ARGS(smbus_writeread_params, 5,
"<adapter> <address> <read_count> <write_value>", 0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the read count before the write value? It's write then read, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Historical reason that I agree doesn't make sense for this tool: we have another tool that does something similar but take <read_count> ... so we had to put the read count first. In the iotool case I'll swap them.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adurbin some controllers actually program read count before the first byte write.

@jmeurin
Copy link
Contributor Author

jmeurin commented Apr 11, 2017

I changed the order.

@andy-shev
Copy link

Shouldn't be this closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants