Lines Matching refs:pca9450
32 struct pca9450 { struct
667 struct pca9450 *pca9450 = data; in pca9450_irq_handler() local
668 struct regmap *regmap = pca9450->regmap; in pca9450_irq_handler()
674 dev_err(pca9450->dev, in pca9450_irq_handler()
680 dev_warn(pca9450->dev, "PWRON interrupt.\n"); in pca9450_irq_handler()
683 dev_warn(pca9450->dev, "WDOGB interrupt.\n"); in pca9450_irq_handler()
686 dev_warn(pca9450->dev, "VRFLT1 interrupt.\n"); in pca9450_irq_handler()
689 dev_warn(pca9450->dev, "VRFLT2 interrupt.\n"); in pca9450_irq_handler()
692 dev_warn(pca9450->dev, "LOWVSYS interrupt.\n"); in pca9450_irq_handler()
695 dev_warn(pca9450->dev, "IRQ_THERM_105 interrupt.\n"); in pca9450_irq_handler()
698 dev_warn(pca9450->dev, "IRQ_THERM_125 interrupt.\n"); in pca9450_irq_handler()
709 struct pca9450 *pca9450; in pca9450_i2c_probe() local
719 pca9450 = devm_kzalloc(&i2c->dev, sizeof(struct pca9450), GFP_KERNEL); in pca9450_i2c_probe()
720 if (!pca9450) in pca9450_i2c_probe()
726 pca9450->rcnt = ARRAY_SIZE(pca9450a_regulators); in pca9450_i2c_probe()
730 pca9450->rcnt = ARRAY_SIZE(pca9450bc_regulators); in pca9450_i2c_probe()
737 pca9450->irq = i2c->irq; in pca9450_i2c_probe()
738 pca9450->type = type; in pca9450_i2c_probe()
739 pca9450->dev = &i2c->dev; in pca9450_i2c_probe()
741 dev_set_drvdata(&i2c->dev, pca9450); in pca9450_i2c_probe()
743 pca9450->regmap = devm_regmap_init_i2c(i2c, in pca9450_i2c_probe()
745 if (IS_ERR(pca9450->regmap)) { in pca9450_i2c_probe()
747 return PTR_ERR(pca9450->regmap); in pca9450_i2c_probe()
750 ret = regmap_read(pca9450->regmap, PCA9450_REG_DEV_ID, &device_id); in pca9450_i2c_probe()
764 for (i = 0; i < pca9450->rcnt; i++) { in pca9450_i2c_probe()
772 config.regmap = pca9450->regmap; in pca9450_i2c_probe()
773 config.dev = pca9450->dev; in pca9450_i2c_probe()
775 rdev = devm_regulator_register(pca9450->dev, desc, &config); in pca9450_i2c_probe()
778 dev_err(pca9450->dev, in pca9450_i2c_probe()
785 ret = devm_request_threaded_irq(pca9450->dev, pca9450->irq, NULL, in pca9450_i2c_probe()
788 "pca9450-irq", pca9450); in pca9450_i2c_probe()
790 dev_err(pca9450->dev, "Failed to request IRQ: %d\n", in pca9450_i2c_probe()
791 pca9450->irq); in pca9450_i2c_probe()
795 ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_INT1_MSK, in pca9450_i2c_probe()
805 ret = regmap_clear_bits(pca9450->regmap, PCA9450_REG_BUCK123_DVS, in pca9450_i2c_probe()
818 ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_RESET_CTRL, in pca9450_i2c_probe()
827 ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_CONFIG2, in pca9450_i2c_probe()
841 pca9450->sd_vsel_gpio = gpiod_get_optional(pca9450->dev, "sd-vsel", GPIOD_OUT_HIGH); in pca9450_i2c_probe()
843 if (IS_ERR(pca9450->sd_vsel_gpio)) { in pca9450_i2c_probe()
845 return PTR_ERR(pca9450->sd_vsel_gpio); in pca9450_i2c_probe()