Skip to content

Add support for TI ADS7828/ADS7830 I2C ADCs #6819

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

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

TheMightyMadman
Copy link
Contributor

@TheMightyMadman TheMightyMadman commented Apr 28, 2025

This patch adds the TI ADS7828/ADS7830 I2C ADCs to the i2c-sensors overlay, and adds the appropriate hwmon driver as a module include in the default kernel configurations. I needed this for a project & it would be useful to have in-tree.

It also adds support for the hwmon driver "label" property - I haven't added this to the other drivers at this stage, as it is outside of the scope of this pull request, and it may only be supported by the hwmon drivers and not IIO drivers.

Tested and working OK on a CM4 with a pair of ADS7830 ADCs, overrides in /boot/firmware/config.txt as follows:
dtoverlay=i2c-sensor,ads7830,i2c_csi_dsi,addr=0x48,label="adc-1"
dtoverlay=i2c-sensor,ads7830,i2c_csi_dsi,addr=0x49,label="adc-2"

@6by9
Copy link
Contributor

6by9 commented Apr 28, 2025

Forum thread https://forums.raspberrypi.com/viewtopic.php?p=2312304

@6by9
Copy link
Contributor

6by9 commented Apr 28, 2025

Looks largely fine to me.

Two things:

  • Patches 1 & 3 want to be squashed together
  • we've gained arm64 / bcm2711_rt_defconfig as an extra defconfig recently for the realtime kernel. Could you add the module to that too please?

@TheMightyMadman
Copy link
Contributor Author

TheMightyMadman commented Apr 28, 2025

Looks largely fine to me.

Two things:

  • Patches 1 & 3 want to be squashed together
  • we've gained arm64 / bcm2711_rt_defconfig as an extra defconfig recently for the realtime kernel. Could you add the module to that too please?

Thank you :) Apologies for the third commit, that was fixing a mistake I made in the first commit as I couldn't revert back to it (my git command line skills are limited at best).

And I'd be happy to add the extra config file, sure - thanks.

Do you just need all of the config changes in a single commit? I could add a commit reverting my config changes, then add a fresh commit with everything fixed and including the additional config file.

@pelwell
Copy link
Contributor

pelwell commented Apr 28, 2025

To merge the 1st and 3rd commits:

$ git rebase -i HEAD~3
# Move the 3rd line up into 2nd place, and change the 'pick' to 'fixup' (or just 'f'), then close the editor
# You should now have 2 commits
$ git push --force TheMightyMadman HEAD:add_ads7828
# You may have a different name for the remote which is your fork of our Linux repo

@pelwell
Copy link
Contributor

pelwell commented Apr 28, 2025

Note that there is a strict 80 character limit on lines in the README.

@TheMightyMadman
Copy link
Contributor Author

To merge the 1st and 3rd commits:

$ git rebase -i HEAD~3
# Move the 3rd line up into 2nd place, and change the 'pick' to 'fixup' (or just 'f'), then close the editor
# You should now have 2 commits
$ git push --force TheMightyMadman HEAD:add_ads7828
# You may have a different name for the remote which is your fork of our Linux repo

This was very useful, thank you!
I've used this to fix the original configuration commit, and also add an entry to bcm2711_rt_defconfig.
Noted regarding the 80-character README line limit, I'll make the appropriate changes.

@TheMightyMadman
Copy link
Contributor Author

To merge the 1st and 3rd commits:

$ git rebase -i HEAD~3
# Move the 3rd line up into 2nd place, and change the 'pick' to 'fixup' (or just 'f'), then close the editor
# You should now have 2 commits
$ git push --force TheMightyMadman HEAD:add_ads7828
# You may have a different name for the remote which is your fork of our Linux repo

This was very useful, thank you! I've used this to fix the original configuration commit, and also add an entry to bcm2711_rt_defconfig. Noted regarding the 80-character README line limit, I'll make the appropriate changes.

I've now fixed the line lengths in the README file, and we're down to the two required commits.

@pelwell pelwell merged commit e6dcab6 into raspberrypi:rpi-6.12.y Apr 28, 2025
12 of 13 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 28, 2025
kernel: Add driver for the Waveshare DSI-TOUCH series panels
See: raspberrypi/linux#6566

kernel: Add support for TI ADS7828/ADS7830 I2C ADCs
See: raspberrypi/linux#6819

kernel: Add RS485 mode support for UART2, UART3, UART4, and UART5
See: raspberrypi/linux#6820
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Apr 28, 2025
kernel: Add driver for the Waveshare DSI-TOUCH series panels
See: raspberrypi/linux#6566

kernel: Add support for TI ADS7828/ADS7830 I2C ADCs
See: raspberrypi/linux#6819

kernel: Add RS485 mode support for UART2, UART3, UART4, and UART5
See: raspberrypi/linux#6820
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