| /linux/drivers/media/i2c/ccs/ |
| H A D | ccs-core.c | 13 * Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com> 93 static int ccs_limit_ptr(struct ccs_sensor *sensor, unsigned int limit, in ccs_limit_ptr() argument 103 if (WARN_ON(!sensor->ccs_limits) || in ccs_limit_ptr() 108 *__ptr = sensor->ccs_limits + ccs_limit_offsets[limit].lim + offset; in ccs_limit_ptr() 113 void ccs_replace_limit(struct ccs_sensor *sensor, in ccs_replace_limit() argument 116 struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd); in ccs_replace_limit() 121 ret = ccs_limit_ptr(sensor, limit, offset, &ptr); in ccs_replace_limit() 133 u32 ccs_get_limit(struct ccs_sensor *sensor, unsigned int limit, in ccs_get_limit() argument 140 ret = ccs_limit_ptr(sensor, limit, offset, &ptr); in ccs_get_limit() 159 return ccs_reg_conv(sensor, ccs_limits[limit].reg, val); in ccs_get_limit() [all …]
|
| H A D | ccs-quirk.h | 20 * @limits: Replace sensor->limits with values which can't be read from 21 * sensor registers. Called the first time the sensor is powered up. 22 * @post_poweron: Called always after the sensor has been fully powered on. 27 * also appropriate for adding sensor specific controls, for instance. 41 int (*limits)(struct ccs_sensor *sensor); 42 int (*post_poweron)(struct ccs_sensor *sensor); 43 int (*pre_streamon)(struct ccs_sensor *sensor); 44 int (*post_streamoff)(struct ccs_sensor *sensor); 45 unsigned long (*pll_flags)(struct ccs_sensor *sensor); 46 int (*init)(struct ccs_sensor *sensor); [all …]
|
| /linux/drivers/thermal/st/ |
| H A D | st_thermal.c | 3 * ST Thermal Sensor Driver core routines 24 static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) in st_thermal_alloc_regfields() argument 26 struct device *dev = sensor->dev; in st_thermal_alloc_regfields() 27 struct regmap *regmap = sensor->regmap; in st_thermal_alloc_regfields() 28 const struct reg_field *reg_fields = sensor->cdata->reg_fields; in st_thermal_alloc_regfields() 30 sensor->dcorrect = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 33 sensor->overflow = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 36 sensor->temp_data = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 39 if (IS_ERR(sensor->dcorrect) || in st_thermal_alloc_regfields() 40 IS_ERR(sensor->overflow) || in st_thermal_alloc_regfields() [all …]
|
| /linux/drivers/media/i2c/ |
| H A D | ov2680.c | 3 * Omnivision OV2680 CMOS Image Sensor driver 7 * Based on OV5640 Sensor Driver 204 /* Sensor control register tweaks */ 271 static void ov2680_power_up(struct ov2680_dev *sensor) in ov2680_power_up() argument 273 if (!sensor->pwdn_gpio) in ov2680_power_up() 276 gpiod_set_value(sensor->pwdn_gpio, 0); in ov2680_power_up() 280 static void ov2680_power_down(struct ov2680_dev *sensor) in ov2680_power_down() argument 282 if (!sensor->pwdn_gpio) in ov2680_power_down() 285 gpiod_set_value(sensor->pwdn_gpio, 1); in ov2680_power_down() 289 static void ov2680_set_bayer_order(struct ov2680_dev *sensor, in ov2680_set_bayer_order() argument [all …]
|
| H A D | t4ka3.c | 3 * Support for T4KA3 8M camera sensor. 140 struct mutex lock; /* serialize sensor's ioctl */ 287 static void t4ka3_set_bayer_order(struct t4ka3_data *sensor, in t4ka3_set_bayer_order() argument 292 if (sensor->ctrls.vflip && sensor->ctrls.vflip->val) in t4ka3_set_bayer_order() 295 if (sensor->ctrls.hflip && sensor->ctrls.hflip->val) in t4ka3_set_bayer_order() 301 static int t4ka3_update_exposure_range(struct t4ka3_data *sensor, in t4ka3_update_exposure_range() argument 304 int exp_max = fmt->height + sensor->ctrls.vblank->val - in t4ka3_update_exposure_range() 307 return __v4l2_ctrl_modify_range(sensor->ctrls.exposure, 0, exp_max, in t4ka3_update_exposure_range() 311 static void t4ka3_fill_format(struct t4ka3_data *sensor, in t4ka3_fill_format() argument 320 t4ka3_set_bayer_order(sensor, fmt); in t4ka3_fill_format() [all …]
|
| H A D | ov5640.c | 480 static inline bool ov5640_is_csi2(const struct ov5640_dev *sensor) in ov5640_is_csi2() argument 482 return sensor->ep.bus_type == V4L2_MBUS_CSI2_DPHY; in ov5640_is_csi2() 486 ov5640_formats(struct ov5640_dev *sensor) in ov5640_formats() argument 488 return ov5640_is_csi2(sensor) ? ov5640_csi2_formats in ov5640_formats() 493 ov5640_code_to_pixfmt(struct ov5640_dev *sensor, u32 code) in ov5640_code_to_pixfmt() argument 495 const struct ov5640_pixfmt *formats = ov5640_formats(sensor); in ov5640_code_to_pixfmt() 506 static u32 ov5640_code_to_bpp(struct ov5640_dev *sensor, u32 code) in ov5640_code_to_bpp() argument 508 const struct ov5640_pixfmt *format = ov5640_code_to_pixfmt(sensor, in ov5640_code_to_bpp() 1140 ov5640_timings(const struct ov5640_dev *sensor, in ov5640_timings() argument 1143 if (ov5640_is_csi2(sensor)) in ov5640_timings() [all …]
|
| H A D | mt9m114.c | 3 * mt9m114.c onsemi MT9M114 sensor driver 57 /* Sensor Core registers */ 485 mt9m114_default_format_info(struct mt9m114 *sensor) in mt9m114_default_format_info() argument 487 if (sensor->bus_cfg.bus_type == V4L2_MBUS_CSI2_DPHY) in mt9m114_default_format_info() 494 mt9m114_format_info(struct mt9m114 *sensor, unsigned int pad, u32 code) in mt9m114_format_info() argument 505 if (sensor->bus_cfg.bus_type == V4L2_MBUS_CSI2_DPHY) in mt9m114_format_info() 518 return mt9m114_default_format_info(sensor); in mt9m114_format_info() 534 /* Sensor optimization */ 666 static int mt9m114_poll_command(struct mt9m114 *sensor, u32 command) in mt9m114_poll_command() argument 673 ret = cci_read(sensor->regmap, MT9M114_COMMAND_REGISTER, &value, in mt9m114_poll_command() [all …]
|
| H A D | ov8865.c | 808 /* Sensor */ 885 /* Sensor */ 1218 /* Sensor */ 1347 static int ov8865_read(struct ov8865_sensor *sensor, u16 address, u8 *value) in ov8865_read() argument 1350 struct i2c_client *client = sensor->i2c_client; in ov8865_read() 1370 static int ov8865_write(struct ov8865_sensor *sensor, u16 address, u8 value) in ov8865_write() argument 1373 struct i2c_client *client = sensor->i2c_client; in ov8865_write() 1386 static int ov8865_write_sequence(struct ov8865_sensor *sensor, in ov8865_write_sequence() argument 1394 ret = ov8865_write(sensor, sequence[i].address, in ov8865_write_sequence() 1406 static int ov8865_update_bits(struct ov8865_sensor *sensor, u16 address, in ov8865_update_bits() argument [all …]
|
| /linux/drivers/iio/light/ |
| H A D | Kconfig | 11 tristate "ACPI Ambient Light Sensor" 18 Ambient Light Sensor. 24 tristate "ADJD-S311-CR999 digital color sensor" 30 digital color light sensor. 36 tristate "ADUX1020 photometric sensor" 41 ADUX1020 photometric sensor. 47 tristate "AL3000a ambient light sensor" 52 ambient light sensor. 58 tristate "AL3010 ambient light sensor" 63 ambient light sensor. [all …]
|
| /linux/drivers/hid/amd-sfh-hid/hid_descriptor/ |
| H A D | amd_sfh_hid_report_desc.h | 13 // Accelerometer 3D Sensor 21 0x05, 0x20, /* HID usage page sensor */ 22 0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ 28 0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel*/ 29 0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ 30 0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ 33 0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ 39 0x0A, 0x40, 0x08, /* Sensor property report state no events sel */ 40 0x0A, 0x41, 0x08, /* Sensor property report state all events sel */ 41 0x0A, 0x42, 0x08, /* Sensor property report state threshold events sel */ [all …]
|
| /linux/drivers/input/rmi4/ |
| H A D | rmi_f12.c | 32 struct rmi_2d_sensor sensor; member 97 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_read_sensor_tuning() local 98 struct rmi_function *fn = sensor->fn; in rmi_f12_read_sensor_tuning() 113 "F12 does not have the sensor tuning control register\n"); in rmi_f12_read_sensor_tuning() 133 sensor->max_x = get_unaligned_le16(&buf[offset]); in rmi_f12_read_sensor_tuning() 134 sensor->max_y = get_unaligned_le16(&buf[offset + 2]); in rmi_f12_read_sensor_tuning() 139 sensor->max_x, sensor->max_y); in rmi_f12_read_sensor_tuning() 148 /* Units 1/128 sensor pitch */ in rmi_f12_read_sensor_tuning() 159 if (sensor->x_mm && sensor->y_mm) in rmi_f12_read_sensor_tuning() 178 if (!sensor->x_mm) in rmi_f12_read_sensor_tuning() [all …]
|
| H A D | rmi_f11.c | 36 * The properties for a given sensor are described by its query registers. The 38 * the F11 device queries as well as the sensor query information. 40 * Similarly, each sensor has control registers that govern its behavior. The 41 * size and layout of the control registers for a given sensor can be determined 44 * And in a likewise fashion, each sensor has data registers where it reports 49 * registers in order to determine the attributes of a sensor. Then 51 * registers for sensor. 66 * Writing this to the F11 command register will cause the sensor to 181 * struct f11_2d_sensor_queries - describes sensor capabilities 185 * @nr_fingers: describes the maximum number of fingers the 2-D sensor [all …]
|
| /linux/drivers/hwmon/ |
| H A D | scpi-hwmon.c | 3 * System Control and Power Interface(SCPI) based hwmon sensor driver 57 static void scpi_scale_reading(u64 *value, struct sensor_data *sensor) in scpi_scale_reading() argument 59 if (scpi_scale[sensor->info.class] != sensor->scale) { in scpi_scale_reading() 60 *value *= scpi_scale[sensor->info.class]; in scpi_scale_reading() 61 do_div(*value, sensor->scale); in scpi_scale_reading() 70 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; in scpi_read_temp() local 74 ret = scpi_ops->sensor_get_value(sensor->info.sensor_id, &value); in scpi_read_temp() 78 scpi_scale_reading(&value, sensor); in scpi_read_temp() 90 struct sensor_data *sensor; in scpi_show_sensor() local 94 sensor = container_of(attr, struct sensor_data, dev_attr_input); in scpi_show_sensor() [all …]
|
| /linux/drivers/iio/chemical/ |
| H A D | Kconfig | 9 tristate "Aosong AGS02MA TVOC sensor driver" 14 Organic Compounds) sensor. 29 * pH SM sensor 30 * EC SM sensor 31 * ORP SM sensor 34 module will be called atlas-ph-sensor. 42 * CO2 EZO Sensor 45 module will be called atlas-ezo-sensor. 48 tristate "Bosch Sensortec BME680 sensor driver" 56 Say yes here to build support for Bosch Sensortec BME680 sensor with [all …]
|
| /linux/drivers/iio/proximity/ |
| H A D | Kconfig | 9 tristate "AS3935 Franklin lightning sensor" 15 Microsystems AS3935 lightning detection sensor. 25 tristate "ChromeOS EC MKBP Proximity sensor" 28 Say Y here to enable the proximity sensor implemented via the ChromeOS EC MKBP 36 tristate "Nicera (Nippon Ceramic Co.) D3-323-AA PIR sensor" 39 Say Y here to build a driver for the Nicera D3-323-AA PIR sensor. 45 tristate "TYHX HX9023S SAR sensor" 51 Say Y here to build a driver for TYHX HX9023S capacitive SAR sensor. 59 tristate "Murata IRS-D200 PIR sensor" 65 Say Y here to build a driver for the Murata IRS-D200 PIR sensor. [all …]
|
| /linux/Documentation/hwmon/ |
| H A D | occ.rst | 16 sensor data from the processor and the system. The OCC can provide the raw 17 sensor data as well as perform thermal and power management on the system. 32 The OCC sensor ID is an integer that represents the unique identifier of the 33 sensor with respect to the OCC. For example, a temperature sensor for the third 34 DIMM slot in the system may have a sensor ID of 7. This mapping is unavailable 35 to the device driver, which must therefore export the sensor ID as-is. 37 Some entries are only present with certain OCC sensor versions or only on 42 OCC sensor ID. 44 [with temperature sensor version 1] 50 [with temperature sensor version >= 2] [all …]
|
| /linux/drivers/iio/imu/st_lsm6dsx/ |
| H A D | st_lsm6dsx_shub.c | 5 * slave devices using accelerometer sensor as trigger for i2c 158 struct st_lsm6dsx_sensor *sensor; in st_lsm6dsx_shub_wait_complete() local 161 sensor = iio_priv(hw->iio_devs[ST_LSM6DSX_ID_ACC]); in st_lsm6dsx_shub_wait_complete() 162 odr = (hw->enable_mask & BIT(ST_LSM6DSX_ID_ACC)) ? sensor->odr : 12500; in st_lsm6dsx_shub_wait_complete() 242 static int st_lsm6dsx_shub_master_enable(struct st_lsm6dsx_sensor *sensor, in st_lsm6dsx_shub_master_enable() argument 246 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_shub_master_enable() 250 /* enable acc sensor as trigger */ in st_lsm6dsx_shub_master_enable() 251 err = st_lsm6dsx_sensor_set_enable(sensor, enable); in st_lsm6dsx_shub_master_enable() 283 st_lsm6dsx_shub_read(struct st_lsm6dsx_sensor *sensor, u8 addr, in st_lsm6dsx_shub_read() argument 288 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_shub_read() [all …]
|
| /linux/drivers/thermal/ |
| H A D | thermal_mmio.c | 26 struct thermal_mmio *sensor = thermal_zone_device_priv(tz); in thermal_mmio_get_temperature() local 28 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature() 29 t *= sensor->factor; in thermal_mmio_get_temperature() 42 struct thermal_mmio *sensor; in thermal_mmio_probe() local 44 struct thermal_mmio *sensor); in thermal_mmio_probe() 49 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe() 50 if (!sensor) in thermal_mmio_probe() 53 sensor->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in thermal_mmio_probe() 54 if (IS_ERR(sensor->mmio_base)) in thermal_mmio_probe() 55 return PTR_ERR(sensor->mmio_base); in thermal_mmio_probe() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/ |
| H A D | base.c | 70 return nvkm_iccsense_poll_lane(rail->sensor->i2c, rail->sensor->addr, in nvkm_iccsense_ina2x9_read() 93 return nvkm_iccsense_poll_lane(rail->sensor->i2c, rail->sensor->addr, in nvkm_iccsense_ina3221_read() 101 struct nvkm_iccsense_sensor *sensor) in nvkm_iccsense_sensor_config() argument 104 nvkm_trace(subdev, "write config of extdev %i: 0x%04x\n", sensor->id, sensor->config); in nvkm_iccsense_sensor_config() 105 nv_wr16i2cr(sensor->i2c, sensor->addr, 0x00, sensor->config); in nvkm_iccsense_sensor_config() 134 struct nvkm_iccsense_sensor *sensor, *tmps; in nvkm_iccsense_dtor() local 137 list_for_each_entry_safe(sensor, tmps, &iccsense->sensors, head) { in nvkm_iccsense_dtor() 138 list_del(&sensor->head); in nvkm_iccsense_dtor() 139 kfree(sensor); in nvkm_iccsense_dtor() 157 struct nvkm_iccsense_sensor *sensor; in nvkm_iccsense_create_sensor() local [all …]
|
| /linux/drivers/iio/temperature/ |
| H A D | ltc2983.c | 3 * Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System 190 /* Sensor types for some parts only; map to RTD_CUSTOM/THERMISTOR_CUSTOM in HW */ 196 /* Bitmask of sensor types supported by LTC2983/LTC2984 and derivatives */ 205 /* Bitmask of sensor types supported by ADT7604 */ 214 container_of(_sensor, struct ltc2983_thermocouple, sensor) 217 container_of(_sensor, struct ltc2983_rtd, sensor) 220 container_of(_sensor, struct ltc2983_copper_trace, sensor) 223 container_of(_sensor, struct ltc2983_thermistor, sensor) 226 container_of(_sensor, struct ltc2983_leak_detector, sensor) 229 container_of(_sensor, struct ltc2983_diode, sensor) [all …]
|
| /linux/drivers/media/usb/gspca/m5602/ |
| H A D | m5602_mt9m111.c | 3 * Driver for the mt9m111 sensor 32 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 33 {SENSOR, MT9M111_SC_RESET, 80 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 81 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 82 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, 83 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, 84 {SENSOR, MT9M111_CP_OPERATING_MODE_CTL, 0x00, 86 {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, 87 {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, [all …]
|
| H A D | m5602_ov7660.c | 3 * Driver for the ov7660 sensor 35 {SENSOR, OV7660_OFON, 0x0c}, 36 {SENSOR, OV7660_COM2, 0x11}, 37 {SENSOR, OV7660_COM7, 0x05}, 74 {SENSOR, OV7660_COM7, 0x80}, 75 {SENSOR, OV7660_CLKRC, 0x80}, 76 {SENSOR, OV7660_COM9, 0x4c}, 77 {SENSOR, OV7660_OFON, 0x43}, 78 {SENSOR, OV7660_COM12, 0x28}, 79 {SENSOR, OV7660_COM8, 0x00}, [all …]
|
| /linux/drivers/net/ethernet/sfc/ |
| H A D | mcdi_mon.c | 40 #define SENSOR(name, label, hwmon_type, port) \ macro 42 SENSOR(CONTROLLER_TEMP, "Controller board temp.", TEMP, -1), 43 SENSOR(PHY_COMMON_TEMP, "PHY temp.", TEMP, -1), 44 SENSOR(CONTROLLER_COOLING, "Controller heat sink", COOL, -1), 45 SENSOR(PHY0_TEMP, "PHY temp.", TEMP, 0), 46 SENSOR(PHY0_COOLING, "PHY heat sink", COOL, 0), 47 SENSOR(PHY1_TEMP, "PHY temp.", TEMP, 1), 48 SENSOR(PHY1_COOLING, "PHY heat sink", COOL, 1), 49 SENSOR(IN_1V0, "1.0V supply", IN, -1), 50 SENSOR(IN_1V2, "1.2V supply", IN, -1), [all …]
|
| /linux/drivers/net/ethernet/sfc/siena/ |
| H A D | mcdi_mon.c | 40 #define SENSOR(name, label, hwmon_type, port) \ macro 42 SENSOR(CONTROLLER_TEMP, "Controller board temp.", TEMP, -1), 43 SENSOR(PHY_COMMON_TEMP, "PHY temp.", TEMP, -1), 44 SENSOR(CONTROLLER_COOLING, "Controller heat sink", COOL, -1), 45 SENSOR(PHY0_TEMP, "PHY temp.", TEMP, 0), 46 SENSOR(PHY0_COOLING, "PHY heat sink", COOL, 0), 47 SENSOR(PHY1_TEMP, "PHY temp.", TEMP, 1), 48 SENSOR(PHY1_COOLING, "PHY heat sink", COOL, 1), 49 SENSOR(IN_1V0, "1.0V supply", IN, -1), 50 SENSOR(IN_1V2, "1.2V supply", IN, -1), [all …]
|
| /linux/drivers/iio/humidity/ |
| H A D | Kconfig | 3 # humidity sensor drivers 8 tristate "Aosong AM2315 relative humidity and temperature sensor" 14 relative humidity and ambient temperature sensor. 29 tristate "ENS210 temperature and humidity sensor" 40 tristate "TI HDC100x relative humidity and temperature sensor" 53 tristate "TI HDC2010 relative humidity and temperature sensor" 63 tristate "TI HDC3020 relative humidity and temperature sensor" 75 tristate "HID Environmental humidity sensor" 81 Say yes here to build support for the HID SENSOR 85 will be called hid-sensor-humidity. [all …]
|