1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __DRIVERS_I2C_SX9310_CHIP_H__
4 #define __DRIVERS_I2C_SX9310_CHIP_H__
6 #include <acpi/acpi_device.h>
7 #include <device/i2c_simple.h>
9 #define MAX_COMBINED_SENSORS_ENTRIES 4
11 enum sx9310_resolution
{
22 struct drivers_i2c_sx9310_config
{
23 /* Device Description */
29 /* Bus speed in Hz, default is I2C_SPEED_FAST */
32 /* Use GPIO-based interrupt instead of IO-APIC */
33 struct acpi_gpio irq_gpio
;
35 /* IO-APIC interrupt */
39 * Registers definition in the kernel source tree at:
40 * Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml
43 /* When true, cs0 is the ground. 0 [default] is false. */
46 /* Sensor used for start-up proximity detection: Default 0. */
47 uint32_t startup_sensor
;
49 /* Raw Proximity filter strength: When not set, disabled. */
50 uint32_t proxraw_strength
;
52 /* Average Proximity filter strength: When not set, disabled. */
53 uint32_t avg_pos_strength
;
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.
60 uint32_t combined_sensors_count
;
61 uint32_t combined_sensors
[MAX_COMBINED_SENSORS_ENTRIES
];
63 /* Capacitance measure resolution. Driver default: "finest". */
64 enum sx9310_resolution resolution
;
67 #endif /* __DRIVERS_I2C_SX9310_CHIP_H__ */