-
Notifications
You must be signed in to change notification settings - Fork 960
Andrei/ltc2499 support #3452
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
Open
stancovici
wants to merge
4
commits into
rpi/release/v6.12.y-2026r1
Choose a base branch
from
andrei/ltc2499-support
base: rpi/release/v6.12.y-2026r1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Andrei/ltc2499 support #3452
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ac79e7f
iio: adc: ltc2497: add LTC2499 internal temperature channel
stancovici 19ad2b7
dt-bindings: iio: adc: lltc,ltc2497: document LTC2499 temperature sup…
stancovici 4d6d520
ARM: dts: overlays: add local LTC2499 validation overlay
stancovici 0c63d33
iio: adc: ltc2497: add 2x conversion speed mode
stancovici File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * rpi-ltc2499-overlay.dts - Raspberry Pi overlay for the LTC2499 ADC | ||
| * | ||
| * Instantiates an LTC2499 on the Raspberry Pi I2C1 bus (40-pin header) and | ||
| * wires its ADC reference to the board's existing 3.3 V fixed regulator via | ||
| * | ||
| * vref-supply = <&vdd_3v3_reg>; | ||
| * | ||
| * so that regulator_get_voltage() returns 3300000 and the LTC2499 temperature | ||
| * channel (in_temp_scale / in_temp_offset) reports correctly without relying on | ||
| * any driver-side fallback. | ||
| * | ||
| * Note: this overlay targets a Raspberry Pi wired with a 3.3 V VREF. Other | ||
| * boards must supply their own Device Tree node describing the actual VREF | ||
| * regulator (2.5 V, 3.3 V, 4.096 V, etc.); the 3.3 V value here is not a | ||
| * universal hardware assumption. | ||
| */ | ||
| /dts-v1/; | ||
| /plugin/; | ||
|
|
||
| / { | ||
| compatible = "brcm,bcm2835"; | ||
|
|
||
| fragment@0 { | ||
| target = <&i2c1>; | ||
| __overlay__ { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| status = "okay"; | ||
|
|
||
| ltc2499: ltc2499@76 { | ||
| compatible = "lltc,ltc2499"; | ||
| reg = <0x76>; | ||
| /* Board's own 3.3 V rail - see arch DT __symbols__ */ | ||
| vref-supply = <&vdd_3v3_reg>; | ||
| #io-channel-cells = <1>; | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| __overrides__ { | ||
| addr = <<c2499>,"reg:0"; | ||
| }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this is the best approach.
why can't the temp channel be correctly const instead of patching it on probe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I kept the runtime-patched copy is extensibility: the channel metadata is expected to grow with additional optional features on the LTC2499 family, and keeping a single base channel description avoids maintaining multiple near-duplicate channel tables.
I'm happy to switch to a static const table if you feel that is the preferred direction for this series.