zephyr/dts/bindings/sensor/microchip,mcp9808.yaml
Steven Daglish 5427d6bbc7 sensor: mcp9808: Adding temperature resolution to MCP9808 sensor driver
During the driver init, the function will set the sensor resolution
based on the driver's dts variable "resolution"

The driver's device tree has been updated to include the value
"resolution".

The default is set to the highest resolution of 0.0625C.

Moved mcp9808_reg_write from mcp9808_trigger.c to mcp9808.c

This allows resue of the same function in both the trigger and
resolution functions.

Function name changed to xxx_16bit to distinquish it from the 8
bit write function that will added.

Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
2021-02-15 08:13:17 -05:00

33 lines
889 B
YAML

# Copyright (c) 2019, Linaro Limited
# SPDX-License-Identifier: Apache-2.0
description: |
Microchip MCP9808 Digital Temperature Sensor. See
http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf.
compatible: "microchip,mcp9808"
include: i2c-device.yaml
properties:
int-gpios:
type: phandle-array
required: false
description: |
The alert pin defaults to active low when produced by the
sensor, and is open-drain. A pull-up may be appropriate. The
property value should ensure the flags properly describe the
signal that is presented to the driver.
resolution:
type: int
required: false
default: 3
description: Sensor resolution. Default is 0.0625C (0b11),
which is the power-up default.
enum:
- 0 # 0.5C
- 1 # 0.25C
- 2 # 0.125C
- 3 # 0.0625C