-
Notifications
You must be signed in to change notification settings - Fork 7.3k
drivers: counter: rts5912: add support timer32 counter driver #86388
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: counter: rts5912: add support timer32 counter driver #86388
Conversation
f393e01
to
dae0f67
Compare
dae0f67
to
ebca0f0
Compare
112ef11
to
8503cc3
Compare
struct counter_rts5912_config { | ||
struct counter_config_info info; | ||
void (*config_func)(void); | ||
struct timer32_type *base_address; |
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.
Add the volatile
attribute.
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.
Done, thanks.
8503cc3
to
d088fca
Compare
|
||
#ifndef ZEPHYR_SOC_REALTEK_RTS5912_REG_TMR32_H | ||
#define ZEPHYR_SOC_REALTEK_RTS5912_REG_TMR32_H | ||
|
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.
Hi Titan, here may should be ZEPHYR_SOC_REALTEK_RTS5912_REG_TIMER_H
Thanks!
* the counter values are changed so that interrupts are triggered | ||
* when the counters reach zero. | ||
*/ | ||
|
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.
Hi Titan,
please help to check if these header included is all used in this driver, thanks!
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.
done.
d088fca
to
e0038fa
Compare
#include "reg/reg_system.h" | ||
#include <zephyr/drivers/clock_control.h> | ||
#include <zephyr/drivers/clock_control/clock_control_rts5912.h> | ||
#include <zephyr/logging/log.h> |
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.
Hi Titan,
please help to check if these header included is all used in this driver, thanks!
sorry for that I misquote the range of header in last comment.
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.
#include <zephyr/kernel.h>
#include <zephyr/drivers/counter.h>
#include <soc.h>
#include <errno.h>
#include <stdbool.h>
#include "reg/reg_timer.h"
#include "reg/reg_system.h"
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/clock_control_rts5912.h>
#include <zephyr/logging/log.h>
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.
done.
9f5c72e
to
41bf570
Compare
dts/arm/realtek/ec/rts5912.dtsi
Outdated
clocks = <&sccon RTS5912_SCCON_PERIPH_GRP1 PERIPH_GRP1_TMR5_CLKPWR>; | ||
clock-names = "tmr32"; | ||
max-value = <0xFFFFFFFF>; | ||
clock-frequency = <25000000>; |
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.
Fix the indentation
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.
fixed.
41bf570
to
c28e38b
Compare
Port rts5912 timer32 counter driver on Zephyr Signed-off-by: Titan Chen <[email protected]>
c5c1cf2
to
4b87c4d
Compare
@nordic-krch please take a look. |
Port rts5912 timer32 counter driver on Zephyr