X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fmfd%2Ftps65910.c;h=8263605f6d2fa2b76eb36b4f1589eb5dba6b8b0b;hb=c644bd79c0a782045f58d3dffebaf3d3154e32bf;hp=11cab1582f2f223316ec4ec5337dce863908b609;hpb=9503427e916aea7ec2cc429504f82d7200ab4bcd;p=karo-tx-linux.git diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 11cab1582f2f..8263605f6d2f 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -328,11 +328,7 @@ static int tps65910_sleepinit(struct tps65910 *tps65910, goto err_sleep_init; } - /* Return if there is no sleep keepon data. */ - if (!pmic_pdata->slp_keepon) - return 0; - - if (pmic_pdata->slp_keepon->therm_keepon) { + if (pmic_pdata->slp_keepon.therm_keepon) { ret = tps65910_reg_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON, SLEEP_KEEP_RES_ON_THERM_KEEPON_MASK); @@ -342,7 +338,7 @@ static int tps65910_sleepinit(struct tps65910 *tps65910, } } - if (pmic_pdata->slp_keepon->clkout32k_keepon) { + if (pmic_pdata->slp_keepon.clkout32k_keepon) { ret = tps65910_reg_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON, SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_MASK); @@ -352,7 +348,7 @@ static int tps65910_sleepinit(struct tps65910 *tps65910, } } - if (pmic_pdata->slp_keepon->i2chs_keepon) { + if (pmic_pdata->slp_keepon.i2chs_keepon) { ret = tps65910_reg_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON, SLEEP_KEEP_RES_ON_I2CHS_KEEPON_MASK); @@ -415,6 +411,18 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client, prop = of_property_read_bool(np, "ti,en-ck32k-xtal"); board_info->en_ck32k_xtal = prop; + prop = of_property_read_bool(np, "ti,sleep-enable"); + board_info->en_dev_slp = prop; + + prop = of_property_read_bool(np, "ti,sleep-keep-therm"); + board_info->slp_keepon.therm_keepon = prop; + + prop = of_property_read_bool(np, "ti,sleep-keep-ck32k"); + board_info->slp_keepon.clkout32k_keepon = prop; + + prop = of_property_read_bool(np, "ti,sleep-keep-hsclk"); + board_info->slp_keepon.i2chs_keepon = prop; + board_info->irq = client->irq; board_info->irq_base = -1; board_info->pm_off = of_property_read_bool(np,