• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto3";
6
7option go_package = "go.chromium.org/chromiumos/config/go/api";
8
9package chromiumos.config.api;
10
11// Configure Semtech proximity sensors.
12message ProximityConfig {
13  // Define which antenna(s) the proximity sensor protects.
14  message Location {
15    enum RadioType {
16      UNKNOWN = 0;
17      WIFI = 1;
18      CELLULAR = 2;
19    }
20    RadioType radio_type = 1;
21
22    // For suffixes like "LEFT", "RIGHT", "0",  "1"
23    // One modifier per location, to match device tree.
24    string modifier = 2;
25  }
26  repeated Location location = 1;
27
28  // An empty message indicating that proximity sensor(s) are used,
29  // but the config values are stored elsewhere.
30  message LegacyProximityConfig {
31  }
32
33  message SemtechProximityConfig {
34    message ChannelConfig {
35      // Proximity sensor channel: i.e.: 0,1, 3, 3_comb.
36      string channel = 1;
37
38      // Proximity sensor hardware gain.
39      uint32 hardwaregain = 2;
40
41      // Proximity sensor falling threshold.
42      uint32 thresh_falling = 3;
43
44      // Proximity sensor falling hysteresis.
45      uint32 thresh_falling_hysteresis = 4;
46
47      // Proximity sensor rising threshold.
48      uint32 thresh_rising = 5;
49
50      // Proximity sensor rising hysteresis.
51      uint32 thresh_rising_hysteresis = 6;
52    }
53
54    repeated ChannelConfig channel_config = 1;
55
56    // Proximity sensor sampling frequency.
57    float sampling_frequency = 2;
58
59    // Proximity sensor falling threshold period (debounce).
60    uint32 thresh_falling_period = 3;
61
62    // Proximity sensor rising threshold period (debounce).
63    uint32 thresh_rising_period = 4;
64  }
65
66  message ActivityProximityConfig {
67  }
68
69  oneof config {
70    LegacyProximityConfig legacy_config = 2;
71    SemtechProximityConfig semtech_config = 3;
72    ActivityProximityConfig activity_config = 4;
73  }
74}
75