Loading drivers/soc/qcom/smem.c +35 −0 Original line number Diff line number Diff line Loading @@ -1057,6 +1057,40 @@ static int qcom_smem_remove(struct platform_device *pdev) return 0; } static int qcom_smem_freeze(struct device *dev) { struct platform_device *pdev = container_of(dev, struct platform_device, dev); dev_dbg(dev, "%s\n", __func__); qcom_smem_remove(pdev); return 0; } static int qcom_smem_restore(struct device *dev) { int ret = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); dev_dbg(dev, "%s\n", __func__); /* * SMEM related information has to fetched again * during resuming from Hibernation, Hence call probe. */ ret = qcom_smem_probe(pdev); if (ret) dev_err(dev, "Error getting SMEM information"); return ret; } static const struct dev_pm_ops qcom_smem_pm_ops = { .freeze = qcom_smem_freeze, .restore = qcom_smem_restore, }; static const struct of_device_id qcom_smem_of_match[] = { { .compatible = "qcom,smem" }, {} Loading @@ -1070,6 +1104,7 @@ static struct platform_driver qcom_smem_driver = { .name = "qcom-smem", .of_match_table = qcom_smem_of_match, .suppress_bind_attrs = true, .pm = &qcom_smem_pm_ops, }, }; Loading Loading
drivers/soc/qcom/smem.c +35 −0 Original line number Diff line number Diff line Loading @@ -1057,6 +1057,40 @@ static int qcom_smem_remove(struct platform_device *pdev) return 0; } static int qcom_smem_freeze(struct device *dev) { struct platform_device *pdev = container_of(dev, struct platform_device, dev); dev_dbg(dev, "%s\n", __func__); qcom_smem_remove(pdev); return 0; } static int qcom_smem_restore(struct device *dev) { int ret = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); dev_dbg(dev, "%s\n", __func__); /* * SMEM related information has to fetched again * during resuming from Hibernation, Hence call probe. */ ret = qcom_smem_probe(pdev); if (ret) dev_err(dev, "Error getting SMEM information"); return ret; } static const struct dev_pm_ops qcom_smem_pm_ops = { .freeze = qcom_smem_freeze, .restore = qcom_smem_restore, }; static const struct of_device_id qcom_smem_of_match[] = { { .compatible = "qcom,smem" }, {} Loading @@ -1070,6 +1104,7 @@ static struct platform_driver qcom_smem_driver = { .name = "qcom-smem", .of_match_table = qcom_smem_of_match, .suppress_bind_attrs = true, .pm = &qcom_smem_pm_ops, }, }; Loading