coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chip.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __DRIVERS_I2C_SX9310_CHIP_H__
4 #define __DRIVERS_I2C_SX9310_CHIP_H__
5 
6 #include <acpi/acpi_device.h>
7 #include <device/i2c_simple.h>
8 
9 #define MAX_COMBINED_SENSORS_ENTRIES 4
10 
20 };
21 
23  /* Device Description */
24  const char *desc;
25 
26  /* ACPI _UID */
27  unsigned int uid;
28 
29  /* Bus speed in Hz, default is I2C_SPEED_FAST */
30  enum i2c_speed speed;
31 
32  /* Use GPIO-based interrupt instead of IO-APIC */
33  struct acpi_gpio irq_gpio;
34 
35  /* IO-APIC interrupt */
36  struct acpi_irq irq;
37 
38  /*
39  * Registers definition in the kernel source tree at:
40  * Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml
41  */
42 
43  /* When true, cs0 is the ground. 0 [default] is false. */
45 
46  /* Sensor used for start-up proximity detection: Default 0. */
48 
49  /* Raw Proximity filter strength: When not set, disabled. */
51 
52  /* Average Proximity filter strength: When not set, disabled. */
54 
55  /*
56  * List of which sensors are combined and represented by CS3.
57  * Could be standalone (3) or combination of 0, 1, 2, 3.
58  * Driver default: CS0 + CS1.
59  */
62 
63  /* Capacitance measure resolution. Driver default: "finest". */
65 };
66 
67 #endif /* __DRIVERS_I2C_SX9310_CHIP_H__ */
#define MAX_COMBINED_SENSORS_ENTRIES
Definition: chip.h:9
sx9310_resolution
Definition: chip.h:11
@ SX9310_VERY_COARSE
Definition: chip.h:13
@ SX9310_FINEST
Definition: chip.h:19
@ SX9310_VERY_FINE
Definition: chip.h:18
@ SX9310_COARSE
Definition: chip.h:14
@ SX9310_MEDIUM_COARSE
Definition: chip.h:15
@ SX9310_MEDIUM
Definition: chip.h:16
@ SX9310_FINE
Definition: chip.h:17
@ SX9310_COARSEST
Definition: chip.h:12
i2c_speed
Definition: i2c.h:43
unsigned int uint32_t
Definition: stdint.h:14
struct acpi_irq irq
Definition: chip.h:36
uint32_t avg_pos_strength
Definition: chip.h:53
enum i2c_speed speed
Definition: chip.h:30
uint32_t proxraw_strength
Definition: chip.h:50
uint32_t cs0_ground
Definition: chip.h:44
struct acpi_gpio irq_gpio
Definition: chip.h:33
unsigned int uid
Definition: chip.h:27
uint32_t combined_sensors[MAX_COMBINED_SENSORS_ENTRIES]
Definition: chip.h:61
uint32_t startup_sensor
Definition: chip.h:47
uint32_t combined_sensors_count
Definition: chip.h:60
enum sx9310_resolution resolution
Definition: chip.h:64
const char * desc
Definition: chip.h:24