Lines Matching +full:s2mps11 +full:- +full:acokb +full:- +full:ground

1 // SPDX-License-Identifier: GPL-2.0+
22 #include <linux/mfd/samsung/s2mps11.h>
32 { .name = "s5m8751-pmic", },
33 { .name = "s5m-charger", },
34 { .name = "s5m8751-codec", },
38 { .name = "s5m8763-pmic", },
39 { .name = "s5m-rtc", },
40 { .name = "s5m-charger", },
44 { .name = "s5m8767-pmic", },
45 { .name = "s5m-rtc", },
47 .name = "s5m8767-clk",
48 .of_compatible = "samsung,s5m8767-clk",
53 { .name = "s2mps11-regulator", },
54 { .name = "s2mps14-rtc", },
56 .name = "s2mps11-clk",
57 .of_compatible = "samsung,s2mps11-clk",
62 { .name = "s2mps13-regulator", },
63 { .name = "s2mps13-rtc", },
65 .name = "s2mps13-clk",
66 .of_compatible = "samsung,s2mps13-clk",
71 { .name = "s2mps14-regulator", },
72 { .name = "s2mps14-rtc", },
74 .name = "s2mps14-clk",
75 .of_compatible = "samsung,s2mps14-clk",
80 { .name = "s2mps15-regulator", },
81 { .name = "s2mps15-rtc", },
83 .name = "s2mps13-clk",
84 .of_compatible = "samsung,s2mps13-clk",
89 { .name = "s2mpa01-pmic", },
90 { .name = "s2mps14-rtc", },
94 { .name = "s2mpu02-regulator", },
99 .compatible = "samsung,s5m8767-pmic",
102 .compatible = "samsung,s2mps11-pmic",
105 .compatible = "samsung,s2mps13-pmic",
108 .compatible = "samsung,s2mps14-pmic",
111 .compatible = "samsung,s2mps15-pmic",
114 .compatible = "samsung,s2mpa01-pmic",
117 .compatible = "samsung,s2mpu02-pmic",
256 if (!regmap_read(sec_pmic->regmap_pmic, S2MPS11_REG_ID, &val)) in sec_pmic_dump_rev()
257 dev_dbg(sec_pmic->dev, "Revision: 0x%x\n", val); in sec_pmic_dump_rev()
264 if (sec_pmic->device_type != S2MPS13X) in sec_pmic_configure()
267 if (sec_pmic->pdata->disable_wrstbi) { in sec_pmic_configure()
273 err = regmap_update_bits(sec_pmic->regmap_pmic, in sec_pmic_configure()
277 dev_warn(sec_pmic->dev, in sec_pmic_configure()
285 * device tree. Other sub-modules of s5m8767 such as pmic, rtc , charger and
289 * the sub-modules need not instantiate another instance while parsing their
299 return ERR_PTR(-ENOMEM); in sec_pmic_i2c_parse_dt_pdata()
301 pd->manual_poweroff = of_property_read_bool(dev->of_node, in sec_pmic_i2c_parse_dt_pdata()
302 "samsung,s2mps11-acokb-ground"); in sec_pmic_i2c_parse_dt_pdata()
303 pd->disable_wrstbi = of_property_read_bool(dev->of_node, in sec_pmic_i2c_parse_dt_pdata()
304 "samsung,s2mps11-wrstbi-ground"); in sec_pmic_i2c_parse_dt_pdata()
317 sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev), in sec_pmic_probe()
320 return -ENOMEM; in sec_pmic_probe()
323 sec_pmic->dev = &i2c->dev; in sec_pmic_probe()
324 sec_pmic->i2c = i2c; in sec_pmic_probe()
325 sec_pmic->irq = i2c->irq; in sec_pmic_probe()
327 pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); in sec_pmic_probe()
333 sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); in sec_pmic_probe()
334 sec_pmic->pdata = pdata; in sec_pmic_probe()
336 switch (sec_pmic->device_type) { in sec_pmic_probe()
366 sec_pmic->regmap_pmic = devm_regmap_init_i2c(i2c, regmap); in sec_pmic_probe()
367 if (IS_ERR(sec_pmic->regmap_pmic)) { in sec_pmic_probe()
368 ret = PTR_ERR(sec_pmic->regmap_pmic); in sec_pmic_probe()
369 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in sec_pmic_probe()
376 pm_runtime_set_active(sec_pmic->dev); in sec_pmic_probe()
378 switch (sec_pmic->device_type) { in sec_pmic_probe()
416 dev_err(&i2c->dev, "Unsupported device type (%lu)\n", in sec_pmic_probe()
417 sec_pmic->device_type); in sec_pmic_probe()
418 return -ENODEV; in sec_pmic_probe()
420 ret = devm_mfd_add_devices(sec_pmic->dev, -1, sec_devs, num_sec_devs, in sec_pmic_probe()
436 if (!sec_pmic->pdata->manual_poweroff) in sec_pmic_shutdown()
439 switch (sec_pmic->device_type) { in sec_pmic_shutdown()
446 * Currently only one board with S2MPS11 needs this, so just in sec_pmic_shutdown()
449 dev_warn(sec_pmic->dev, in sec_pmic_shutdown()
451 sec_pmic->device_type); in sec_pmic_shutdown()
455 regmap_update_bits(sec_pmic->regmap_pmic, reg, mask, 0); in sec_pmic_shutdown()
465 enable_irq_wake(sec_pmic->irq); in sec_pmic_suspend()
475 disable_irq(sec_pmic->irq); in sec_pmic_suspend()
486 disable_irq_wake(sec_pmic->irq); in sec_pmic_resume()
487 enable_irq(sec_pmic->irq); in sec_pmic_resume()