Skip to content

schemas: property-units: Add millivolt - #210

Closed
Sani7 wants to merge 1 commit into
devicetree-org:mainfrom
Sani7:add-millivolt-property
Closed

Sani7 wants to merge 1 commit into
devicetree-org:mainfrom
Sani7:add-millivolt-property

Conversation

@Sani7

@Sani7 Sani7 commented Sep 24, 2026

Copy link
Copy Markdown

Add millivolt as a standard unit suffix.
This lets properties using the -millivolt suffix
automatically get the correct type without an explicit $ref.

Suggested-by: Conor Dooley conor@kernel.org
Signed-off-by: Sander Speetjens sander.speetjens@gmail.com

@krzk

krzk commented Sep 24, 2026

Copy link
Copy Markdown

Your commit should explain why do we need it and in this context why existing units are not enough.

@Sani7
Sani7 force-pushed the add-millivolt-property branch 2 times, most recently from 4bd714c to b2c6667 Compare September 24, 2026 08:40
Several existing bindings use the -millivolt suffix (for example
trickle-voltage-millivolt). Unlike -microvolt, -millivolt is
not currently recognised as a standard unit suffix, so these properties
require an explicit $ref to uint32.

Add millivolt to the list of standard units so the type can be inferred
automatically.

Suggested-by: Conor Dooley <conor@kernel.org>
Signed-off-by: Sander Speetjens <sander.speetjens@gmail.com>
@Sani7
Sani7 force-pushed the add-millivolt-property branch from b2c6667 to 8f30bae Compare September 24, 2026 08:43
@Sani7

Sani7 commented Sep 24, 2026 •

Copy link
Copy Markdown
Author

Changed my commit message to:

Several existing bindings use the -millivolt suffix (for example
trickle-voltage-millivolt). Unlike -microvolt, -millivolt is
not currently recognised as a standard unit suffix, so these properties
require an explicit $ref to uint32.

Add millivolt to the list of standard units so the type can be inferred
automatically.

@robherring

Copy link
Copy Markdown
Member

The reason we don't just have every unit is then we'd get the properties for the same thing with different units. So we have uV for everything up to ~4000V. If you need higher, then you can use -volts.

@ConchuOD

Copy link
Copy Markdown

The reason we don't just have every unit is then we'd get the properties for the same thing with different units. So we have uV for everything up to ~4000V. If you need higher, then you can use -volts.

There's already a user for this (in rtc.yaml) which has no obviously associated type, which is why I suggested this. You'd rather just explicitly add the type there?

@robherring

Copy link
Copy Markdown
Member

There's already a user for this (in rtc.yaml) which has no obviously associated type, which is why I suggested this. You'd rather just explicitly add the type there?

Yes.

@robherring robherring closed this Oct 1, 2026
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.

4 participants