Home
last modified time | relevance | path

Searched full:als (Results 1 – 25 of 103) sorted by relevance

12345

/linux/drivers/iio/light/
H A Dlm3533-als.c3 * lm3533-als.c -- LM3533 Ambient Light Sensor driver
65 struct lm3533_als *als = iio_priv(indio_dev); in lm3533_als_get_adc() local
75 ret = lm3533_read(als->lm3533, reg, &val); in lm3533_als_get_adc()
88 struct lm3533_als *als = iio_priv(indio_dev); in _lm3533_als_get_zone() local
92 ret = lm3533_read(als->lm3533, LM3533_REG_ALS_ZONE_INFO, &val); in _lm3533_als_get_zone()
106 struct lm3533_als *als = iio_priv(indio_dev); in lm3533_als_get_zone() local
109 if (test_bit(LM3533_ALS_FLAG_INT_ENABLED, &als->flags)) { in lm3533_als_get_zone()
110 *zone = atomic_read(&als->zone); in lm3533_als_get_zone()
132 struct lm3533_als *als = iio_priv(indio_dev); in lm3533_als_get_target() local
143 ret = lm3533_read(als->lm3533, reg, val); in lm3533_als_get_target()
[all …]
H A Dacpi-als.c5 * Based on ALS driver:
28 #define ACPI_ALS_CLASS "als"
29 #define ACPI_ALS_DEVICE_NAME "acpi-als"
85 static int acpi_als_read_value(struct acpi_als *als, char *prop, s32 *val) in acpi_als_read_value() argument
90 status = acpi_evaluate_integer(als->device->handle, prop, NULL, in acpi_als_read_value()
94 acpi_evaluation_failure_warn(als->device->handle, prop, status); in acpi_als_read_value()
106 struct acpi_als *als = iio_priv(indio_dev); in acpi_als_notify() local
111 iio_trigger_poll_nested(als->trig); in acpi_als_notify()
116 "Unhandled ACPI ALS event (%08x)!\n", in acpi_als_notify()
126 struct acpi_als *als = iio_priv(indio_dev); in acpi_als_read_raw() local
[all …]
H A DKconfig21 be called acpi-als.
89 tristate "Avago APDS9960 gesture/RGB/ALS/proximity sensor"
96 APDS9960 gesture/RGB/ALS/proximity sensor.
213 tristate "Sharp GP2AP002 Proximity/ALS sensor"
217 Say Y here if you have a Sharp GP2AP002 proximity/ALS combo-chip
224 tristate "Sharp GP2AP020A00F Proximity/ALS sensor"
231 Say Y here if you have a Sharp GP2AP020A00F proximity/ALS combo-chip
245 will be called iqs621-als.
265 This driver supports the sysfs interface to get the ALS, IR intensity,
288 the readouts via standard IIO sysfs and device interface. Both ALS
[all …]
H A Dhid-sensor-als.c30 struct hid_sensor_hub_attribute_info als[CHANNEL_SCAN_INDEX_MAX]; member
151 report_id = als_state->als[chan->scan_index].report_id; in als_read_raw()
152 min = als_state->als[chan->scan_index].logical_minimum; in als_read_raw()
156 report_id = als_state->als[chan->scan_index].report_id; in als_read_raw()
157 min = als_state->als[chan->scan_index].logical_minimum; in als_read_raw()
161 report_id = als_state->als[chan->scan_index].report_id; in als_read_raw()
162 min = als_state->als[chan->scan_index].logical_minimum; in als_read_raw()
166 report_id = als_state->als[chan->scan_index].report_id; in als_read_raw()
167 min = als_state->als[chan->scan_index].logical_minimum; in als_read_raw()
331 &st->als[i]); in als_parse_report()
[all …]
H A Dveml6030.c65 * Scale is 1/gain. Value 0.125 is ALS gain x (1/8), 0.25 is
66 * ALS gain x (1/4), 1.0 = ALS gain x 1 and 2.0 is ALS gain x 2.
108 "can't read als conf register %d\n", ret); in in_illuminance_period_available_show()
222 "can't read als conf register %d\n", ret); in veml6030_get_intgrn_tm()
295 "can't update als integration time %d\n", ret); in veml6030_set_intgrn_tm()
327 "can't read als conf register %d\n", ret); in veml6030_read_persistence()
400 "can't set als gain %d\n", ret); in veml6030_set_als_gain()
428 "can't read als conf register %d\n", ret); in veml6030_get_als_gain()
468 "can't read als threshold value %d\n", ret); in veml6030_read_thresh()
520 dev_err(dev, "can't read als data %d\n", ret); in veml6030_read_raw()
[all …]
H A Dgp2ap020a00f.c59 #define GP2AP020A00F_ALS_REG 0x01 /* ALS related settings */
62 #define GP2AP020A00F_TL_L_REG 0x04 /* ALS: Threshold low LSB */
63 #define GP2AP020A00F_TL_H_REG 0x05 /* ALS: Threshold low MSB */
64 #define GP2AP020A00F_TH_L_REG 0x06 /* ALS: Threshold high LSB */
65 #define GP2AP020A00F_TH_H_REG 0x07 /* ALS: Threshold high MSB */
70 #define GP2AP020A00F_D0_L_REG 0x0c /* ALS result: Clear/Illuminance LSB */
71 #define GP2AP020A00F_D0_H_REG 0x0d /* ALS result: Clear/Illuminance MSB */
72 #define GP2AP020A00F_D1_L_REG 0x0e /* ALS result: IR LSB */
73 #define GP2AP020A00F_D1_H_REG 0x0f /* ALS result: IR LSB */
94 #define GP2AP020A00F_FLAG_A 0x02 /* ALS: interrupt result */
[all …]
H A Dtsl2591.c136 /* TSL2591 delay period between polls when checking for ALS valid flag */
174 * Period table is ALS persist cycle x integration time setting
176 * ALS cycles: 1, 2, 3, 5, 10, 20, 25, 30, 35, 40, 45, 50, 55, 60
400 * Sleep for ALS integration time to allow enough time or an ADC read in tsl2591_wait_adc_complete()
401 * cycle to complete. Check status after delay for ALS valid. in tsl2591_wait_adc_complete()
405 /* Check for status ALS valid flag for up to 100ms */ in tsl2591_wait_adc_complete()
411 dev_err(&client->dev, "Timed out waiting for valid ALS data\n"); in tsl2591_wait_adc_complete()
512 dev_err(&client->dev, "Failed to set als gain & int time\n"); in tsl2591_set_als_gain_int_time()
546 dev_err(&client->dev, "Failed to set als lower threshold\n"); in tsl2591_set_als_lower_threshold()
554 dev_err(&client->dev, "Failed to set als lower threshold\n"); in tsl2591_set_als_lower_threshold()
[all …]
H A DMakefile7 obj-$(CONFIG_ACPI_ALS) += acpi-als.o
27 obj-$(CONFIG_HID_SENSOR_ALS) += hid-sensor-als.o
29 obj-$(CONFIG_IQS621_ALS) += iqs621-als.o
35 obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
H A Dvcnl4035.c166 * Values are proportional, so ALS INT is selected for input due to
170 * Raw value needs to be scaled using ALS steps
429 /* ALS white channel enable */ in vcnl4035_init()
439 /* set default integration time - 100 ms for ALS */ in vcnl4035_init()
444 dev_err(&data->client->dev, "set default ALS IT returned %d\n", in vcnl4035_init()
450 /* set default persistence time - 1 for ALS */ in vcnl4035_init()
461 /* set default HIGH threshold for ALS */ in vcnl4035_init()
471 /* set default LOW threshold for ALS */ in vcnl4035_init()
646 /* wait for 1 ALS integration cycle */ in vcnl4035_runtime_resume()
H A Djsa1212.c92 /* JSA1212 ALS RNG REG bits */
120 bool als_en; /* ALS enable status */
125 /* ALS range idx to val mapping */
129 /* Enables or disables ALS function based on status */
177 dev_err(&data->client->dev, "als data read err\n"); in jsa1212_read_als_data()
406 dev_err(dev, "als resume failed\n"); in jsa1212_resume()
H A Dapds9960.c3 * apds9960.c - Support for Avago APDS9960 gesture/RGB/ALS/proximity sensor
171 /* Default ALS integration time = 2.48ms */
320 /* ALS */
548 /* RGB + ALS sensors only have integration time */ in apds9960_read_raw()
596 /* RGB + ALS sensors only have int time */ in apds9960_write_raw()
931 dev_err(dev, "INT ALS reg field init failed\n"); in apds9960_regfield_init()
952 dev_err(dev, "Enable ALS reg field init failed\n"); in apds9960_regfield_init()
977 /* Default IT for ALS of 28 ms */ in apds9960_chip_init()
1002 /* Ensure ALS interrupt is OFF */ in apds9960_chip_init()
1007 /* Enable ALS sensor for polling */ in apds9960_chip_init()
[all …]
H A Dvl6180.c3 * vl6180.c - Support for STMicroelectronics VL6180 ALS, range and proximity
12 * ALS: < 1 Lux up to 100 kLux
315 /* one ALS count is 0.32 Lux @ gain 1, IT 100 ms */ in vl6180_read_raw()
470 /* Enable ALS and Range ready interrupts */ in vl6180_init()
476 /* ALS integration time: 100ms */ in vl6180_init()
482 /* ALS gain: 1 */ in vl6180_init()
548 MODULE_DESCRIPTION("STMicro VL6180 ALS, range and proximity sensor driver");
H A Dltr390.c3 * IIO driver for Lite-On LTR390 ALS and UV sensor
17 * - Add support for reading the ALS
212 /* ALS sensor */
339 /* default mode for ltr390 is ALS mode */ in ltr390_probe()
394 MODULE_DESCRIPTION("Lite-On LTR390 ALS and UV sensor Driver");
/linux/drivers/leds/
H A Dleds-lm3532.c99 * @config: value of ALS configuration register
102 * @als_avrg_time: ALS averaging time
103 * @als_input_mode: ALS input mode for brightness control
104 * @als_vmin: Minimum ALS voltage
105 * @als_vmax: Maximum ALS voltage
106 * @zone_lo: values of ALS lo ZB(Zone Boundary) registers
107 * @zone_hi: values of ALS hi ZB(Zone Boundary) registers
154 * @als_data: Pointer to the als data struct
449 struct lm3532_als_data *als = priv->als_data; in lm3532_als_configure() local
455 als_vmin = als->als_vmin; in lm3532_als_configure()
[all …]
H A Dleds-lm3530.c54 /* ALS Config Register Options */
65 /* ALS Resistor Select */
91 { "als", LM3530_BL_MODE_ALS },
100 * @mode: mode of operation - manual, ALS, PWM
117 * @config : value of ALS configuration register
118 * @imp_sel : value of ALS resistor select register
119 * @zone : values of ALS ZB(Zone Boundary) registers
156 struct lm3530_als_data *als) in lm3530_als_configure() argument
176 als->zones[i] = (((als_vmin + LM3530_ALS_OFFSET_mV) + in lm3530_als_configure()
179 als->config = in lm3530_als_configure()
[all …]
/linux/Documentation/devicetree/bindings/leds/
H A Dleds-lm3532.txt31 Optional properties if ALS mode is used:
32 - ti,als-vmin - Minimum ALS voltage defined in Volts
33 - ti,als-vmax - Maximum ALS voltage defined in Volts
34 Per the data sheet the max ALS voltage is 2V and the min is 0V
41 - ti,als-avrg-time-us - Determines the length of time the device needs to
42 average the two ALS inputs. This is only used if
45 - ti,als-input-mode - Determines how the device uses the attached ALS
56 if the LED strings are controlled by the ALS.
59 0x01 - LED strings are ALS controlled
80 ti,als-vmin = <0>;
[all …]
/linux/include/linux/
H A Dled-lm3530.h24 #define LM3530_ALS_AVRG_TIME_32ms (0) /* ALS Averaging Time */
42 /* ALS Resistor Select */
43 #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedance */
62 LM3530_BL_MODE_ALS, /* "als" */
66 /* ALS input select */
82 * @mode: mode of operation i.e. Manual, ALS or PWM
83 * @als_input_mode: select source of ALS input - ALS1/2 or average
86 * @als_avrg_time: ALS input averaging time
92 * @als_vmin: als input voltage calibrated for max brightness in mV
93 * @als_vmax: als input voltage calibrated for min brightness in mV
/linux/arch/s390/boot/
H A Dals.c12 static unsigned long als[] = { FACILITIES_ALS }; variable
36 for (i = 0; i < ARRAY_SIZE(als); i++) { in print_missing_facilities()
37 val = ~stfle_fac_list[i] & als[i]; in print_missing_facilities()
77 for (i = 0; i < ARRAY_SIZE(als); i++) { in verify_facilities()
78 if ((stfle_fac_list[i] & als[i]) != als[i]) in verify_facilities()
/linux/include/linux/platform_data/
H A Dtsl2772.h38 * @als_time: Integration time of the ALS channel ADCs in 2.73 ms
43 * @wait_time: Time between proximity and ALS cycles in 2.73
49 * @als_prox_config: The value of the ALS / Proximity configuration
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
/linux/Documentation/misc-devices/
H A Dbh1770glc.rst21 ALS and proximity parts operates on their own, but they shares common I2C
23 but ALS side results are used to estimate reliability of the proximity sensor.
25 ALS produces 16 bit lux values. The chip contains interrupt logic to produce
30 8 bit. Driver supports only one channel. Driver uses ALS results to estimate
31 reliability of the proximity results. Thus ALS is always running while
H A Dapds990x.rst19 APDS990x is a combined ambient light and proximity sensor. ALS and proximity
20 functionality are highly connected. ALS measurement path must be running
23 ALS produces raw measurement values for two channels: Clear channel
34 ALS contains 4 different gain steps. Driver automatically
/linux/drivers/misc/
H A Dbh1770glc.c24 #define BH1770_ALS_CONTROL 0x80 /* ALS operation mode control */
30 #define BH1770_ALS_MEAS_RATE 0x86 /* ALS meas. rate at stand alone mode */
33 #define BH1770_ALS_DATA_0 0x8c /* ALS DATA low byte */
34 #define BH1770_ALS_DATA_1 0x8d /* ALS DATA high byte */
43 #define BH1770_ALS_TH_UP_0 0x96 /* ALS upper threshold low byte */
44 #define BH1770_ALS_TH_UP_1 0x97 /* ALS upper threshold high byte */
45 #define BH1770_ALS_TH_LOW_0 0x98 /* ALS lower threshold low byte */
46 #define BH1770_ALS_TH_LOW_1 0x99 /* ALS lower threshold high byte */
397 * ALS is started always since proximity needs als results in bh1770_chip_on()
399 * Let's assume dark until the first ALS measurement is ready. in bh1770_chip_on()
[all …]
H A Dapds990x.c25 #define APDS990X_ATIME 0x01 /* ALS ADC time */
28 #define APDS990X_AILTL 0x04 /* ALS interrupt low threshold low byte */
29 #define APDS990X_AILTH 0x05 /* ALS interrupt low threshold hi byte */
30 #define APDS990X_AIHTL 0x06 /* ALS interrupt hi threshold low byte */
31 #define APDS990X_AIHTH 0x07 /* ALS interrupt hi threshold hi byte */
126 u16 atime; /* als integration time */
127 u16 arate; /* als reporting rate */
176 static const u8 again[] = {1, 8, 16, 120}; /* ALS gain steps */
238 /* ALS is mandatory, proximity optional */ in apds990x_mode_on()
362 /* This will force ALS interrupt after the next measurement. */ in apds990x_force_a_refresh()
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-class-backlight-driver-lm35336 Get the ALS output channel used as input in
7 ALS-current-control mode (0, 1), where:
19 Enable ALS-current-control mode (0, 1).
H A Dsysfs-class-led-driver-lm35336 Set the ALS output channel to use as input in
7 ALS-current-control mode (1, 2), where:
19 Enable ALS-current-control mode (0, 1).

12345