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

fby4: sd: support ina233 sensors #1487

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions meta-facebook/yv4-sd/src/platform/plat_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ vr_pre_proc_arg vr_pre_read_args[] = {
[1] = { 0x1 },
};

ina233_init_arg ina233_init_args[] = {
[0] = {
.is_init = false,
.current_lsb = 0.001,
.r_shunt = 0.002,
.mfr_config_init = false,
.is_need_mfr_device_config_init = false,
.is_need_set_alert_threshold = false,
},
[1] = {
.is_init = false,
.current_lsb = 0.001,
.r_shunt = 0.002,
.mfr_config_init = false,
.is_need_mfr_device_config_init = false,
.is_need_set_alert_threshold = false,
},
};

bool pre_vr_read(sensor_cfg *cfg, void *args)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);
Expand Down
1 change: 1 addition & 0 deletions meta-facebook/yv4-sd/src/platform/plat_hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ typedef struct _vr_pre_proc_arg {
extern adc_asd_init_arg ast_adc_init_args[];
extern apml_mailbox_init_arg apml_mailbox_init_args[];
extern vr_pre_proc_arg vr_pre_read_args[];
extern ina233_init_arg ina233_init_args[];

bool pre_vr_read(sensor_cfg *cfg, void *args);
bool post_amd_tsi_read(sensor_cfg *cfg, void *args, int *const reading);
Expand Down
Loading