@@ -231,7 +231,8 @@ static void palmas_dt_to_pdata(struct i2c_client *i2c,
palmas_set_pdata_irq_flag(i2c, pdata);
}
-static unsigned int palmas_features = PALMAS_PMIC_FEATURE_INTERRUPT;
+static unsigned int palmas_features = PALMAS_PMIC_FEATURE_INTERRUPT |
+ PALMAS_PMIC_FEATURE_SMPS10_BOOST;
static unsigned int tps659038_features;
@@ -838,6 +838,9 @@ static int palmas_regulators_probe(struct platform_device *pdev)
continue;
ramp_delay_support = true;
break;
+ case PALMAS_REG_SMPS10:
+ if (!PALMAS_PMIC_HAS(palmas, SMPS10_BOOST))
+ continue;
}
if ((id == PALMAS_REG_SMPS6) || (id == PALMAS_REG_SMPS8))
@@ -38,10 +38,14 @@
* PALMAS_PMIC_FEATURE_INTERRUPT - used when the PMIC has Interrupt line going
* to an application processor.
*
+ * PALMAS_PMIC_FEATURE_SMPS10_BOOST - used when the PMIC provides SMPS10 boost
+ * voltage supply.
+ *
* PALMAS_PMIC_HAS(b, f) - macro to check if a bandgap device is capable of a
* specific feature (above) or not. Return non-zero, if yes.
*/
#define PALMAS_PMIC_FEATURE_INTERRUPT BIT(0)
+#define PALMAS_PMIC_FEATURE_SMPS10_BOOST BIT(1)
#define PALMAS_PMIC_HAS(b, f) \
((b)->features & PALMAS_PMIC_FEATURE_ ## f)
The SMPS10 regulator is not presesnt in all the variants of the PALMAS PMIC family. Hence adding a feature to distingush between them. Signed-off-by: J Keerthy <j-keerthy@ti.com> --- drivers/mfd/palmas.c | 3 ++- drivers/regulator/palmas-regulator.c | 3 +++ include/linux/mfd/palmas.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)