From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH v2 6/7] mfd: pm8921: Add DT match table Date: Mon, 6 Jan 2014 11:52:49 +0000 Message-ID: <20140106115249.GD30156@lee--X1> References: <1387831563-13535-1-git-send-email-sboyd@codeaurora.org> <1387831563-13535-7-git-send-email-sboyd@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-we0-f171.google.com ([74.125.82.171]:63872 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144AbaAFLwy (ORCPT ); Mon, 6 Jan 2014 06:52:54 -0500 Received: by mail-we0-f171.google.com with SMTP id q58so15462488wes.2 for ; Mon, 06 Jan 2014 03:52:53 -0800 (PST) Content-Disposition: inline In-Reply-To: <1387831563-13535-7-git-send-email-sboyd@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Stephen Boyd Cc: Samuel Ortiz , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org > Allow this driver to probe based on devicetree. >=20 > Signed-off-by: Stephen Boyd > --- > drivers/mfd/pm8921-core.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c > index d13cb6e..290f0da 100644 > --- a/drivers/mfd/pm8921-core.c > +++ b/drivers/mfd/pm8921-core.c > @@ -420,6 +420,13 @@ static const struct regmap_config ssbi_regmap_co= nfig =3D { > .reg_write =3D ssbi_reg_write > }; > =20 > +static const struct of_device_id pm8921_id_table[] =3D { > + { .compatible =3D "qcom,pm8058", }, > + { .compatible =3D "qcom,pm8921", }, > + { } > +}; > +MODULE_DEVICE_TABLE(of, pm8921_id_table); > + > static int pm8921_probe(struct platform_device *pdev) > { > struct pm8921 *pmic; > @@ -429,7 +436,6 @@ static int pm8921_probe(struct platform_device *p= dev) > unsigned int irq; > u32 rev; > =20 > - Sneaky! > irq =3D platform_get_irq(pdev, 0); > if (irq < 0) > return irq; > @@ -494,6 +500,7 @@ static struct platform_driver pm8921_driver =3D { > .driver =3D { > .name =3D "pm8921-core", > .owner =3D THIS_MODULE, > + .of_match_table =3D pm8921_id_table, > }, > }; Patch fine: Acked-by: Lee Jones --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Mon, 6 Jan 2014 11:52:49 +0000 Subject: [PATCH v2 6/7] mfd: pm8921: Add DT match table In-Reply-To: <1387831563-13535-7-git-send-email-sboyd@codeaurora.org> References: <1387831563-13535-1-git-send-email-sboyd@codeaurora.org> <1387831563-13535-7-git-send-email-sboyd@codeaurora.org> Message-ID: <20140106115249.GD30156@lee--X1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > Allow this driver to probe based on devicetree. > > Signed-off-by: Stephen Boyd > --- > drivers/mfd/pm8921-core.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c > index d13cb6e..290f0da 100644 > --- a/drivers/mfd/pm8921-core.c > +++ b/drivers/mfd/pm8921-core.c > @@ -420,6 +420,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; > @@ -429,7 +436,6 @@ static int pm8921_probe(struct platform_device *pdev) > unsigned int irq; > u32 rev; > > - Sneaky! > irq = platform_get_irq(pdev, 0); > if (irq < 0) > return irq; > @@ -494,6 +500,7 @@ static struct platform_driver pm8921_driver = { > .driver = { > .name = "pm8921-core", > .owner = THIS_MODULE, > + .of_match_table = pm8921_id_table, > }, > }; Patch fine: Acked-by: Lee Jones -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog