/* Return value is 0 for off, 1 for on, or a negative error code if reading failed.  */
static int tsl2563_get_power(struct tsl2563_chip *chip)
/* Return value is 0 for off, 1 for on, or a negative error code if reading failed.  */
static int tsl2563_get_power(struct tsl2563_chip *chip)
{
	struct i2c_client *client = chip->client;
	int ret;
	u8 val;
	ret = tsl2563_read(client, TSL2563_REG_CTRL, &val, sizeof(val));
	if (ret != sizeof(val))
		return ret;
	return (val & TSL2563_CTRL_POWER_MASK) == TSL2563_CMD_POWER_ON;
}