aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-08-20 12:05:17 -0400
committerJiri Kosina <jkosina@suse.cz>2018-08-20 12:05:17 -0400
commit415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch)
tree47492d2386a0e7f00ef645313cb44ae4960b7e7e /include/linux/platform_data
parent4f65245f2d178b9cba48350620d76faa4a098841 (diff)
parentb8e759b8f6dab1c473c30ac12709095d0b81078e (diff)
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/gpio-dwapb.h3
-rw-r--r--include/linux/platform_data/i2c-gpio.h34
-rw-r--r--include/linux/platform_data/i2c-mux-gpio.h43
-rw-r--r--include/linux/platform_data/i2c-ocores.h23
-rw-r--r--include/linux/platform_data/i2c-omap.h39
-rw-r--r--include/linux/platform_data/i2c-pca-platform.h10
-rw-r--r--include/linux/platform_data/i2c-xiic.h43
-rw-r--r--include/linux/platform_data/media/ir-rx51.h9
-rw-r--r--include/linux/platform_data/mlxreg.h3
-rw-r--r--include/linux/platform_data/mtd-davinci.h10
-rw-r--r--include/linux/platform_data/sc18is602.h2
-rw-r--r--include/linux/platform_data/shmob_drm.h4
-rw-r--r--include/linux/platform_data/spi-imx.h29
-rw-r--r--include/linux/platform_data/ti-aemif.h25
-rw-r--r--include/linux/platform_data/ti-sysc.h1
-rw-r--r--include/linux/platform_data/tsl2772.h101
16 files changed, 350 insertions, 29 deletions
diff --git a/include/linux/platform_data/gpio-dwapb.h b/include/linux/platform_data/gpio-dwapb.h
index 2dc7f4a8ab09..419cfacb4b42 100644
--- a/include/linux/platform_data/gpio-dwapb.h
+++ b/include/linux/platform_data/gpio-dwapb.h
@@ -19,7 +19,8 @@ struct dwapb_port_property {
19 unsigned int idx; 19 unsigned int idx;
20 unsigned int ngpio; 20 unsigned int ngpio;
21 unsigned int gpio_base; 21 unsigned int gpio_base;
22 unsigned int irq; 22 int irq[32];
23 bool has_irq;
23 bool irq_shared; 24 bool irq_shared;
24}; 25};
25 26
diff --git a/include/linux/platform_data/i2c-gpio.h b/include/linux/platform_data/i2c-gpio.h
new file mode 100644
index 000000000000..352c1426fd4d
--- /dev/null
+++ b/include/linux/platform_data/i2c-gpio.h
@@ -0,0 +1,34 @@
1/*
2 * i2c-gpio interface to platform code
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef _LINUX_I2C_GPIO_H
11#define _LINUX_I2C_GPIO_H
12
13/**
14 * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio
15 * @udelay: signal toggle delay. SCL frequency is (500 / udelay) kHz
16 * @timeout: clock stretching timeout in jiffies. If the slave keeps
17 * SCL low for longer than this, the transfer will time out.
18 * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
19 * isn't actively driven high when setting the output value high.
20 * gpio_get_value() must return the actual pin state even if the
21 * pin is configured as an output.
22 * @scl_is_open_drain: SCL is set up as open drain. Same requirements
23 * as for sda_is_open_drain apply.
24 * @scl_is_output_only: SCL output drivers cannot be turned off.
25 */
26struct i2c_gpio_platform_data {
27 int udelay;
28 int timeout;
29 unsigned int sda_is_open_drain:1;
30 unsigned int scl_is_open_drain:1;
31 unsigned int scl_is_output_only:1;
32};
33
34#endif /* _LINUX_I2C_GPIO_H */
diff --git a/include/linux/platform_data/i2c-mux-gpio.h b/include/linux/platform_data/i2c-mux-gpio.h
new file mode 100644
index 000000000000..4406108201fe
--- /dev/null
+++ b/include/linux/platform_data/i2c-mux-gpio.h
@@ -0,0 +1,43 @@
1/*
2 * i2c-mux-gpio interface to platform code
3 *
4 * Peter Korsgaard <peter.korsgaard@barco.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef _LINUX_I2C_MUX_GPIO_H
12#define _LINUX_I2C_MUX_GPIO_H
13
14/* MUX has no specific idle mode */
15#define I2C_MUX_GPIO_NO_IDLE ((unsigned)-1)
16
17/**
18 * struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio
19 * @parent: Parent I2C bus adapter number
20 * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
21 * @values: Array of bitmasks of GPIO settings (low/high) for each
22 * position
23 * @n_values: Number of multiplexer positions (busses to instantiate)
24 * @classes: Optional I2C auto-detection classes
25 * @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given
26 * relative to the base GPIO number of that chip
27 * @gpios: Array of GPIO numbers used to control MUX
28 * @n_gpios: Number of GPIOs used to control MUX
29 * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
30 */
31struct i2c_mux_gpio_platform_data {
32 int parent;
33 int base_nr;
34 const unsigned *values;
35 int n_values;
36 const unsigned *classes;
37 char *gpio_chip;
38 const unsigned *gpios;
39 int n_gpios;
40 unsigned idle;
41};
42
43#endif /* _LINUX_I2C_MUX_GPIO_H */
diff --git a/include/linux/platform_data/i2c-ocores.h b/include/linux/platform_data/i2c-ocores.h
new file mode 100644
index 000000000000..01edd96fe1f7
--- /dev/null
+++ b/include/linux/platform_data/i2c-ocores.h
@@ -0,0 +1,23 @@
1/*
2 * i2c-ocores.h - definitions for the i2c-ocores interface
3 *
4 * Peter Korsgaard <jacmet@sunsite.dk>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef _LINUX_I2C_OCORES_H
12#define _LINUX_I2C_OCORES_H
13
14struct ocores_i2c_platform_data {
15 u32 reg_shift; /* register offset shift value */
16 u32 reg_io_width; /* register io read/write width */
17 u32 clock_khz; /* input clock in kHz */
18 bool big_endian; /* registers are big endian */
19 u8 num_devices; /* number of devices in the devices list */
20 struct i2c_board_info const *devices; /* devices connected to the bus */
21};
22
23#endif /* _LINUX_I2C_OCORES_H */
diff --git a/include/linux/platform_data/i2c-omap.h b/include/linux/platform_data/i2c-omap.h
new file mode 100644
index 000000000000..3444265ee8ee
--- /dev/null
+++ b/include/linux/platform_data/i2c-omap.h
@@ -0,0 +1,39 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __I2C_OMAP_H__
3#define __I2C_OMAP_H__
4
5#include <linux/platform_device.h>
6
7/*
8 * Version 2 of the I2C peripheral unit has a different register
9 * layout and extra registers. The ID register in the V2 peripheral
10 * unit on the OMAP4430 reports the same ID as the V1 peripheral
11 * unit on the OMAP3530, so we must inform the driver which IP
12 * version we know it is running on from platform / cpu-specific
13 * code using these constants in the hwmod class definition.
14 */
15
16#define OMAP_I2C_IP_VERSION_1 1
17#define OMAP_I2C_IP_VERSION_2 2
18
19/* struct omap_i2c_bus_platform_data .flags meanings */
20
21#define OMAP_I2C_FLAG_NO_FIFO BIT(0)
22#define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1)
23#define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2)
24#define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5)
25#define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6)
26/* how the CPU address bus must be translated for I2C unit access */
27#define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0
28#define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7)
29#define OMAP_I2C_FLAG_BUS_SHIFT_2 BIT(8)
30#define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7
31
32struct omap_i2c_bus_platform_data {
33 u32 clkrate;
34 u32 rev;
35 u32 flags;
36 void (*set_mpu_wkup_lat)(struct device *dev, long set);
37};
38
39#endif
diff --git a/include/linux/platform_data/i2c-pca-platform.h b/include/linux/platform_data/i2c-pca-platform.h
new file mode 100644
index 000000000000..c37329432a8e
--- /dev/null
+++ b/include/linux/platform_data/i2c-pca-platform.h
@@ -0,0 +1,10 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef I2C_PCA9564_PLATFORM_H
3#define I2C_PCA9564_PLATFORM_H
4
5struct i2c_pca9564_pf_platform_data {
6 int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */
7 int timeout; /* timeout in jiffies */
8};
9
10#endif /* I2C_PCA9564_PLATFORM_H */
diff --git a/include/linux/platform_data/i2c-xiic.h b/include/linux/platform_data/i2c-xiic.h
new file mode 100644
index 000000000000..4f9f2256a97e
--- /dev/null
+++ b/include/linux/platform_data/i2c-xiic.h
@@ -0,0 +1,43 @@
1/*
2 * i2c-xiic.h
3 * Copyright (c) 2009 Intel Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19/* Supports:
20 * Xilinx IIC
21 */
22
23#ifndef _LINUX_I2C_XIIC_H
24#define _LINUX_I2C_XIIC_H
25
26/**
27 * struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver
28 * @num_devices: Number of devices that shall be added when the driver
29 * is probed.
30 * @devices: The actuall devices to add.
31 *
32 * This purpose of this platform data struct is to be able to provide a number
33 * of devices that should be added to the I2C bus. The reason is that sometimes
34 * the I2C board info is not enough, a new PCI board can for instance be
35 * plugged into a standard PC, and the bus number might be unknown at
36 * early init time.
37 */
38struct xiic_i2c_platform_data {
39 u8 num_devices;
40 struct i2c_board_info const *devices;
41};
42
43#endif /* _LINUX_I2C_XIIC_H */
diff --git a/include/linux/platform_data/media/ir-rx51.h b/include/linux/platform_data/media/ir-rx51.h
deleted file mode 100644
index 9d127aa648e7..000000000000
--- a/include/linux/platform_data/media/ir-rx51.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _IR_RX51_H
3#define _IR_RX51_H
4
5struct ir_rx51_platform_data {
6 int(*set_max_mpu_wakeup_lat)(struct device *dev, long t);
7};
8
9#endif
diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h
index 2744cff1b297..19f5cb618c55 100644
--- a/include/linux/platform_data/mlxreg.h
+++ b/include/linux/platform_data/mlxreg.h
@@ -58,11 +58,10 @@ struct mlxreg_hotplug_device {
58 * struct mlxreg_core_data - attributes control data: 58 * struct mlxreg_core_data - attributes control data:
59 * 59 *
60 * @label: attribute label; 60 * @label: attribute label;
61 * @label: attribute register offset;
62 * @reg: attribute register; 61 * @reg: attribute register;
63 * @mask: attribute access mask; 62 * @mask: attribute access mask;
64 * @mode: access mode;
65 * @bit: attribute effective bit; 63 * @bit: attribute effective bit;
64 * @mode: access mode;
66 * @np - pointer to node platform associated with attribute; 65 * @np - pointer to node platform associated with attribute;
67 * @hpdev - hotplug device data; 66 * @hpdev - hotplug device data;
68 * @health_cntr: dynamic device health indication counter; 67 * @health_cntr: dynamic device health indication counter;
diff --git a/include/linux/platform_data/mtd-davinci.h b/include/linux/platform_data/mtd-davinci.h
index f1a2cf655bdb..1bbfa27cccb4 100644
--- a/include/linux/platform_data/mtd-davinci.h
+++ b/include/linux/platform_data/mtd-davinci.h
@@ -56,6 +56,16 @@ struct davinci_nand_pdata { /* platform_data */
56 uint32_t mask_ale; 56 uint32_t mask_ale;
57 uint32_t mask_cle; 57 uint32_t mask_cle;
58 58
59 /*
60 * 0-indexed chip-select number of the asynchronous
61 * interface to which the NAND device has been connected.
62 *
63 * So, if you have NAND connected to CS3 of DA850, you
64 * will pass '1' here. Since the asynchronous interface
65 * on DA850 starts from CS2.
66 */
67 uint32_t core_chipsel;
68
59 /* for packages using two chipselects */ 69 /* for packages using two chipselects */
60 uint32_t mask_chipsel; 70 uint32_t mask_chipsel;
61 71
diff --git a/include/linux/platform_data/sc18is602.h b/include/linux/platform_data/sc18is602.h
index 997b06634152..18602cab7799 100644
--- a/include/linux/platform_data/sc18is602.h
+++ b/include/linux/platform_data/sc18is602.h
@@ -7,7 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * For further information, see the Documentation/spi/sc18is602 file. 10 * For further information, see the Documentation/spi/spi-sc18is602 file.
11 */ 11 */
12 12
13/** 13/**
diff --git a/include/linux/platform_data/shmob_drm.h b/include/linux/platform_data/shmob_drm.h
index 7c686d335c12..ee495d707f17 100644
--- a/include/linux/platform_data/shmob_drm.h
+++ b/include/linux/platform_data/shmob_drm.h
@@ -18,9 +18,6 @@
18 18
19#include <drm/drm_mode.h> 19#include <drm/drm_mode.h>
20 20
21struct sh_mobile_meram_cfg;
22struct sh_mobile_meram_info;
23
24enum shmob_drm_clk_source { 21enum shmob_drm_clk_source {
25 SHMOB_DRM_CLK_BUS, 22 SHMOB_DRM_CLK_BUS,
26 SHMOB_DRM_CLK_PERIPHERAL, 23 SHMOB_DRM_CLK_PERIPHERAL,
@@ -93,7 +90,6 @@ struct shmob_drm_platform_data {
93 struct shmob_drm_interface_data iface; 90 struct shmob_drm_interface_data iface;
94 struct shmob_drm_panel_data panel; 91 struct shmob_drm_panel_data panel;
95 struct shmob_drm_backlight_data backlight; 92 struct shmob_drm_backlight_data backlight;
96 const struct sh_mobile_meram_cfg *meram;
97}; 93};
98 94
99#endif /* __SHMOB_DRM_H__ */ 95#endif /* __SHMOB_DRM_H__ */
diff --git a/include/linux/platform_data/spi-imx.h b/include/linux/platform_data/spi-imx.h
index 6f012fefa1a2..328f670d10bd 100644
--- a/include/linux/platform_data/spi-imx.h
+++ b/include/linux/platform_data/spi-imx.h
@@ -5,24 +5,29 @@
5 5
6/* 6/*
7 * struct spi_imx_master - device.platform_data for SPI controller devices. 7 * struct spi_imx_master - device.platform_data for SPI controller devices.
8 * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio 8 * @chipselect: Array of chipselects for this master or NULL. Numbers >= 0
9 * pins, numbers < 0 mean internal CSPI chipselects according 9 * mean GPIO pins, -ENOENT means internal CSPI chipselect
10 * to MXC_SPI_CS(). Normally you want to use gpio based chip 10 * matching the position in the array. E.g., if chipselect[1] =
11 * selects as the CSPI module tries to be intelligent about 11 * -ENOENT then a SPI slave using chip select 1 will use the
12 * when to assert the chipselect: The CSPI module deasserts the 12 * native SS1 line of the CSPI. Omitting the array will use
13 * chipselect once it runs out of input data. The other problem 13 * all native chip selects.
14 * is that it is not possible to mix between high active and low 14
15 * active chipselects on one single bus using the internal 15 * Normally you want to use gpio based chip selects as the CSPI
16 * chipselects. Unfortunately Freescale decided to put some 16 * module tries to be intelligent about when to assert the
17 * chipselect: The CSPI module deasserts the chipselect once it
18 * runs out of input data. The other problem is that it is not
19 * possible to mix between high active and low active chipselects
20 * on one single bus using the internal chipselects.
21 * Unfortunately, on some SoCs, Freescale decided to put some
17 * chipselects on dedicated pins which are not usable as gpios, 22 * chipselects on dedicated pins which are not usable as gpios,
18 * so we have to support the internal chipselects. 23 * so we have to support the internal chipselects.
19 * @num_chipselect: ARRAY_SIZE(chipselect) 24 *
25 * @num_chipselect: If @chipselect is specified, ARRAY_SIZE(chipselect),
26 * otherwise the number of native chip selects.
20 */ 27 */
21struct spi_imx_master { 28struct spi_imx_master {
22 int *chipselect; 29 int *chipselect;
23 int num_chipselect; 30 int num_chipselect;
24}; 31};
25 32
26#define MXC_SPI_CS(no) ((no) - 32)
27
28#endif /* __MACH_SPI_H_*/ 33#endif /* __MACH_SPI_H_*/
diff --git a/include/linux/platform_data/ti-aemif.h b/include/linux/platform_data/ti-aemif.h
index ac72e115093c..e6407bafcbf8 100644
--- a/include/linux/platform_data/ti-aemif.h
+++ b/include/linux/platform_data/ti-aemif.h
@@ -16,8 +16,33 @@
16 16
17#include <linux/of_platform.h> 17#include <linux/of_platform.h>
18 18
19/**
20 * struct aemif_abus_data - Async bus configuration parameters.
21 *
22 * @cs - Chip-select number.
23 */
24struct aemif_abus_data {
25 u32 cs;
26};
27
28/**
29 * struct aemif_platform_data - Data to set up the TI aemif driver.
30 *
31 * @dev_lookup: of_dev_auxdata passed to of_platform_populate() for aemif
32 * subdevices.
33 * @cs_offset: Lowest allowed chip-select number.
34 * @abus_data: Array of async bus configuration entries.
35 * @num_abus_data: Number of abus entries.
36 * @sub_devices: Array of platform subdevices.
37 * @num_sub_devices: Number of subdevices.
38 */
19struct aemif_platform_data { 39struct aemif_platform_data {
20 struct of_dev_auxdata *dev_lookup; 40 struct of_dev_auxdata *dev_lookup;
41 u32 cs_offset;
42 struct aemif_abus_data *abus_data;
43 size_t num_abus_data;
44 struct platform_device *sub_devices;
45 size_t num_sub_devices;
21}; 46};
22 47
23#endif /* __TI_DAVINCI_AEMIF_DATA_H__ */ 48#endif /* __TI_DAVINCI_AEMIF_DATA_H__ */
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 80ce28d40832..990aad477458 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -45,6 +45,7 @@ struct sysc_regbits {
45 s8 emufree_shift; 45 s8 emufree_shift;
46}; 46};
47 47
48#define SYSC_QUIRK_RESOURCE_PROVIDER BIT(9)
48#define SYSC_QUIRK_LEGACY_IDLE BIT(8) 49#define SYSC_QUIRK_LEGACY_IDLE BIT(8)
49#define SYSC_QUIRK_RESET_STATUS BIT(7) 50#define SYSC_QUIRK_RESET_STATUS BIT(7)
50#define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6) 51#define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6)
diff --git a/include/linux/platform_data/tsl2772.h b/include/linux/platform_data/tsl2772.h
new file mode 100644
index 000000000000..f8ade15a35e2
--- /dev/null
+++ b/include/linux/platform_data/tsl2772.h
@@ -0,0 +1,101 @@
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Device driver for monitoring ambient light intensity (lux)
4 * and proximity (prox) within the TAOS TSL2772 family of devices.
5 *
6 * Copyright (c) 2012, TAOS Corporation.
7 * Copyright (c) 2017-2018 Brian Masney <masneyb@onstation.org>
8 */
9
10#ifndef __TSL2772_H
11#define __TSL2772_H
12
13struct tsl2772_lux {
14 unsigned int ch0;
15 unsigned int ch1;
16};
17
18/* Max number of segments allowable in LUX table */
19#define TSL2772_MAX_LUX_TABLE_SIZE 6
20/* The default LUX tables all have 3 elements. */
21#define TSL2772_DEF_LUX_TABLE_SZ 3
22#define TSL2772_DEFAULT_TABLE_BYTES (sizeof(struct tsl2772_lux) * \
23 TSL2772_DEF_LUX_TABLE_SZ)
24
25/* Proximity diode to use */
26#define TSL2772_DIODE0 0x01
27#define TSL2772_DIODE1 0x02
28#define TSL2772_DIODE_BOTH 0x03
29
30/* LED Power */
31#define TSL2772_100_mA 0x00
32#define TSL2772_50_mA 0x01
33#define TSL2772_25_mA 0x02
34#define TSL2772_13_mA 0x03
35
36/**
37 * struct tsl2772_settings - Settings for the tsl2772 driver
38 * @als_time: Integration time of the ALS channel ADCs in 2.73 ms
39 * increments. Total integration time is
40 * (256 - als_time) * 2.73.
41 * @als_gain: Index into the tsl2772_als_gain array.
42 * @als_gain_trim: Default gain trim to account for aperture effects.
43 * @wait_time: Time between proximity and ALS cycles in 2.73
44 * periods.
45 * @prox_time: Integration time of the proximity ADC in 2.73 ms
46 * increments. Total integration time is
47 * (256 - prx_time) * 2.73.
48 * @prox_gain: Index into the tsl2772_prx_gain array.
49 * @als_prox_config: The value of the ALS / Proximity configuration
50 * register.
51 * @als_cal_target: Known external ALS reading for calibration.
52 * @als_persistence: H/W Filters, Number of 'out of limits' ALS readings.
53 * @als_interrupt_en: Enable/Disable ALS interrupts
54 * @als_thresh_low: CH0 'low' count to trigger interrupt.
55 * @als_thresh_high: CH0 'high' count to trigger interrupt.
56 * @prox_persistence: H/W Filters, Number of 'out of limits' proximity
57 * readings.
58 * @prox_interrupt_en: Enable/Disable proximity interrupts.
59 * @prox_thres_low: Low threshold proximity detection.
60 * @prox_thres_high: High threshold proximity detection.
61 * @prox_pulse_count: Number if proximity emitter pulses.
62 * @prox_max_samples_cal: The number of samples that are taken when performing
63 * a proximity calibration.
64 * @prox_diode Which diode(s) to use for driving the external
65 * LED(s) for proximity sensing.
66 * @prox_power The amount of power to use for the external LED(s).
67 */
68struct tsl2772_settings {
69 int als_time;
70 int als_gain;
71 int als_gain_trim;
72 int wait_time;
73 int prox_time;
74 int prox_gain;
75 int als_prox_config;
76 int als_cal_target;
77 u8 als_persistence;
78 bool als_interrupt_en;
79 int als_thresh_low;
80 int als_thresh_high;
81 u8 prox_persistence;
82 bool prox_interrupt_en;
83 int prox_thres_low;
84 int prox_thres_high;
85 int prox_pulse_count;
86 int prox_max_samples_cal;
87 int prox_diode;
88 int prox_power;
89};
90
91/**
92 * struct tsl2772_platform_data - Platform callback, glass and defaults
93 * @platform_lux_table: Device specific glass coefficents
94 * @platform_default_settings: Device specific power on defaults
95 */
96struct tsl2772_platform_data {
97 struct tsl2772_lux platform_lux_table[TSL2772_MAX_LUX_TABLE_SIZE];
98 struct tsl2772_settings *platform_default_settings;
99};
100
101#endif /* __TSL2772_H */