Lines Matching +full:bd71828 +full:- +full:pmic

1 // SPDX-License-Identifier: GPL-2.0-only
5 // ROHM BD71828 PMIC driver
14 #include <linux/mfd/rohm-bd71828.h>
22 .gpio = -1,
29 .name = "bd71828-pwrkey",
33 DEFINE_RES_IRQ_NAMED(BD71828_INT_RTC0, "bd71828-rtc-alm-0"),
34 DEFINE_RES_IRQ_NAMED(BD71828_INT_RTC1, "bd71828-rtc-alm-1"),
35 DEFINE_RES_IRQ_NAMED(BD71828_INT_RTC2, "bd71828-rtc-alm-2"),
39 { .name = "bd71828-pmic", },
40 { .name = "bd71828-gpio", },
41 { .name = "bd71828-led", .of_compatible = "rohm,bd71828-leds" },
46 { .name = "bd71828-clk", },
47 { .name = "bd71827-power", },
49 .name = "bd71828-rtc",
53 .name = "gpio-keys",
97 * Mapping of main IRQ register bits to sub-IRQ register offsets so that we can
98 * access corect sub-IRQ registers based on bits that are set in main IRQ
281 if (!i2c->irq) { in bd71828_i2c_probe()
282 dev_err(&i2c->dev, "No IRQ configured\n"); in bd71828_i2c_probe()
283 return -EINVAL; in bd71828_i2c_probe()
286 chip = devm_kzalloc(&i2c->dev, sizeof(*chip), GFP_KERNEL); in bd71828_i2c_probe()
288 return -ENOMEM; in bd71828_i2c_probe()
290 dev_set_drvdata(&i2c->dev, chip); in bd71828_i2c_probe()
292 chip->regmap = devm_regmap_init_i2c(i2c, &bd71828_regmap); in bd71828_i2c_probe()
293 if (IS_ERR(chip->regmap)) { in bd71828_i2c_probe()
294 dev_err(&i2c->dev, "Failed to initialize Regmap\n"); in bd71828_i2c_probe()
295 return PTR_ERR(chip->regmap); in bd71828_i2c_probe()
298 ret = devm_regmap_add_irq_chip(&i2c->dev, chip->regmap, in bd71828_i2c_probe()
299 i2c->irq, IRQF_ONESHOT, 0, in bd71828_i2c_probe()
302 dev_err(&i2c->dev, "Failed to add IRQ chip\n"); in bd71828_i2c_probe()
306 dev_dbg(&i2c->dev, "Registered %d IRQs for chip\n", in bd71828_i2c_probe()
311 dev_err(&i2c->dev, "Failed to get the power-key IRQ\n"); in bd71828_i2c_probe()
317 ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_AUTO, in bd71828_i2c_probe()
322 dev_err(&i2c->dev, "Failed to create subdevices\n"); in bd71828_i2c_probe()
328 { .compatible = "rohm,bd71828", },
335 .name = "rohm-bd71828",
343 MODULE_DESCRIPTION("ROHM BD71828 Power Management IC driver");