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

Commit 1d8177a2 authored by Bingzhe Cai's avatar Bingzhe Cai
Browse files

input: sensors: correct property names of APDS993x



Property names should not include underscores, correct this for
APDS993x sensor driver.

CRs-fixed: 631108
Change-Id: I8f927ab7c32be027df72523f890ec87d19f98fdd
Signed-off-by: default avatarBingzhe Cai <bingzhec@codeaurora.org>
parent 0c4137aa
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -9,16 +9,16 @@ Required properties:
 - vdd-supply					: Power supply needed to power up the device.
 - vio-supply					: IO power supply needed for IO and I2C.
 - avago,irq-gpio				: The gpio pin for the interrupt.
 - avago,ps_threshold			: The threshold adc value for proximity sensor
 - avago,ps-threshold			: The threshold adc value for proximity sensor
				to trigger away interrupt.
 - avago,ps_hysteresis_threshold: The hysteresis threshold adc value for
 - avago,ps-hysteresis-threshold: The hysteresis threshold adc value for
				proximity sensor to trigger  close interrupt.
 - avago,ps_pulse				: The proximity pulse that the LDR will generate.
 - avago,ps_gain				: The proximity gain of the sensor.
 - avago,als_B					: Tuning value of COE_B parameter.
 - avago,als_C					: Tuning value of COE_C parameter.
 - avago,als_D					: Tuning value of COE_D parameter.
 - avago,ga_value				: Tuning value of the gain for light sensor.
 - avago,ps-pulse				: The proximity pulse that the LDR will generate.
 - avago,ps-gain				: The proximity gain of the sensor.
 - avago,als-B					: Tuning value of COE_B parameter.
 - avago,als-C					: Tuning value of COE_C parameter.
 - avago,als-D					: Tuning value of COE_D parameter.
 - avago,ga-value				: Tuning value of the gain for light sensor.

 Example:

+16 −16
Original line number Diff line number Diff line
@@ -2160,59 +2160,59 @@ static int sensor_parse_dt(struct device *dev,
	pdata->irq_gpio = rc;

	/* ps tuning data*/
	rc = of_property_read_u32(np, "avago,ps_threshold", &tmp);
	rc = of_property_read_u32(np, "avago,ps-threshold", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read ps_threshold\n");
		dev_err(dev, "Unable to read ps threshold\n");
		return rc;
	}
	pdata->prox_threshold = tmp;

	rc = of_property_read_u32(np, "avago,ps_hysteresis_threshold", &tmp);
	rc = of_property_read_u32(np, "avago,ps-hysteresis-threshold", &tmp);
	 if (rc) {
		dev_err(dev, "Unable to read ps_hysteresis_threshold\n");
		dev_err(dev, "Unable to read ps hysteresis threshold\n");
		return rc;
	}
	pdata->prox_hsyteresis_threshold = tmp;

	rc = of_property_read_u32(np, "avago,ps_pulse", &tmp);
	rc = of_property_read_u32(np, "avago,ps-pulse", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read ps_pulse\n");
		dev_err(dev, "Unable to read ps pulse\n");
		return rc;
	}
	pdata->prox_pulse = tmp;

	rc = of_property_read_u32(np, "avago,ps_pgain", &tmp);
	rc = of_property_read_u32(np, "avago,ps-pgain", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read ps_pgain\n");
		dev_err(dev, "Unable to read ps pgain\n");
		return rc;
	}
	pdata->prox_gain = tmp;

	/* ALS tuning value */
	rc = of_property_read_u32(np, "avago,als_B", &tmp);
	rc = of_property_read_u32(np, "avago,als-B", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read apds993x_coe_b\n");
		dev_err(dev, "Unable to read apds993x coefficient b\n");
		return rc;
	}
	pdata->als_B = tmp;

	rc = of_property_read_u32(np, "avago,als_C", &tmp);
	rc = of_property_read_u32(np, "avago,als-C", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read apds993x_coe_c\n");
		dev_err(dev, "Unable to read apds993x coefficient c\n");
		return rc;
	}
	pdata->als_C = tmp;

	rc = of_property_read_u32(np, "avago,als_D", &tmp);
	rc = of_property_read_u32(np, "avago,als-D", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read apds993x_coe_d\n");
		dev_err(dev, "Unable to read apds993x coefficient d\n");
		return rc;
	}
	pdata->als_D = tmp;

	rc = of_property_read_u32(np, "avago,ga_value", &tmp);
	rc = of_property_read_u32(np, "avago,ga-value", &tmp);
	if (rc) {
		dev_err(dev, "Unable to read ga_value\n");
		dev_err(dev, "Unable to read gain value\n");
		return rc;
	}
	pdata->ga_value = tmp;