Skip to content
Permalink
Browse files

drivers: sensor: APDS9660 WhoAmI check logic

APDS9660 sensor driver missing WhoAmI check

signed-off-by: William Fish <william.fish@manulytica.com>
  • Loading branch information...
WilliamGFish authored and nashif committed Apr 1, 2019
1 parent 86b0c22 commit 1e5e8829c7e36228998f1bc68be87e6b38d32941
Showing with 4 additions and 1 deletion.
  1. +4 −1 drivers/sensor/apds9960/apds9960.c
@@ -442,7 +442,10 @@ static int apds9960_init(struct device *dev)
(void)memset(data->sample_crgb, 0, sizeof(data->sample_crgb));
data->pdata = 0U;

apds9960_sensor_setup(dev);
if (apds9960_sensor_setup(dev) < 0) {
LOG_ERR("Failed to setup device!");
return -EIO;
}

if (apds9960_init_interrupt(dev) < 0) {
LOG_ERR("Failed to initialize interrupt!");

0 comments on commit 1e5e882

Please sign in to comment.
You can’t perform that action at this time.