Skip to content

Parsing I2C Device ID for MIPI PCAM #1494

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 1 commit into from
Aug 7, 2025

Conversation

andrewgschmidt
Copy link

Original pcam5c.py used a hardcoded 6 for the /dev/i2c-6 for the PYNQ-ZU and KV260 device. With the addition of the AUP-ZU3 we need a more generic mechanism to lookup the device index. This patch looks for the label "RPICAM" to denote the proper offset.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.98%. Comparing base (19ed17d) to head (dc7131a).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##           image_v3.1.1    #1494   +/-   ##
=============================================
  Coverage         34.98%   34.98%           
=============================================
  Files                30       30           
  Lines              4668     4668           
  Branches            818      818           
=============================================
  Hits               1633     1633           
  Misses             2975     2975           
  Partials             60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

i2c_index = 6 ## legacy
for dev_path in i2c_devices:
adapter_number = os.path.basename(dev_path).split('-')[-1]
name_path = f'/sys/bus/i2c/devices/i2c-{adapter_number}/of_node/label'
Copy link
Collaborator

Choose a reason for hiding this comment

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

you could check if the file exists instead of try, but this works as well.

@mariodruiz mariodruiz requested a review from jogomojo August 6, 2025 08:37
@jogomojo jogomojo merged commit 6ea63cf into Xilinx:image_v3.1.1 Aug 7, 2025
3 checks passed
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