mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
add calibration_data node to laser sysfs
Add calibration_data node to laser sysfs: /sys/devices/virtual/laser/stmvl53l1/calibration_data Change-Id: I13b71671c81b3e0b9f0031e64866680f26161a12 Signed-off-by: yanyh2 <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1420664 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
9bee68c956
commit
fd106d73c0
1 changed files with 10 additions and 0 deletions
|
|
@ -4768,10 +4768,20 @@ int stmvl53l1_sysfs_laser(struct stmvl53l1_data *data, bool create)
|
|||
&laser_name_attributes);
|
||||
if (error)
|
||||
goto device_destroy;
|
||||
|
||||
error = sysfs_create_bin_file(&laser_class_dev->kobj,
|
||||
&stmvl53l1_calib_data_attr);
|
||||
if (error) {
|
||||
device_remove_file(laser_class_dev,
|
||||
&laser_name_attributes);
|
||||
goto device_destroy;
|
||||
}
|
||||
} else {
|
||||
if (!laser_class || !laser_class_dev)
|
||||
return -ENODEV;
|
||||
|
||||
sysfs_remove_bin_file(&laser_class_dev->kobj,
|
||||
&stmvl53l1_calib_data_attr);
|
||||
device_remove_file(laser_class_dev,
|
||||
&laser_name_attributes);
|
||||
for (i = 0; stmvl53l1_attributes[i] != NULL; ++i)
|
||||
|
|
|
|||
Loading…
Reference in a new issue