Skip to content
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

drivers: rtc: Add Texas Instruments BQ32002 RTC driver #84552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lefucjusz
Copy link
Contributor

This PR adds support for BQ32002 RTC chip.

Supported functionalities:

  • Time setting/reading
  • Alarm setting/reading
  • Calibration setting/reading
  • IRQ frequency configuration

Tested on nRF52833-DK board.

This PR adds support for BQ32002 RTC chip.

Supported functionalities:

* Time setting/reading
* Alarm setting/reading
* Calibration setting/reading
* IRQ frequency configuration

Tested on nRF52833-DK board.

Signed-off-by: Marcin Lyda <[email protected]>
@zephyrbot zephyrbot added area: RTC Real Time Clock platform: TI SimpleLink Texas Instruments SimpleLink MCU labels Jan 25, 2025
Copy link
Collaborator

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

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

Looks really good, not sure about tve while(0) , mayby its fine :)


bq32002_lock_sem(dev);

do {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use goto statements to jump, not sure if its a rule but it isthe usual way its done in tree :)

.i2c = I2C_DT_SPEC_INST_GET(inst), \
.irq_freq = \
DT_INST_ENUM_IDX_OR(inst, irq_frequency, BQ32002_IRQ_FREQ_ENUM_DISABLED) \
}; \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Misaligned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTC Real Time Clock platform: TI SimpleLink Texas Instruments SimpleLink MCU
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants