OpenNetworkLinux icon indicating copy to clipboard operation
OpenNetworkLinux copied to clipboard

[AS9716-32D] Support i2c mux reset

Open brandonchuang opened this issue 3 years ago • 3 comments

Add sysfs driver to access the ioport of mux reset to prevent from i2c bus to get locked.

Command to reset i2c mux: echo 1 > /sys/devices/platform/as9716_32d_ioport/i2c_mux_rst Command to bring i2c mux out of reset: echo 0 > /sys/devices/platform/as9716_32d_ioport/i2c_mux_rst

Signed-off-by: Brandon Chuang [email protected]

brandonchuang avatar Apr 08 '22 09:04 brandonchuang

Thank you for the update. Two more nitpicks:

  1. Please mark up the merge/pull request description.
  2. Change “to prevent from i2c bus to get locked.” to “to prevent the i2c bus to get locked.” (Or do you mean “i2c bus to lock up”?) Please mention that in the commit message.

Done for item 2. For item 1, can I know how to mark up the merge/pull request description? Moreover, I had squashed multiple commits into one. Do I still need to mention as9926-24d?

brandonchuang avatar Apr 11 '22 07:04 brandonchuang

For item 1, can I know how to mark up the merge/pull request description?

You can mark up GitHub merge/pull requests with Markdown. In this case, just choose edit from the menu, and intend the commands with four spaces.

Moreover, I had squashed multiple commits into one. Do I still need to mention as9926-24d?

Unfortunately, ONL does not have a concept of variants for platforms that are basically the same. It’s always debatable, how to best add a platform that is basically a copy of another one. You could first copy the existing platform, and only rename the platform model strings, and then add the differences in incremental changes. When just having one commit, I think it’s necessary to document what platform it was copied from, so people later looking at the code, can be sure what to compare it against and not rely on some tooling to do copy detection.

paulmenzel avatar Apr 11 '22 07:04 paulmenzel

For item 1, can I know how to mark up the merge/pull request description?

You can mark up GitHub merge/pull requests with Markdown. In this case, just choose edit from the menu, and intend the commands with four spaces.

Moreover, I had squashed multiple commits into one. Do I still need to mention as9926-24d?

Unfortunately, ONL does not have a concept of variants for platforms that are basically the same. It’s always debatable, how to best add a platform that is basically a copy of another one. You could first copy the existing platform, and only rename the platform model strings, and then add the differences in incremental changes. When just having one commit, I think it’s necessary to document what platform it was copied from, so people later looking at the code, can be sure what to compare it against and not rely on some tooling to do copy detection.

The similar part of the two files are only comment, the implementations are totally different.

brandonchuang avatar Apr 11 '22 08:04 brandonchuang