If the i2c_board_info struct sets I2C_CLIENT_WAKE (or done through the generic
i2c bindings), then there's no need to initialize wakeup in the driver.
So thus the custom setup and the platform_data member can be removed.
BUG=chrome-os-partner:8921
TEST=rtcwake -m mem -s 10
Change-Id: I7f24684b8a2ac36325b0887b19acb40fa7bf8f53
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28132
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
return ERR_PTR(-ENOMEM);
}
- if (of_get_property(dev->of_node, "max77686,wakeup", NULL))
- pd->wakeup = true;
-
return pd;
}
#else
max77686->type = max77686_i2c_get_driver_data(i2c, id);
max77686->pdata = pdata;
- max77686->wakeup = pdata->wakeup;
mutex_init(&max77686->iolock);
}
pm_runtime_set_active(max77686->dev);
- device_init_wakeup(max77686->dev, max77686->wakeup);
if (max77686_read_reg(i2c, MAX77686_REG_DEVICE_ID, &data) < 0) {
ret = -EIO;
};
struct max77686_platform_data {
- bool wakeup;
u8 ramp_delay;
struct max77686_regulator_data *regulators;
int num_regulators;