Skip to content

Conversation

metratec-mkoehler
Copy link
Contributor

  • Removal of double enum (by me) caused later enum entries to have the wrong values
  • Added the second power down state (but with different name)
    -> This restores the old function but still fixes the double enum issue

- Removal of double enum (by me) caused wrong later enum entries
  - See commit 36abe5e
- Added the second power down state (but with different name)
  -> This restores the old function but still fixes the double enum issue

Signed-off-by: Martin Koehler <[email protected]>
@metratec-mkoehler metratec-mkoehler force-pushed the ti_ina_226_opmode_enum_fix branch from c455187 to 45fa1bf Compare October 15, 2025 08:32
Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

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

Is this a real, distinct power down state or a workaround for a problem with the enum usage?

@metratec-mkoehler
Copy link
Contributor Author

Is this a real, distinct power down state or a workaround for a problem with the enum usage?

The documentation of INA226 has both labeled the same. They are distinct in the value that's in the register but as far as I can see they are functional identical.

Thanks for the feedback. I looked a bit into the enum and bindings and if I see this right I have to either change to an int type with description of the possible values and their meaning OR have to map the string entries to the correct mode values in driver, right? Or keep the work around like it is now.

For my taste loosing the string values is not nice and would also break currently existing code using the driver.

- as the pull request is just running I can also properly indent

Signed-off-by: Martin Koehler <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Bindings area: Sensors Sensors platform: TI SimpleLink Texas Instruments SimpleLink MCU size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants