Lines Matching +full:have +full:- +full:pmic

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * ROHM BD96801 PMIC driver
7 * This version of the "BD86801 scalable PMIC"'s driver supports only very
8 * basic set of the PMIC features. Most notably, there is no support for
10 * PMIC is in STBY mode.
12 * Supporting the ERRB interrupt would require dropping the regmap-IRQ
17 * regulator safety limits (like limits for the over/under -voltages, over
19 * synchronized with entity causing the PMIC state transitions. Eg, one
20 * should be able to ensure the PMIC is in STBY state when the
21 * configurations are applied to the hardware. How and when the PMIC state
27 * have a look at the original RFC:
30 * the safety limit configurations - but leaves the state change handling
46 #include <linux/mfd/rohm-bd96801.h>
47 #include <linux/mfd/rohm-generic.h>
50 DEFINE_RES_IRQ_NAMED(BD96801_TW_STAT, "bd96801-core-thermal"),
52 DEFINE_RES_IRQ_NAMED(BD96801_BUCK1_OCPH_STAT, "bd96801-buck1-overcurr-h"),
53 DEFINE_RES_IRQ_NAMED(BD96801_BUCK1_OCPL_STAT, "bd96801-buck1-overcurr-l"),
54 DEFINE_RES_IRQ_NAMED(BD96801_BUCK1_OCPN_STAT, "bd96801-buck1-overcurr-n"),
55 DEFINE_RES_IRQ_NAMED(BD96801_BUCK1_OVD_STAT, "bd96801-buck1-overvolt"),
56 DEFINE_RES_IRQ_NAMED(BD96801_BUCK1_UVD_STAT, "bd96801-buck1-undervolt"),
57 DEFINE_RES_IRQ_NAMED(BD96801_BUCK1_TW_CH_STAT, "bd96801-buck1-thermal"),
59 DEFINE_RES_IRQ_NAMED(BD96801_BUCK2_OCPH_STAT, "bd96801-buck2-overcurr-h"),
60 DEFINE_RES_IRQ_NAMED(BD96801_BUCK2_OCPL_STAT, "bd96801-buck2-overcurr-l"),
61 DEFINE_RES_IRQ_NAMED(BD96801_BUCK2_OCPN_STAT, "bd96801-buck2-overcurr-n"),
62 DEFINE_RES_IRQ_NAMED(BD96801_BUCK2_OVD_STAT, "bd96801-buck2-overvolt"),
63 DEFINE_RES_IRQ_NAMED(BD96801_BUCK2_UVD_STAT, "bd96801-buck2-undervolt"),
64 DEFINE_RES_IRQ_NAMED(BD96801_BUCK2_TW_CH_STAT, "bd96801-buck2-thermal"),
66 DEFINE_RES_IRQ_NAMED(BD96801_BUCK3_OCPH_STAT, "bd96801-buck3-overcurr-h"),
67 DEFINE_RES_IRQ_NAMED(BD96801_BUCK3_OCPL_STAT, "bd96801-buck3-overcurr-l"),
68 DEFINE_RES_IRQ_NAMED(BD96801_BUCK3_OCPN_STAT, "bd96801-buck3-overcurr-n"),
69 DEFINE_RES_IRQ_NAMED(BD96801_BUCK3_OVD_STAT, "bd96801-buck3-overvolt"),
70 DEFINE_RES_IRQ_NAMED(BD96801_BUCK3_UVD_STAT, "bd96801-buck3-undervolt"),
71 DEFINE_RES_IRQ_NAMED(BD96801_BUCK3_TW_CH_STAT, "bd96801-buck3-thermal"),
73 DEFINE_RES_IRQ_NAMED(BD96801_BUCK4_OCPH_STAT, "bd96801-buck4-overcurr-h"),
74 DEFINE_RES_IRQ_NAMED(BD96801_BUCK4_OCPL_STAT, "bd96801-buck4-overcurr-l"),
75 DEFINE_RES_IRQ_NAMED(BD96801_BUCK4_OCPN_STAT, "bd96801-buck4-overcurr-n"),
76 DEFINE_RES_IRQ_NAMED(BD96801_BUCK4_OVD_STAT, "bd96801-buck4-overvolt"),
77 DEFINE_RES_IRQ_NAMED(BD96801_BUCK4_UVD_STAT, "bd96801-buck4-undervolt"),
78 DEFINE_RES_IRQ_NAMED(BD96801_BUCK4_TW_CH_STAT, "bd96801-buck4-thermal"),
80 DEFINE_RES_IRQ_NAMED(BD96801_LDO5_OCPH_STAT, "bd96801-ldo5-overcurr"),
81 DEFINE_RES_IRQ_NAMED(BD96801_LDO5_OVD_STAT, "bd96801-ldo5-overvolt"),
82 DEFINE_RES_IRQ_NAMED(BD96801_LDO5_UVD_STAT, "bd96801-ldo5-undervolt"),
84 DEFINE_RES_IRQ_NAMED(BD96801_LDO6_OCPH_STAT, "bd96801-ldo6-overcurr"),
85 DEFINE_RES_IRQ_NAMED(BD96801_LDO6_OVD_STAT, "bd96801-ldo6-overvolt"),
86 DEFINE_RES_IRQ_NAMED(BD96801_LDO6_UVD_STAT, "bd96801-ldo6-undervolt"),
88 DEFINE_RES_IRQ_NAMED(BD96801_LDO7_OCPH_STAT, "bd96801-ldo7-overcurr"),
89 DEFINE_RES_IRQ_NAMED(BD96801_LDO7_OVD_STAT, "bd96801-ldo7-overvolt"),
90 DEFINE_RES_IRQ_NAMED(BD96801_LDO7_UVD_STAT, "bd96801-ldo7-undervolt"),
94 DEFINE_RES_IRQ_NAMED(BD96801_WDT_ERR_STAT, "bd96801-wdg"),
99 .name = "bd96801-wdt",
103 .name = "bd96801-regulator",
115 /* Registers which do not update value unless PMIC is in STBY */
119 * LDO control registers have single bit (LDO MODE) which does not
120 * change when we write it unless PMIC is in STBY. It's safer to not
180 .name = "bd96801-irq-intb",
208 fwnode = dev_fwnode(&i2c->dev); in bd96801_i2c_probe()
210 return dev_err_probe(&i2c->dev, -EINVAL, "Failed to find fwnode\n"); in bd96801_i2c_probe()
214 return dev_err_probe(&i2c->dev, intb_irq, "INTB IRQ not configured\n"); in bd96801_i2c_probe()
218 return dev_err_probe(&i2c->dev, PTR_ERR(regmap), in bd96801_i2c_probe()
223 return dev_err_probe(&i2c->dev, ret, "Failed to unlock PMIC\n"); in bd96801_i2c_probe()
225 ret = devm_regmap_add_irq_chip(&i2c->dev, regmap, intb_irq, in bd96801_i2c_probe()
229 return dev_err_probe(&i2c->dev, ret, "Failed to add INTB IRQ chip\n"); in bd96801_i2c_probe()
233 ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_AUTO, in bd96801_i2c_probe()
238 dev_err(&i2c->dev, "Failed to create subdevices\n"); in bd96801_i2c_probe()
251 .name = "rohm-bd96801",