Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a85628a7 authored by Ke Liu's avatar Ke Liu
Browse files

power: bq28400: update name of device tree properties on temperature



In current bq28400 driver implementation, name of device tree properties on
temperature are not clear about their unit. As bq28400 uses celsius degree
as the unit for temperature, update those temperature related device tree
properties with "-degc" suffix.

Change-Id: Iee9020891985abebd681b89a32057581e43ed20b
Signed-off-by: default avatarKe Liu <keliu@codeaurora.org>
parent 57147701
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -8,16 +8,16 @@ Required properties:

 - compatible : Must be "ti,bq28400-battery" or "ti,bq30z55-battery"
 - reg : I2C Address must be 0xb.
 - ti,temp-cold : Cold temperature limit in celsius degree
 - ti,temp-hot : Hot temperature limit in celsius degree
 - ti,temp-cold-degc : Cold temperature limit in celsius degree
 - ti,temp-hot-degc : Hot temperature limit in celsius degree

Example:
	i2c@f9967000 {
		battery@b {
			compatible = "ti,bq28400-battery", "ti,bq30z55-battery";
			reg = <0xb>;
			ti,temp-cold = <2>;
			ti,temp-hot = <43>;
			ti,temp-cold-degc = <2>;
			ti,temp-hot-degc = <43>;
		};
	};
+2 −2
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@
		battery@b {
			compatible = "ti,bq28400-battery";
			reg = <0xb>;
			ti,temp-cold = <2>; /* degree celsius */
			ti,temp-hot = <43>; /* degree celsius */
			ti,temp-cold-degc = <2>; /* degree celsius */
			ti,temp-hot-degc = <43>; /* degree celsius */
		};

		charger@2b {
+2 −2
Original line number Diff line number Diff line
@@ -867,7 +867,7 @@ static int bq28400_probe(struct i2c_client *client,
	}

	/* Note: Lithium-ion battery normal temperature range 0..40 C */
	ret = of_property_read_u32(dev_node, "ti,temp-cold",
	ret = of_property_read_u32(dev_node, "ti,temp-cold-degc",
				   &(bq28400_dev->temp_cold));
	if (ret) {
		pr_err("Unable to read cold temperature. ret=%d.\n", ret);
@@ -875,7 +875,7 @@ static int bq28400_probe(struct i2c_client *client,
	}
	pr_debug("cold temperature limit = %d C.\n", bq28400_dev->temp_cold);

	ret = of_property_read_u32(dev_node, "ti,temp-hot",
	ret = of_property_read_u32(dev_node, "ti,temp-hot-degc",
				   &(bq28400_dev->temp_hot));
	if (ret) {
		pr_err("Unable to read hot temperature. ret=%d.\n", ret);