Loading Documentation/devicetree/bindings/input/misc/apds993x.txt +8 −8 Original line number Original line Diff line number Diff line Loading @@ -9,16 +9,16 @@ Required properties: - vdd-supply : Power supply needed to power up the device. - vdd-supply : Power supply needed to power up the device. - vio-supply : IO power supply needed for IO and I2C. - vio-supply : IO power supply needed for IO and I2C. - avago,irq-gpio : The gpio pin for the interrupt. - 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. 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. proximity sensor to trigger close interrupt. - avago,ps_pulse : The proximity pulse that the LDR will generate. - avago,ps-pulse : The proximity pulse that the LDR will generate. - avago,ps_gain : The proximity gain of the sensor. - avago,ps-gain : The proximity gain of the sensor. - avago,als_B : Tuning value of COE_B parameter. - avago,als-B : Tuning value of COE_B parameter. - avago,als_C : Tuning value of COE_C parameter. - avago,als-C : Tuning value of COE_C parameter. - avago,als_D : Tuning value of COE_D parameter. - avago,als-D : Tuning value of COE_D parameter. - avago,ga_value : Tuning value of the gain for light sensor. - avago,ga-value : Tuning value of the gain for light sensor. Example: Example: Loading drivers/misc/apds993x.c +16 −16 Original line number Original line Diff line number Diff line Loading @@ -2160,59 +2160,59 @@ static int sensor_parse_dt(struct device *dev, pdata->irq_gpio = rc; pdata->irq_gpio = rc; /* ps tuning data*/ /* 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) { if (rc) { dev_err(dev, "Unable to read ps_threshold\n"); dev_err(dev, "Unable to read ps threshold\n"); return rc; return rc; } } pdata->prox_threshold = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ps_hysteresis_threshold\n"); dev_err(dev, "Unable to read ps hysteresis threshold\n"); return rc; return rc; } } pdata->prox_hsyteresis_threshold = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ps_pulse\n"); dev_err(dev, "Unable to read ps pulse\n"); return rc; return rc; } } pdata->prox_pulse = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ps_pgain\n"); dev_err(dev, "Unable to read ps pgain\n"); return rc; return rc; } } pdata->prox_gain = tmp; pdata->prox_gain = tmp; /* ALS tuning value */ /* 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) { if (rc) { dev_err(dev, "Unable to read apds993x_coe_b\n"); dev_err(dev, "Unable to read apds993x coefficient b\n"); return rc; return rc; } } pdata->als_B = tmp; 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) { if (rc) { dev_err(dev, "Unable to read apds993x_coe_c\n"); dev_err(dev, "Unable to read apds993x coefficient c\n"); return rc; return rc; } } pdata->als_C = tmp; 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) { if (rc) { dev_err(dev, "Unable to read apds993x_coe_d\n"); dev_err(dev, "Unable to read apds993x coefficient d\n"); return rc; return rc; } } pdata->als_D = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ga_value\n"); dev_err(dev, "Unable to read gain value\n"); return rc; return rc; } } pdata->ga_value = tmp; pdata->ga_value = tmp; Loading Loading
Documentation/devicetree/bindings/input/misc/apds993x.txt +8 −8 Original line number Original line Diff line number Diff line Loading @@ -9,16 +9,16 @@ Required properties: - vdd-supply : Power supply needed to power up the device. - vdd-supply : Power supply needed to power up the device. - vio-supply : IO power supply needed for IO and I2C. - vio-supply : IO power supply needed for IO and I2C. - avago,irq-gpio : The gpio pin for the interrupt. - 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. 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. proximity sensor to trigger close interrupt. - avago,ps_pulse : The proximity pulse that the LDR will generate. - avago,ps-pulse : The proximity pulse that the LDR will generate. - avago,ps_gain : The proximity gain of the sensor. - avago,ps-gain : The proximity gain of the sensor. - avago,als_B : Tuning value of COE_B parameter. - avago,als-B : Tuning value of COE_B parameter. - avago,als_C : Tuning value of COE_C parameter. - avago,als-C : Tuning value of COE_C parameter. - avago,als_D : Tuning value of COE_D parameter. - avago,als-D : Tuning value of COE_D parameter. - avago,ga_value : Tuning value of the gain for light sensor. - avago,ga-value : Tuning value of the gain for light sensor. Example: Example: Loading
drivers/misc/apds993x.c +16 −16 Original line number Original line Diff line number Diff line Loading @@ -2160,59 +2160,59 @@ static int sensor_parse_dt(struct device *dev, pdata->irq_gpio = rc; pdata->irq_gpio = rc; /* ps tuning data*/ /* 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) { if (rc) { dev_err(dev, "Unable to read ps_threshold\n"); dev_err(dev, "Unable to read ps threshold\n"); return rc; return rc; } } pdata->prox_threshold = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ps_hysteresis_threshold\n"); dev_err(dev, "Unable to read ps hysteresis threshold\n"); return rc; return rc; } } pdata->prox_hsyteresis_threshold = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ps_pulse\n"); dev_err(dev, "Unable to read ps pulse\n"); return rc; return rc; } } pdata->prox_pulse = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ps_pgain\n"); dev_err(dev, "Unable to read ps pgain\n"); return rc; return rc; } } pdata->prox_gain = tmp; pdata->prox_gain = tmp; /* ALS tuning value */ /* 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) { if (rc) { dev_err(dev, "Unable to read apds993x_coe_b\n"); dev_err(dev, "Unable to read apds993x coefficient b\n"); return rc; return rc; } } pdata->als_B = tmp; 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) { if (rc) { dev_err(dev, "Unable to read apds993x_coe_c\n"); dev_err(dev, "Unable to read apds993x coefficient c\n"); return rc; return rc; } } pdata->als_C = tmp; 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) { if (rc) { dev_err(dev, "Unable to read apds993x_coe_d\n"); dev_err(dev, "Unable to read apds993x coefficient d\n"); return rc; return rc; } } pdata->als_D = tmp; 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) { if (rc) { dev_err(dev, "Unable to read ga_value\n"); dev_err(dev, "Unable to read gain value\n"); return rc; return rc; } } pdata->ga_value = tmp; pdata->ga_value = tmp; Loading