Lines Matching +full:36 +full:- +full:bit

1 // SPDX-License-Identifier: GPL-2.0
15 #include <dt-bindings/mfd/st,stpmic1.h>
63 REGULATOR_LINEAR_RANGE(725000, 5, 36, 25000),
78 REGULATOR_LINEAR_RANGE(1500000, 36, 63, 0),
87 REGULATOR_LINEAR_RANGE(1500000, 36, 55, 100000),
97 REGULATOR_LINEAR_RANGE(1500000, 36, 60, 100000),
361 .icc_mask = BIT(0),
363 .mask_reset_mask = BIT(0),
368 .icc_mask = BIT(1),
370 .mask_reset_mask = BIT(1),
375 .icc_mask = BIT(2),
377 .mask_reset_mask = BIT(2),
382 .icc_mask = BIT(3),
384 .mask_reset_mask = BIT(3),
389 .icc_mask = BIT(0),
391 .mask_reset_mask = BIT(0),
396 .icc_mask = BIT(1),
398 .mask_reset_mask = BIT(1),
403 .icc_mask = BIT(2),
405 .mask_reset_mask = BIT(2),
410 .icc_mask = BIT(3),
412 .mask_reset_mask = BIT(3),
417 .icc_mask = BIT(4),
419 .mask_reset_mask = BIT(4),
424 .icc_mask = BIT(5),
426 .mask_reset_mask = BIT(5),
431 .mask_reset_mask = BIT(6),
436 .icc_mask = BIT(6),
441 .icc_mask = BIT(4),
446 .icc_mask = BIT(5),
467 regmap_read(regmap, rdev->desc->enable_reg, &value); in stpmic1_get_mode()
488 return -EINVAL; in stpmic1_set_mode()
491 return regmap_update_bits(regmap, rdev->desc->enable_reg, in stpmic1_set_mode()
502 * The code seems like one bit in a register controls whether OCP is in stpmic1_set_icc()
513 return -EINVAL; in stpmic1_set_icc()
516 return regmap_update_bits(regmap, cfg->icc_reg, cfg->icc_mask, in stpmic1_set_icc()
517 cfg->icc_mask); in stpmic1_set_icc()
559 struct stpmic1 *pmic_dev = dev_get_drvdata(pdev->dev.parent); in stpmic1_regulator_register()
565 config.dev = &pdev->dev; in stpmic1_regulator_register()
566 config.init_data = match->init_data; in stpmic1_regulator_register()
567 config.of_node = match->of_node; in stpmic1_regulator_register()
568 config.regmap = pmic_dev->regmap; in stpmic1_regulator_register()
571 rdev = devm_regulator_register(&pdev->dev, &cfg->desc, &config); in stpmic1_regulator_register()
573 dev_err(&pdev->dev, "failed to register %s regulator\n", in stpmic1_regulator_register()
574 cfg->desc.name); in stpmic1_regulator_register()
579 if (of_get_property(config.of_node, "st,mask-reset", NULL) && in stpmic1_regulator_register()
580 cfg->mask_reset_reg != 0) { in stpmic1_regulator_register()
581 ret = regmap_update_bits(pmic_dev->regmap, in stpmic1_regulator_register()
582 cfg->mask_reset_reg, in stpmic1_regulator_register()
583 cfg->mask_reset_mask, in stpmic1_regulator_register()
584 cfg->mask_reset_mask); in stpmic1_regulator_register()
586 dev_err(&pdev->dev, "set mask reset failed\n"); in stpmic1_regulator_register()
591 /* setup an irq handler for over-current detection */ in stpmic1_regulator_register()
594 ret = devm_request_threaded_irq(&pdev->dev, in stpmic1_regulator_register()
598 pdev->name, rdev); in stpmic1_regulator_register()
600 dev_err(&pdev->dev, "Request IRQ failed\n"); in stpmic1_regulator_register()
611 ret = of_regulator_match(&pdev->dev, pdev->dev.of_node, stpmic1_matches, in stpmic1_regulator_probe()
614 dev_err(&pdev->dev, in stpmic1_regulator_probe()
626 dev_dbg(&pdev->dev, "stpmic1_regulator driver probed\n"); in stpmic1_regulator_probe()
632 { .compatible = "st,stpmic1-regulators" },
640 .name = "stpmic1-regulator",