Lines Matching +full:s2mps14 +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0+
22 #include <linux/mfd/samsung/s2mps14.h>
29 { .name = "s5m8767-pmic", },
30 { .name = "s5m-rtc", },
32 .name = "s5m8767-clk",
33 .of_compatible = "samsung,s5m8767-clk",
38 { .name = "s2mps11-regulator", },
39 { .name = "s2mps14-rtc", },
41 .name = "s2mps11-clk",
42 .of_compatible = "samsung,s2mps11-clk",
47 { .name = "s2mps13-regulator", },
48 { .name = "s2mps13-rtc", },
50 .name = "s2mps13-clk",
51 .of_compatible = "samsung,s2mps13-clk",
56 { .name = "s2mps14-regulator", },
57 { .name = "s2mps14-rtc", },
59 .name = "s2mps14-clk",
60 .of_compatible = "samsung,s2mps14-clk",
65 { .name = "s2mps15-regulator", },
66 { .name = "s2mps15-rtc", },
68 .name = "s2mps13-clk",
69 .of_compatible = "samsung,s2mps13-clk",
74 { .name = "s2mpa01-pmic", },
75 { .name = "s2mps14-rtc", },
79 { .name = "s2mpu02-regulator", },
84 .compatible = "samsung,s5m8767-pmic",
87 .compatible = "samsung,s2mps11-pmic",
90 .compatible = "samsung,s2mps13-pmic",
93 .compatible = "samsung,s2mps14-pmic",
96 .compatible = "samsung,s2mps15-pmic",
99 .compatible = "samsung,s2mpa01-pmic",
102 .compatible = "samsung,s2mpu02-pmic",
219 if (!regmap_read(sec_pmic->regmap_pmic, S2MPS11_REG_ID, &val)) in sec_pmic_dump_rev()
220 dev_dbg(sec_pmic->dev, "Revision: 0x%x\n", val); in sec_pmic_dump_rev()
227 if (sec_pmic->device_type != S2MPS13X) in sec_pmic_configure()
230 if (sec_pmic->pdata->disable_wrstbi) { in sec_pmic_configure()
236 err = regmap_update_bits(sec_pmic->regmap_pmic, in sec_pmic_configure()
240 dev_warn(sec_pmic->dev, in sec_pmic_configure()
248 * device tree. Other sub-modules of s5m8767 such as pmic, rtc , charger and
252 * the sub-modules need not instantiate another instance while parsing their
262 return ERR_PTR(-ENOMEM); in sec_pmic_i2c_parse_dt_pdata()
264 pd->manual_poweroff = of_property_read_bool(dev->of_node, in sec_pmic_i2c_parse_dt_pdata()
265 "samsung,s2mps11-acokb-ground"); in sec_pmic_i2c_parse_dt_pdata()
266 pd->disable_wrstbi = of_property_read_bool(dev->of_node, in sec_pmic_i2c_parse_dt_pdata()
267 "samsung,s2mps11-wrstbi-ground"); in sec_pmic_i2c_parse_dt_pdata()
279 sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev), in sec_pmic_probe()
282 return -ENOMEM; in sec_pmic_probe()
285 sec_pmic->dev = &i2c->dev; in sec_pmic_probe()
286 sec_pmic->i2c = i2c; in sec_pmic_probe()
287 sec_pmic->irq = i2c->irq; in sec_pmic_probe()
289 pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); in sec_pmic_probe()
295 sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); in sec_pmic_probe()
296 sec_pmic->pdata = pdata; in sec_pmic_probe()
298 switch (sec_pmic->device_type) { in sec_pmic_probe()
325 sec_pmic->regmap_pmic = devm_regmap_init_i2c(i2c, regmap); in sec_pmic_probe()
326 if (IS_ERR(sec_pmic->regmap_pmic)) { in sec_pmic_probe()
327 ret = PTR_ERR(sec_pmic->regmap_pmic); in sec_pmic_probe()
328 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in sec_pmic_probe()
335 pm_runtime_set_active(sec_pmic->dev); in sec_pmic_probe()
337 switch (sec_pmic->device_type) { in sec_pmic_probe()
367 dev_err(&i2c->dev, "Unsupported device type (%lu)\n", in sec_pmic_probe()
368 sec_pmic->device_type); in sec_pmic_probe()
369 return -ENODEV; in sec_pmic_probe()
371 ret = devm_mfd_add_devices(sec_pmic->dev, -1, sec_devs, num_sec_devs, in sec_pmic_probe()
387 if (!sec_pmic->pdata->manual_poweroff) in sec_pmic_shutdown()
390 switch (sec_pmic->device_type) { in sec_pmic_shutdown()
400 dev_warn(sec_pmic->dev, in sec_pmic_shutdown()
402 sec_pmic->device_type); in sec_pmic_shutdown()
406 regmap_update_bits(sec_pmic->regmap_pmic, reg, mask, 0); in sec_pmic_shutdown()
415 enable_irq_wake(sec_pmic->irq); in sec_pmic_suspend()
425 disable_irq(sec_pmic->irq); in sec_pmic_suspend()
436 disable_irq_wake(sec_pmic->irq); in sec_pmic_resume()
437 enable_irq(sec_pmic->irq); in sec_pmic_resume()