Skip to content

Max22915 release#3031

Merged
RaduSabau1 merged 4 commits intomainfrom
max22915-release
Apr 2, 2026
Merged

Max22915 release#3031
RaduSabau1 merged 4 commits intomainfrom
max22915-release

Conversation

@jansunil
Copy link
Copy Markdown
Collaborator

@jansunil jansunil commented Mar 30, 2026

Pull Request Description

Please replace this with a detailed description and motivation of the changes.
You can tick the checkboxes below with an 'x' between square brackets or just check them after publishing the PR.
If this PR contains a breaking change, list dependent PRs and try to push all related PRs at the same time.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have complied with the Submission Checklist
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

Copy link
Copy Markdown
Collaborator

@RaduSabau1 RaduSabau1 left a comment

Choose a reason for hiding this comment

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

some comments from my side. also consider adding a change-log whenever you push a new version

Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread projects/max22915/README.rst
Comment thread projects/max22915/src/common/common_data.c
Comment thread projects/max22915/README.rst Outdated
@jansunil
Copy link
Copy Markdown
Collaborator Author

jansunil commented Mar 31, 2026

Changelog v1:

1) Replaced incorrect device descriptor update for dev->shtvdd_enable and dev->ow_config[channel].owoff_enable and dev->ow_config[channel].owon_enable
2) Added a new structure member for max22915_ow_config in the device descriptor.
3) Updated the SPI_MAX_SPEED_HZ macro
4) Implemented direct return of no_os_spi_transfer() in the max22915_reg_write() function
5) Removed extra tab spaces
6) Free SPI descriptor in the max22915_init()
7) Added a space character between the link name and the actual link in the projects/max22915/README.md 

@jansunil
Copy link
Copy Markdown
Collaborator Author

Changelog v2:

Remove unused variable 'ret' from max22915_reg_write() API

Comment thread drivers/digital-io/max22915/max22915.h
Comment thread drivers/digital-io/max22915/max22915.h
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.h Outdated
Comment thread drivers/digital-io/max22915/max22915.h Outdated
Comment thread projects/max22915/src/examples/basic/basic_example.c
Comment thread projects/max22915/src/examples/basic/basic_example.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread projects/max22915/src/common/common_data.c
@jansunil
Copy link
Copy Markdown
Collaborator Author

Changelog V3:

  1. Fixed address mask: NO_OS_GENMASK(4, 1) → NO_OS_GENMASK(5, 1)
  2. Removed MAX22915_FRAME_SIZE = 4, kept only MAX22915_SPI_FRAME_SIZE = 2
  3. buff[MAX22915_FRAME_SIZE + 1] → buff[MAX22915_SPI_FRAME_SIZE + 1] (5→3 bytes)
  4. Updated init function prorotypes: max22915_init_param init_param → max22915_init_param *init_param, updated pointer parameter access accordingly
  5. Corrected inverted logic in max22915_set_sw_state()
  6. Fixed read function to use MAX22915_SPI_FRAME_SIZE instead of hardcoded 2
  7. Added fault delection in the basic example layer
  8. Automatic FLED/SLED control with hardware behavior compliance in the basic example
  9. Removed FLED and SLED configuration in the max22915_init(), removed device descriptors and init parameters as well.
  10. Directly return from APIs wherever applicable
  11. Configure chip address in the max22915_ip struct in common_data.chip

@jansunil
Copy link
Copy Markdown
Collaborator Author

Changelog V4: Minor updates with error handling and structure definition

@jansunil
Copy link
Copy Markdown
Collaborator Author

Changelog: Initialize the faults structure to 0

@jansunil
Copy link
Copy Markdown
Collaborator Author

Changelog: fix astyle error and remove fixup commit

Copy link
Copy Markdown
Contributor

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

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

some comments on my side.

Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c
Comment thread projects/max22915/src/examples/basic/basic_example.c Outdated
Comment thread projects/max22915/src/examples/basic/basic_example.c Outdated
Comment thread drivers/digital-io/max22915/README.rst Outdated
Comment thread drivers/digital-io/max22915/README.rst Outdated
Comment thread drivers/digital-io/max22915/README.rst Outdated
Comment thread projects/max22915/src/common/common_data.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
@jansunil
Copy link
Copy Markdown
Collaborator Author

jansunil commented Apr 1, 2026

Changelog:

  1. Move desc validation before struct initialization in max22915_reg_read() and max22915_reg_write()
  2. Combine multiple register writes into single read-modify-write operations
  3. Return -EINVAL for null input instead of always returning 0 in max22915_remove()
  4. Add proper UART and device cleanup in error path with null-safe removal
  5. Remove generic "Error init!" print that was shown for all error types
  6. Update copyright year to 2026 and update license headers

RaduSabau1
RaduSabau1 previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Collaborator

@RaduSabau1 RaduSabau1 left a comment

Choose a reason for hiding this comment

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

some minor comments from my side, otherwise lgtm!

Comment thread drivers/digital-io/max22915/max22915.c
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread drivers/digital-io/max22915/max22915.c Outdated
Comment thread projects/max22915/src/examples/basic/basic_example.c
Comment thread projects/max22915/src/examples/basic/basic_example.c Outdated
Comment thread projects/max22915/src/examples/basic/basic_example.c Outdated
Comment thread projects/max22915/src/examples/basic/basic_example.c
Comment thread projects/max22915/src.mk Outdated
jansunil added 4 commits April 1, 2026 14:36
Add initial driver support for MAX22915

Signed-off-by: Janani-Sunil_adi <janani.sunil@analog.com>
Add driver documentation for MAX22915

Signed-off-by: Janani-Sunil_adi <janani.sunil@analog.com>
Add basic example project for MAX22915

Add make based CI build support

Signed-off-by: Janani Sunil <janani.sunil@analog.com>
Add documentation for MAX22915 example project

Signed-off-by: Janani Sunil <janani.sunil@analog.com>
@jansunil
Copy link
Copy Markdown
Collaborator Author

jansunil commented Apr 1, 2026

Changelog:

  1. Update Copyright 2026(c) to Copyright 2025-2026(c) across all files
  2. Refactor max22915_set_current_config() and max22915_set_temperature_config() to use max22915_reg_write_mask() directly
  3. Remove no_os_crc8.c and no_os_crc8.h from src.mk
  4. Add detailed fault reporting in max22915_run_diagnostics()
  5. Replace (1 << ch) with MAX22915_CH_MASK(ch) macro in fault detection logic for better consistency
  6. Clean up single-statement if blocks in diagnostics function
  7. Clean up spacing after pr_info statements before while loop
  8. Remove blank line between assignment in max22915_reg_write()
  9. Minor formatting cleanup in parameters.h license text

@RaduSabau1 RaduSabau1 merged commit 37ed3ff into main Apr 2, 2026
12 of 18 checks passed
@RaduSabau1 RaduSabau1 deleted the max22915-release branch April 2, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants