Symbol: pf0900
drivers/regulator/pf0900-regulator.c
350
struct pf0900 *pf0900 = dev_get_drvdata(dev);
drivers/regulator/pf0900-regulator.c
354
if (!pf0900 || !pf0900->dev)
drivers/regulator/pf0900-regulator.c
358
dev_err(pf0900->dev, "Invalid register address: 0x%x\n", reg);
drivers/regulator/pf0900-regulator.c
362
if (pf0900->crc_en) {
drivers/regulator/pf0900-regulator.c
365
dev_err(pf0900->dev, "Read error at reg=0x%x: %d\n", reg, ret);
drivers/regulator/pf0900-regulator.c
370
crc = crc8_j1850(pf0900->addr << 1 | 0x1, reg, FIELD_GET(GENMASK(7, 0), *val));
drivers/regulator/pf0900-regulator.c
372
dev_err(pf0900->dev, "Crc check error!\n");
drivers/regulator/pf0900-regulator.c
379
dev_err(pf0900->dev, "Read error at reg=0x%x: %d\n", reg, ret);
drivers/regulator/pf0900-regulator.c
393
struct pf0900 *pf0900 = dev_get_drvdata(dev);
drivers/regulator/pf0900-regulator.c
397
if (!pf0900 || !pf0900->dev)
drivers/regulator/pf0900-regulator.c
401
dev_err(pf0900->dev, "Invalid register address: 0x%x\n", reg);
drivers/regulator/pf0900-regulator.c
406
if (pf0900->crc_en) {
drivers/regulator/pf0900-regulator.c
408
data[1] = crc8_j1850(pf0900->addr << 1, reg, data[0]);
drivers/regulator/pf0900-regulator.c
416
dev_err(pf0900->dev, "Write reg=0x%x error!\n", reg);
drivers/regulator/pf0900-regulator.c
786
struct pf0900 *pf0900 = data;
drivers/regulator/pf0900-regulator.c
790
ret = regmap_read(pf0900->regmap, regu_irqs[i].reg, &val);
drivers/regulator/pf0900-regulator.c
792
dev_err(pf0900->dev, "Failed to read %d\n", ret);
drivers/regulator/pf0900-regulator.c
796
ret = regmap_write_bits(pf0900->regmap, regu_irqs[i].reg, val, val);
drivers/regulator/pf0900-regulator.c
798
dev_err(pf0900->dev, "Failed to update %d\n", ret);
drivers/regulator/pf0900-regulator.c
806
regulator_notifier_call_chain(pf0900->rdevs[regu],
drivers/regulator/pf0900-regulator.c
815
regulator_notifier_call_chain(pf0900->rdevs[regu],
drivers/regulator/pf0900-regulator.c
834
struct pf0900 *pf0900;
drivers/regulator/pf0900-regulator.c
840
pf0900 = devm_kzalloc(&i2c->dev, sizeof(struct pf0900), GFP_KERNEL);
drivers/regulator/pf0900-regulator.c
841
if (!pf0900)
drivers/regulator/pf0900-regulator.c
849
pf0900->drvdata = drvdata;
drivers/regulator/pf0900-regulator.c
850
pf0900->crc_en = of_property_read_bool(np, "nxp,i2c-crc-enable");
drivers/regulator/pf0900-regulator.c
851
pf0900->irq = i2c->irq;
drivers/regulator/pf0900-regulator.c
852
pf0900->dev = &i2c->dev;
drivers/regulator/pf0900-regulator.c
853
pf0900->addr = i2c->addr;
drivers/regulator/pf0900-regulator.c
855
dev_set_drvdata(&i2c->dev, pf0900);
drivers/regulator/pf0900-regulator.c
857
pf0900->regmap = devm_regmap_init(&i2c->dev, &pf0900_regmap_bus, &i2c->dev,
drivers/regulator/pf0900-regulator.c
859
if (IS_ERR(pf0900->regmap))
drivers/regulator/pf0900-regulator.c
860
return dev_err_probe(&i2c->dev, PTR_ERR(pf0900->regmap),
drivers/regulator/pf0900-regulator.c
862
ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_ID, &device_id);
drivers/regulator/pf0900-regulator.c
866
ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_FAM, &device_fam);
drivers/regulator/pf0900-regulator.c
881
config.regmap = pf0900->regmap;
drivers/regulator/pf0900-regulator.c
883
config.dev = pf0900->dev;
drivers/regulator/pf0900-regulator.c
885
pf0900->rdevs[i] = devm_regulator_register(pf0900->dev, desc, &config);
drivers/regulator/pf0900-regulator.c
886
if (IS_ERR(pf0900->rdevs[i]))
drivers/regulator/pf0900-regulator.c
887
return dev_err_probe(pf0900->dev, PTR_ERR(pf0900->rdevs[i]),
drivers/regulator/pf0900-regulator.c
891
ret = devm_request_threaded_irq(pf0900->dev, pf0900->irq, NULL,
drivers/regulator/pf0900-regulator.c
894
"pf0900-irq", pf0900);
drivers/regulator/pf0900-regulator.c
897
return dev_err_probe(pf0900->dev, ret, "Failed to request IRQ: %d\n",
drivers/regulator/pf0900-regulator.c
898
pf0900->irq);
drivers/regulator/pf0900-regulator.c
904
ret = regmap_write_bits(pf0900->regmap, PF0900_REG_STATUS1_INT, PF0900_IRQ_PWRUP,
drivers/regulator/pf0900-regulator.c
910
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_STATUS1_MSK, PF0900_IRQ_PWRUP,
drivers/regulator/pf0900-regulator.c
915
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_ILIM_MSK, PF0900_IRQ_SW1_IL |
drivers/regulator/pf0900-regulator.c
921
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_UV_MSK, PF0900_IRQ_SW1_UV |
drivers/regulator/pf0900-regulator.c
927
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_OV_MSK, PF0900_IRQ_SW1_OV |
drivers/regulator/pf0900-regulator.c
933
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_ILIM_MSK, PF0900_IRQ_LDO1_IL |
drivers/regulator/pf0900-regulator.c
938
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_UV_MSK, PF0900_IRQ_LDO1_UV |
drivers/regulator/pf0900-regulator.c
943
ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_OV_MSK, PF0900_IRQ_LDO1_OV |