mfd: pm8921: Add DT match table
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 26 Feb 2014 18:59:24 +0000 (10:59 -0800)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Mar 2014 08:58:31 +0000 (08:58 +0000)
Allow this driver to probe based on devicetree.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/pm8921-core.c

index e9340bd6d1abb709753ba41e67af6ff3fe4dba65..3aab6ace5eb5dd2574fe5e3d02a5285e1e38a343 100644 (file)
@@ -392,6 +392,13 @@ static const struct regmap_config ssbi_regmap_config = {
        .reg_write = ssbi_reg_write
 };
 
+static const struct of_device_id pm8921_id_table[] = {
+       { .compatible = "qcom,pm8058", },
+       { .compatible = "qcom,pm8921", },
+       { }
+};
+MODULE_DEVICE_TABLE(of, pm8921_id_table);
+
 static int pm8921_probe(struct platform_device *pdev)
 {
        struct pm8921 *pmic;
@@ -501,6 +508,7 @@ static struct platform_driver pm8921_driver = {
        .driver         = {
                .name   = "pm8921-core",
                .owner  = THIS_MODULE,
+               .of_match_table = pm8921_id_table,
        },
 };