• Home
  • Raw
  • Download

Lines Matching refs:axp20x

839 int axp20x_match_device(struct axp20x_dev *axp20x)  in axp20x_match_device()  argument
841 struct device *dev = axp20x->dev; in axp20x_match_device()
851 axp20x->variant = (long)of_id->data; in axp20x_match_device()
858 axp20x->variant = (long)acpi_id->driver_data; in axp20x_match_device()
861 switch (axp20x->variant) { in axp20x_match_device()
863 axp20x->nr_cells = ARRAY_SIZE(axp152_cells); in axp20x_match_device()
864 axp20x->cells = axp152_cells; in axp20x_match_device()
865 axp20x->regmap_cfg = &axp152_regmap_config; in axp20x_match_device()
866 axp20x->regmap_irq_chip = &axp152_regmap_irq_chip; in axp20x_match_device()
870 axp20x->nr_cells = ARRAY_SIZE(axp20x_cells); in axp20x_match_device()
871 axp20x->cells = axp20x_cells; in axp20x_match_device()
872 axp20x->regmap_cfg = &axp20x_regmap_config; in axp20x_match_device()
873 axp20x->regmap_irq_chip = &axp20x_regmap_irq_chip; in axp20x_match_device()
876 axp20x->nr_cells = ARRAY_SIZE(axp221_cells); in axp20x_match_device()
877 axp20x->cells = axp221_cells; in axp20x_match_device()
878 axp20x->regmap_cfg = &axp22x_regmap_config; in axp20x_match_device()
879 axp20x->regmap_irq_chip = &axp22x_regmap_irq_chip; in axp20x_match_device()
882 axp20x->nr_cells = ARRAY_SIZE(axp223_cells); in axp20x_match_device()
883 axp20x->cells = axp223_cells; in axp20x_match_device()
884 axp20x->regmap_cfg = &axp22x_regmap_config; in axp20x_match_device()
885 axp20x->regmap_irq_chip = &axp22x_regmap_irq_chip; in axp20x_match_device()
888 axp20x->cells = axp288_cells; in axp20x_match_device()
889 axp20x->nr_cells = ARRAY_SIZE(axp288_cells); in axp20x_match_device()
890 axp20x->regmap_cfg = &axp288_regmap_config; in axp20x_match_device()
891 axp20x->regmap_irq_chip = &axp288_regmap_irq_chip; in axp20x_match_device()
892 axp20x->irq_flags = IRQF_TRIGGER_LOW; in axp20x_match_device()
895 axp20x->nr_cells = ARRAY_SIZE(axp803_cells); in axp20x_match_device()
896 axp20x->cells = axp803_cells; in axp20x_match_device()
897 axp20x->regmap_cfg = &axp288_regmap_config; in axp20x_match_device()
898 axp20x->regmap_irq_chip = &axp803_regmap_irq_chip; in axp20x_match_device()
905 if (of_property_read_bool(axp20x->dev->of_node, in axp20x_match_device()
907 axp20x->irq > 0) { in axp20x_match_device()
908 axp20x->nr_cells = ARRAY_SIZE(axp806_self_working_cells); in axp20x_match_device()
909 axp20x->cells = axp806_self_working_cells; in axp20x_match_device()
911 axp20x->nr_cells = ARRAY_SIZE(axp806_cells); in axp20x_match_device()
912 axp20x->cells = axp806_cells; in axp20x_match_device()
914 axp20x->regmap_cfg = &axp806_regmap_config; in axp20x_match_device()
915 axp20x->regmap_irq_chip = &axp806_regmap_irq_chip; in axp20x_match_device()
918 axp20x->nr_cells = ARRAY_SIZE(axp809_cells); in axp20x_match_device()
919 axp20x->cells = axp809_cells; in axp20x_match_device()
920 axp20x->regmap_cfg = &axp22x_regmap_config; in axp20x_match_device()
921 axp20x->regmap_irq_chip = &axp809_regmap_irq_chip; in axp20x_match_device()
924 axp20x->nr_cells = ARRAY_SIZE(axp813_cells); in axp20x_match_device()
925 axp20x->cells = axp813_cells; in axp20x_match_device()
926 axp20x->regmap_cfg = &axp288_regmap_config; in axp20x_match_device()
934 axp20x->regmap_irq_chip = &axp803_regmap_irq_chip; in axp20x_match_device()
937 dev_err(dev, "unsupported AXP20X ID %lu\n", axp20x->variant); in axp20x_match_device()
941 axp20x_model_names[axp20x->variant]); in axp20x_match_device()
947 int axp20x_device_probe(struct axp20x_dev *axp20x) in axp20x_device_probe() argument
969 if (axp20x->variant == AXP806_ID) { in axp20x_device_probe()
970 if (of_property_read_bool(axp20x->dev->of_node, in axp20x_device_probe()
972 of_property_read_bool(axp20x->dev->of_node, in axp20x_device_probe()
974 regmap_write(axp20x->regmap, AXP806_REG_ADDR_EXT, in axp20x_device_probe()
977 regmap_write(axp20x->regmap, AXP806_REG_ADDR_EXT, in axp20x_device_probe()
982 if (axp20x->irq > 0) { in axp20x_device_probe()
983 ret = regmap_add_irq_chip(axp20x->regmap, axp20x->irq, in axp20x_device_probe()
984 IRQF_ONESHOT | IRQF_SHARED | axp20x->irq_flags, in axp20x_device_probe()
985 -1, axp20x->regmap_irq_chip, in axp20x_device_probe()
986 &axp20x->regmap_irqc); in axp20x_device_probe()
988 dev_err(axp20x->dev, "failed to add irq chip: %d\n", in axp20x_device_probe()
994 ret = mfd_add_devices(axp20x->dev, -1, axp20x->cells, in axp20x_device_probe()
995 axp20x->nr_cells, NULL, 0, NULL); in axp20x_device_probe()
998 dev_err(axp20x->dev, "failed to add MFD devices: %d\n", ret); in axp20x_device_probe()
999 regmap_del_irq_chip(axp20x->irq, axp20x->regmap_irqc); in axp20x_device_probe()
1004 axp20x_pm_power_off = axp20x; in axp20x_device_probe()
1008 dev_info(axp20x->dev, "AXP20X driver loaded\n"); in axp20x_device_probe()
1014 void axp20x_device_remove(struct axp20x_dev *axp20x) in axp20x_device_remove() argument
1016 if (axp20x == axp20x_pm_power_off) { in axp20x_device_remove()
1021 mfd_remove_devices(axp20x->dev); in axp20x_device_remove()
1022 regmap_del_irq_chip(axp20x->irq, axp20x->regmap_irqc); in axp20x_device_remove()