Loading drivers/mfd/qcom-spmi-pmic.c +15 −13 Original line number Diff line number Diff line /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2014, 2017-2018, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> #include <linux/module.h> Loading Loading @@ -124,10 +114,22 @@ static const struct regmap_config spmi_regmap_config = { .fast_io = true, }; static const struct regmap_config spmi_regmap_can_sleep_config = { .reg_bits = 16, .val_bits = 8, .max_register = 0xffff, .fast_io = false, }; static int pmic_spmi_probe(struct spmi_device *sdev) { struct device_node *root = sdev->dev.of_node; struct regmap *regmap; if (of_property_read_bool(root, "qcom,can-sleep")) regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_can_sleep_config); else regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config); if (IS_ERR(regmap)) return PTR_ERR(regmap); Loading Loading
drivers/mfd/qcom-spmi-pmic.c +15 −13 Original line number Diff line number Diff line /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2014, 2017-2018, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> #include <linux/module.h> Loading Loading @@ -124,10 +114,22 @@ static const struct regmap_config spmi_regmap_config = { .fast_io = true, }; static const struct regmap_config spmi_regmap_can_sleep_config = { .reg_bits = 16, .val_bits = 8, .max_register = 0xffff, .fast_io = false, }; static int pmic_spmi_probe(struct spmi_device *sdev) { struct device_node *root = sdev->dev.of_node; struct regmap *regmap; if (of_property_read_bool(root, "qcom,can-sleep")) regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_can_sleep_config); else regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config); if (IS_ERR(regmap)) return PTR_ERR(regmap); Loading