/openbmc/linux/drivers/thermal/st/ |
H A D | st_thermal.c | 3 * ST Thermal Sensor Driver core routines 23 static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) in st_thermal_alloc_regfields() argument 25 struct device *dev = sensor->dev; in st_thermal_alloc_regfields() 26 struct regmap *regmap = sensor->regmap; in st_thermal_alloc_regfields() 27 const struct reg_field *reg_fields = sensor->cdata->reg_fields; in st_thermal_alloc_regfields() 29 sensor->dcorrect = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 32 sensor->overflow = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 35 sensor->temp_data = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 38 if (IS_ERR(sensor->dcorrect) || in st_thermal_alloc_regfields() 39 IS_ERR(sensor->overflow) || in st_thermal_alloc_regfields() [all …]
|
H A D | stm_thermal.c | 99 static int stm_enable_irq(struct stm_thermal_sensor *sensor) in stm_enable_irq() argument 103 dev_dbg(sensor->dev, "low:%d high:%d\n", sensor->low_temp_enabled, in stm_enable_irq() 104 sensor->high_temp_enabled); in stm_enable_irq() 107 value = readl_relaxed(sensor->base + DTS_ITENR_OFFSET); in stm_enable_irq() 110 if (sensor->low_temp_enabled) in stm_enable_irq() 113 if (sensor->high_temp_enabled) in stm_enable_irq() 117 writel_relaxed(value, sensor->base + DTS_ITENR_OFFSET); in stm_enable_irq() 124 struct stm_thermal_sensor *sensor = sdata; in stm_thermal_irq_handler() local 126 dev_dbg(sensor->dev, "sr:%d\n", in stm_thermal_irq_handler() 127 readl_relaxed(sensor->base + DTS_SR_OFFSET)); in stm_thermal_irq_handler() [all …]
|
H A D | st_thermal_memmap.c | 3 * ST Thermal Sensor Driver for memory mapped sensors. 19 /* Power control bits for the memory mapped thermal sensor */ 25 * According to the STIH416 MPE temp sensor data sheet - 28 * sensor. regmap_update_bits() will be used to update the register. 39 struct st_thermal_sensor *sensor = sdata; in st_mmap_thermal_trip_handler() local 41 thermal_zone_device_update(sensor->thermal_dev, in st_mmap_thermal_trip_handler() 48 static int st_mmap_power_ctrl(struct st_thermal_sensor *sensor, in st_mmap_power_ctrl() argument 54 return regmap_update_bits(sensor->regmap, STIH416_MPE_CONF, mask, val); in st_mmap_power_ctrl() 57 static int st_mmap_alloc_regfields(struct st_thermal_sensor *sensor) in st_mmap_alloc_regfields() argument 59 struct device *dev = sensor->dev; in st_mmap_alloc_regfields() [all …]
|
/openbmc/linux/drivers/media/i2c/ccs/ |
H A D | ccs-core.c | 13 * Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com> 90 static int ccs_limit_ptr(struct ccs_sensor *sensor, unsigned int limit, in ccs_limit_ptr() argument 100 if (WARN_ON(!sensor->ccs_limits) || in ccs_limit_ptr() 105 *__ptr = sensor->ccs_limits + ccs_limit_offsets[limit].lim + offset; in ccs_limit_ptr() 110 void ccs_replace_limit(struct ccs_sensor *sensor, in ccs_replace_limit() argument 113 struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd); in ccs_replace_limit() 118 ret = ccs_limit_ptr(sensor, limit, offset, &ptr); in ccs_replace_limit() 130 u32 ccs_get_limit(struct ccs_sensor *sensor, unsigned int limit, in ccs_get_limit() argument 137 ret = ccs_limit_ptr(sensor, limit, offset, &ptr); in ccs_get_limit() 156 return ccs_reg_conv(sensor, ccs_limits[limit].reg, val); in ccs_get_limit() [all …]
|
/openbmc/linux/drivers/media/i2c/ |
H A D | ov2680.c | 3 * Omnivision OV2680 CMOS Image Sensor driver 7 * Based on OV5640 Sensor Driver 206 /* Sensor control register tweaks */ 273 static void ov2680_power_up(struct ov2680_dev *sensor) in ov2680_power_up() argument 275 if (!sensor->pwdn_gpio) in ov2680_power_up() 278 gpiod_set_value(sensor->pwdn_gpio, 0); in ov2680_power_up() 282 static void ov2680_power_down(struct ov2680_dev *sensor) in ov2680_power_down() argument 284 if (!sensor->pwdn_gpio) in ov2680_power_down() 287 gpiod_set_value(sensor->pwdn_gpio, 1); in ov2680_power_down() 291 static void ov2680_set_bayer_order(struct ov2680_dev *sensor, in ov2680_set_bayer_order() argument [all …]
|
H A D | st-vgxy61.c | 3 * Driver for VGXY61 global shutter sensor family driver 482 static s32 get_pixel_rate(struct vgxy61_dev *sensor) in get_pixel_rate() argument 484 return div64_u64((u64)sensor->data_rate_in_mbps * sensor->nb_of_lane, in get_pixel_rate() 485 get_bpp_by_code(sensor->fmt.code)); in get_pixel_rate() 499 static unsigned int get_chunk_size(struct vgxy61_dev *sensor) in get_chunk_size() argument 501 struct i2c_adapter *adapter = sensor->i2c_client->adapter; in get_chunk_size() 512 static int vgxy61_read_multiple(struct vgxy61_dev *sensor, u32 reg, in vgxy61_read_multiple() argument 515 struct i2c_client *client = sensor->i2c_client; in vgxy61_read_multiple() 546 static inline int vgxy61_read_reg(struct vgxy61_dev *sensor, u32 reg) in vgxy61_read_reg() argument 548 return vgxy61_read_multiple(sensor, reg & VGXY61_REG_ADDR_MASK, in vgxy61_read_reg() [all …]
|
H A D | imx296.c | 3 * Driver for IMX296 CMOS Image Sensor from Sony 219 static int imx296_read(struct imx296 *sensor, u32 addr) in imx296_read() argument 224 ret = regmap_raw_read(sensor->regmap, addr & IMX296_REG_ADDR_MASK, data, in imx296_read() 232 static int imx296_write(struct imx296 *sensor, u32 addr, u32 value, int *err) in imx296_write() argument 240 ret = regmap_raw_write(sensor->regmap, addr & IMX296_REG_ADDR_MASK, in imx296_write() 243 dev_err(sensor->dev, "%u-bit write to 0x%04x failed: %d\n", in imx296_write() 253 static int imx296_power_on(struct imx296 *sensor) in imx296_power_on() argument 257 ret = regulator_bulk_enable(ARRAY_SIZE(sensor->supplies), in imx296_power_on() 258 sensor->supplies); in imx296_power_on() 264 ret = gpiod_direction_output(sensor->reset, 0); in imx296_power_on() [all …]
|
H A D | s5k6a3.c | 3 * Samsung S5K6A3 image sensor driver 45 * struct s5k6a3 - fimc-is sensor data structure 47 * @subdev: the image sensor's v4l2 subdev 49 * @supplies: image sensor's voltage regulator supplies 50 * @gpio_reset: GPIO connected to the sensor's reset pin 52 * @format: media bus format at the sensor's source pad 126 struct s5k6a3 *sensor, struct v4l2_subdev_state *sd_state, in __s5k6a3_get_format() argument 130 return sd_state ? v4l2_subdev_get_try_format(&sensor->subdev, in __s5k6a3_get_format() 133 return &sensor->format; in __s5k6a3_get_format() 140 struct s5k6a3 *sensor = sd_to_s5k6a3(sd); in s5k6a3_set_fmt() local [all …]
|
H A D | imx415.c | 3 * Driver for the Sony IMX415 CMOS Image Sensor. 465 static int imx415_read(struct imx415 *sensor, u32 addr) in imx415_read() argument 470 ret = regmap_raw_read(sensor->regmap, addr & IMX415_REG_ADDR_MASK, data, in imx415_read() 478 static int imx415_write(struct imx415 *sensor, u32 addr, u32 value) in imx415_write() argument 483 ret = regmap_raw_write(sensor->regmap, addr & IMX415_REG_ADDR_MASK, in imx415_write() 486 dev_err_ratelimited(sensor->dev, in imx415_write() 494 static int imx415_set_testpattern(struct imx415 *sensor, int val) in imx415_set_testpattern() argument 499 ret = imx415_write(sensor, IMX415_BLKLEVEL, 0x00); in imx415_set_testpattern() 502 ret = imx415_write(sensor, IMX415_TPG_EN_DUOUT, 0x01); in imx415_set_testpattern() 505 ret = imx415_write(sensor, IMX415_TPG_PATSEL_DUOUT, val - 1); in imx415_set_testpattern() [all …]
|
H A D | ar0521.c | 161 static int ar0521_code_to_bpp(struct ar0521_dev *sensor) in ar0521_code_to_bpp() argument 163 switch (sensor->fmt.code) { in ar0521_code_to_bpp() 172 static int ar0521_write_regs(struct ar0521_dev *sensor, const __be16 *data, in ar0521_write_regs() argument 175 struct i2c_client *client = sensor->i2c_client; in ar0521_write_regs() 187 v4l2_err(&sensor->sd, "%s: I2C write error\n", __func__); in ar0521_write_regs() 194 static int ar0521_write_reg(struct ar0521_dev *sensor, u16 reg, u16 val) in ar0521_write_reg() argument 198 return ar0521_write_regs(sensor, buf, 2); in ar0521_write_reg() 201 static int ar0521_set_geometry(struct ar0521_dev *sensor) in ar0521_set_geometry() argument 204 u16 x = clamp((AR0521_WIDTH_MAX - sensor->fmt.width) / 2, in ar0521_set_geometry() 206 u16 y = clamp(((AR0521_HEIGHT_MAX - sensor->fmt.height) / 2) & ~1, in ar0521_set_geometry() [all …]
|
H A D | ov5648.c | 966 static int ov5648_read(struct ov5648_sensor *sensor, u16 address, u8 *value) in ov5648_read() argument 969 struct i2c_client *client = sensor->i2c_client; in ov5648_read() 989 static int ov5648_write(struct ov5648_sensor *sensor, u16 address, u8 value) in ov5648_write() argument 992 struct i2c_client *client = sensor->i2c_client; in ov5648_write() 1005 static int ov5648_write_sequence(struct ov5648_sensor *sensor, in ov5648_write_sequence() argument 1013 ret = ov5648_write(sensor, sequence[i].address, in ov5648_write_sequence() 1025 static int ov5648_update_bits(struct ov5648_sensor *sensor, u16 address, in ov5648_update_bits() argument 1031 ret = ov5648_read(sensor, address, &value); in ov5648_update_bits() 1038 ret = ov5648_write(sensor, address, value); in ov5648_update_bits() 1045 /* Sensor */ [all …]
|
H A D | ov5640.c | 481 static inline bool ov5640_is_csi2(const struct ov5640_dev *sensor) in ov5640_is_csi2() argument 483 return sensor->ep.bus_type == V4L2_MBUS_CSI2_DPHY; in ov5640_is_csi2() 487 ov5640_formats(struct ov5640_dev *sensor) in ov5640_formats() argument 489 return ov5640_is_csi2(sensor) ? ov5640_csi2_formats in ov5640_formats() 494 ov5640_code_to_pixfmt(struct ov5640_dev *sensor, u32 code) in ov5640_code_to_pixfmt() argument 496 const struct ov5640_pixfmt *formats = ov5640_formats(sensor); in ov5640_code_to_pixfmt() 507 static u32 ov5640_code_to_bpp(struct ov5640_dev *sensor, u32 code) in ov5640_code_to_bpp() argument 509 const struct ov5640_pixfmt *format = ov5640_code_to_pixfmt(sensor, in ov5640_code_to_bpp() 1141 ov5640_timings(const struct ov5640_dev *sensor, in ov5640_timings() argument 1144 if (ov5640_is_csi2(sensor)) in ov5640_timings() [all …]
|
H A D | ov8865.c | 809 /* Sensor */ 886 /* Sensor */ 1219 /* Sensor */ 1348 static int ov8865_read(struct ov8865_sensor *sensor, u16 address, u8 *value) in ov8865_read() argument 1351 struct i2c_client *client = sensor->i2c_client; in ov8865_read() 1371 static int ov8865_write(struct ov8865_sensor *sensor, u16 address, u8 value) in ov8865_write() argument 1374 struct i2c_client *client = sensor->i2c_client; in ov8865_write() 1387 static int ov8865_write_sequence(struct ov8865_sensor *sensor, in ov8865_write_sequence() argument 1395 ret = ov8865_write(sensor, sequence[i].address, in ov8865_write_sequence() 1407 static int ov8865_update_bits(struct ov8865_sensor *sensor, u16 address, in ov8865_update_bits() argument [all …]
|
/openbmc/linux/drivers/media/pci/intel/ |
H A D | ipu-bridge.c | 44 * Do not add an entry for a sensor that is not actually supported. 111 /* camera sensor depends on IVSC in DSDT if exist */ in ipu_bridge_get_ivsc_acpi_dev() 161 static int ipu_bridge_check_ivsc_dev(struct ipu_sensor *sensor, in ipu_bridge_check_ivsc_dev() argument 176 sensor->csi_dev = csi_dev; in ipu_bridge_check_ivsc_dev() 177 sensor->ivsc_adev = adev; in ipu_bridge_check_ivsc_dev() 275 int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor) in ipu_bridge_parse_ssdb() argument 294 sensor->link = ssdb.link; in ipu_bridge_parse_ssdb() 295 sensor->lanes = ssdb.lanes; in ipu_bridge_parse_ssdb() 296 sensor->mclkspeed = ssdb.mclkspeed; in ipu_bridge_parse_ssdb() 297 sensor->rotation = ipu_bridge_parse_rotation(adev, &ssdb); in ipu_bridge_parse_ssdb() [all …]
|
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/Sensor/ |
H A D | Threshold.events.yaml | 9 description: The name or identifier of the sensor. 19 description: The name or identifier of the sensor. 23 description: The reading of the sensor. 28 type: enum[xyz.openbmc_project.Sensor.Value.Unit] 31 description: The configured threshold value for this sensor. 41 description: The name or identifier of the sensor. 45 description: The reading of the sensor. 50 type: enum[xyz.openbmc_project.Sensor.Value.Unit] 53 description: The configured threshold value for this sensor. 63 description: The name or identifier of the sensor. [all …]
|
/openbmc/openbmc/meta-ibm/recipes-phosphor/dbus/thermal-policy/ibm-ac-server/ |
H A D | thermal-policy.yaml | 13 - meta: SENSOR 15 - meta: SENSOR 17 - meta: SENSOR 19 - meta: SENSOR 21 - meta: SENSOR 23 - meta: SENSOR 25 - meta: SENSOR 27 - meta: SENSOR 29 - meta: SENSOR 31 - meta: SENSOR [all …]
|
/openbmc/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 "AL3010 ambient light sensor" 51 ambient light sensor. 57 tristate "AL3320A ambient light sensor" 61 ambient light sensor. [all …]
|
/openbmc/phosphor-hwmon/ |
H A D | sensor.hpp | 17 namespace sensor namespace 29 /** @brief Custom exception for async sensor reading timeout 35 "Async sensor read timed out") in AsyncSensorReadTimeOut() 39 /** @class Sensor 40 * @brief Sensor object based on a SensorSet container's key type 41 * @details Sensor object to create and modify an associated device's sensor 42 * attributes based on the key type of each sensor in the set provided by the 45 class Sensor class 48 Sensor() = delete; 49 Sensor(const Sensor&) = delete; [all …]
|
/openbmc/linux/drivers/iio/common/scmi_sensors/ |
H A D | scmi_iio.c | 4 * System Control and Management Interface(SCMI) based IIO sensor driver 44 struct scmi_iio_priv *sensor; in scmi_iio_sensor_update_cb() local 52 sensor = container_of(nb, struct scmi_iio_priv, sensor_update_nb); in scmi_iio_sensor_update_cb() 55 sensor->iio_buf[i] = sensor_update->readings[i].value; in scmi_iio_sensor_update_cb() 57 if (!sensor->sensor_info->timestamped) { in scmi_iio_sensor_update_cb() 71 tstamp_scale = sensor->sensor_info->tstamp_scale + in scmi_iio_sensor_update_cb() 81 scmi_iio_dev = sensor->indio_dev; in scmi_iio_sensor_update_cb() 82 iio_push_to_buffers_with_timestamp(scmi_iio_dev, sensor->iio_buf, in scmi_iio_sensor_update_cb() 89 struct scmi_iio_priv *sensor = iio_priv(iio_dev); in scmi_iio_buffer_preenable() local 93 if (sensor->sensor_info->timestamped) in scmi_iio_buffer_preenable() [all …]
|
/openbmc/phosphor-host-ipmid/ |
H A D | sensordatahandler.hpp | 18 extern ipmi::sensor::SensorCacheMap sensorCacheMap; 28 namespace sensor namespace 45 * @param[in] cmdData - Input sensor data 59 /** @brief Populate sensor name from the D-Bus property associated with the 60 * sensor. In the example entry from the yaml, the name of the D-bus 61 * property "AttemptsLeft" is the sensor name. 78 * @param[in] sensorInfo - Dbus info related to sensor. 80 * @return On success return the sensor name for the sensor. 87 /** @brief Populate sensor name from the D-Bus object associated with the 88 * sensor. If the object path is /system/chassis/motherboard/dimm0 then [all …]
|
/openbmc/linux/drivers/thermal/ |
H A D | hisi_thermal.c | 3 * HiSilicon thermal sensor driver 68 int (*get_temp)(struct hisi_thermal_sensor *sensor); 69 int (*enable_sensor)(struct hisi_thermal_sensor *sensor); 70 int (*disable_sensor)(struct hisi_thermal_sensor *sensor); 71 int (*irq_handler)(struct hisi_thermal_sensor *sensor); 77 struct hisi_thermal_sensor *sensor; member 243 * Temperature configuration register - Sensor selection 247 * 0x0: local sensor (default) 248 * 0x1: remote sensor 1 (ACPU cluster 1) 249 * 0x2: remote sensor 2 (ACPU cluster 0) [all …]
|
/openbmc/linux/drivers/input/rmi4/ |
H A D | rmi_2d_sensor.c | 22 void rmi_2d_sensor_abs_process(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_process() argument 26 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_process() 33 obj->x = sensor->max_x - obj->x; in rmi_2d_sensor_abs_process() 36 obj->y = sensor->max_y - obj->y; in rmi_2d_sensor_abs_process() 56 obj->x = min(sensor->max_x, obj->x); in rmi_2d_sensor_abs_process() 59 obj->y = min(sensor->max_y, obj->y); in rmi_2d_sensor_abs_process() 61 sensor->tracking_pos[slot].x = obj->x; in rmi_2d_sensor_abs_process() 62 sensor->tracking_pos[slot].y = obj->y; in rmi_2d_sensor_abs_process() 66 void rmi_2d_sensor_abs_report(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_report() argument 70 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_report() [all …]
|
/openbmc/openbmc/meta-ieisystem/meta-fp5280g3/recipes-phosphor/configuration/fp5280g3-yaml-config/ |
H A D | fp5280g3-ipmi-sensors.yaml | 6 xyz.openbmc_project.Sensor.Value: 21 unit: xyz.openbmc_project.Sensor.Value.Unit.Watts 27 xyz.openbmc_project.Sensor.Value: 42 unit: xyz.openbmc_project.Sensor.Value.Unit.Watts 48 xyz.openbmc_project.Sensor.Value: 63 unit: xyz.openbmc_project.Sensor.Value.Unit.Watts 69 xyz.openbmc_project.Sensor.Value: 84 unit: xyz.openbmc_project.Sensor.Value.Unit.Watts 90 xyz.openbmc_project.Sensor.Value: 106 unit: xyz.openbmc_project.Sensor.Value.Unit.Volts [all …]
|
/openbmc/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 …]
|
/openbmc/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 …]
|