blob: 13a64bafb05170293af0a5b7d065328475d1c063 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description: ALS driver data
compatible: "cros-ec,accelgyro-als-drv-data"
child-binding:
description: ALS calibration data
properties:
scale:
type: int
required: true
description: |
Scale, uscale, and offset are used to correct the raw 16 bit ALS data
and then to convert it to 32 bit using the following equations
raw_value += offset;\n
adjusted_value = raw_value * scale + raw_value * uscale / 10000;
uscale:
type: int
required: true
description: uscale
offset:
type: int
required: true
description: offset
#
# examples:
# als-drv-data {
# compatible = "cros-ec,accelgyro-als-drv-data";
# als-cal {
# scale = <1>;
# uscale = <0>;
# offset = <0>;
# als-channel-scale {
# compatible = "cros-ec,accelgyro-als-channel-scale";
# k-channel-scale = <1>;
# cover-scale = <1>;
# };
# };
# };
#
|