* [PATCH] Input: mma8450: add device tree probe support
@ 2011-07-21 16:25 Shawn Guo
2011-07-29 2:38 ` Shawn Guo
2011-07-31 3:07 ` Grant Likely
0 siblings, 2 replies; 5+ messages in thread
From: Shawn Guo @ 2011-07-21 16:25 UTC (permalink / raw)
To: linux-input-u79uwXL29TY76Z2rM5mHXA
Cc: patches-QSEj5FYQhm4dnm+yROfE0A, Dmitry Torokhov,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Eric Miao, Sammy He
It adds device tree probe support for mma8450 driver.
Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: Sammy He <r62914-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: Eric Miao <eric.miao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Dmitry Torokhov <dtor-JGs/UdohzUI@public.gmane.org>
---
.../devicetree/bindings/input/fsl-mma8450.txt | 11 +++++++++++
drivers/input/misc/mma8450.c | 8 ++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/input/fsl-mma8450.txt
diff --git a/Documentation/devicetree/bindings/input/fsl-mma8450.txt b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
new file mode 100644
index 0000000..a00c94c
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
@@ -0,0 +1,11 @@
+* Freescale MMA8450 3-Axis Accelerometer
+
+Required properties:
+- compatible : "fsl,mma8450".
+
+Example:
+
+accelerometer: mma8450@1c {
+ compatible = "fsl,mma8450";
+ reg = <0x1c>;
+};
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
index 20f8f92..6c76cf7 100644
--- a/drivers/input/misc/mma8450.c
+++ b/drivers/input/misc/mma8450.c
@@ -24,6 +24,7 @@
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/input-polldev.h>
+#include <linux/of_device.h>
#define MMA8450_DRV_NAME "mma8450"
@@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = {
};
MODULE_DEVICE_TABLE(i2c, mma8450_id);
+static const struct of_device_id mma8450_dt_ids[] = {
+ { .compatible = "fsl,mma8450", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids);
+
static struct i2c_driver mma8450_driver = {
.driver = {
.name = MMA8450_DRV_NAME,
.owner = THIS_MODULE,
+ .of_match_table = mma8450_dt_ids,
},
.probe = mma8450_probe,
.remove = __devexit_p(mma8450_remove),
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mma8450: add device tree probe support
2011-07-21 16:25 [PATCH] Input: mma8450: add device tree probe support Shawn Guo
@ 2011-07-29 2:38 ` Shawn Guo
2011-07-29 3:00 ` Eric Miao
2011-07-31 3:07 ` Grant Likely
1 sibling, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2011-07-29 2:38 UTC (permalink / raw)
To: Shawn Guo
Cc: linux-input, patches, Dmitry Torokhov, devicetree-discuss,
Eric Miao, Sammy He
Any comments?
Regards,
Shawn
On Fri, Jul 22, 2011 at 12:25:51AM +0800, Shawn Guo wrote:
> It adds device tree probe support for mma8450 driver.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Sammy He <r62914@freescale.com>
> Cc: Eric Miao <eric.miao@linaro.org>
> Cc: Dmitry Torokhov <dtor@mail.ru>
> ---
> .../devicetree/bindings/input/fsl-mma8450.txt | 11 +++++++++++
> drivers/input/misc/mma8450.c | 8 ++++++++
> 2 files changed, 19 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/input/fsl-mma8450.txt
>
> diff --git a/Documentation/devicetree/bindings/input/fsl-mma8450.txt b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
> new file mode 100644
> index 0000000..a00c94c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
> @@ -0,0 +1,11 @@
> +* Freescale MMA8450 3-Axis Accelerometer
> +
> +Required properties:
> +- compatible : "fsl,mma8450".
> +
> +Example:
> +
> +accelerometer: mma8450@1c {
> + compatible = "fsl,mma8450";
> + reg = <0x1c>;
> +};
> diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
> index 20f8f92..6c76cf7 100644
> --- a/drivers/input/misc/mma8450.c
> +++ b/drivers/input/misc/mma8450.c
> @@ -24,6 +24,7 @@
> #include <linux/delay.h>
> #include <linux/i2c.h>
> #include <linux/input-polldev.h>
> +#include <linux/of_device.h>
>
> #define MMA8450_DRV_NAME "mma8450"
>
> @@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, mma8450_id);
>
> +static const struct of_device_id mma8450_dt_ids[] = {
> + { .compatible = "fsl,mma8450", },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids);
> +
> static struct i2c_driver mma8450_driver = {
> .driver = {
> .name = MMA8450_DRV_NAME,
> .owner = THIS_MODULE,
> + .of_match_table = mma8450_dt_ids,
> },
> .probe = mma8450_probe,
> .remove = __devexit_p(mma8450_remove),
> --
> 1.7.4.1
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mma8450: add device tree probe support
2011-07-29 2:38 ` Shawn Guo
@ 2011-07-29 3:00 ` Eric Miao
0 siblings, 0 replies; 5+ messages in thread
From: Eric Miao @ 2011-07-29 3:00 UTC (permalink / raw)
To: Shawn Guo
Cc: Shawn Guo, linux-input, patches, Dmitry Torokhov,
devicetree-discuss, Sammy He
On Fri, Jul 29, 2011 at 10:38 AM, Shawn Guo <shawn.guo@freescale.com> wrote:
> Any comments?
>
Shawn,
Patch looks OK to me.
> Regards,
> Shawn
>
> On Fri, Jul 22, 2011 at 12:25:51AM +0800, Shawn Guo wrote:
>> It adds device tree probe support for mma8450 driver.
>>
>> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
>> Cc: Grant Likely <grant.likely@secretlab.ca>
>> Cc: Sammy He <r62914@freescale.com>
>> Cc: Eric Miao <eric.miao@linaro.org>
>> Cc: Dmitry Torokhov <dtor@mail.ru>
>> ---
>> .../devicetree/bindings/input/fsl-mma8450.txt | 11 +++++++++++
>> drivers/input/misc/mma8450.c | 8 ++++++++
>> 2 files changed, 19 insertions(+), 0 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/input/fsl-mma8450.txt
>>
>> diff --git a/Documentation/devicetree/bindings/input/fsl-mma8450.txt b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
>> new file mode 100644
>> index 0000000..a00c94c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
>> @@ -0,0 +1,11 @@
>> +* Freescale MMA8450 3-Axis Accelerometer
>> +
>> +Required properties:
>> +- compatible : "fsl,mma8450".
>> +
>> +Example:
>> +
>> +accelerometer: mma8450@1c {
>> + compatible = "fsl,mma8450";
>> + reg = <0x1c>;
>> +};
>> diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
>> index 20f8f92..6c76cf7 100644
>> --- a/drivers/input/misc/mma8450.c
>> +++ b/drivers/input/misc/mma8450.c
>> @@ -24,6 +24,7 @@
>> #include <linux/delay.h>
>> #include <linux/i2c.h>
>> #include <linux/input-polldev.h>
>> +#include <linux/of_device.h>
>>
>> #define MMA8450_DRV_NAME "mma8450"
>>
>> @@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = {
>> };
>> MODULE_DEVICE_TABLE(i2c, mma8450_id);
>>
>> +static const struct of_device_id mma8450_dt_ids[] = {
>> + { .compatible = "fsl,mma8450", },
>> + { /* sentinel */ }
>> +};
>> +MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids);
>> +
>> static struct i2c_driver mma8450_driver = {
>> .driver = {
>> .name = MMA8450_DRV_NAME,
>> .owner = THIS_MODULE,
>> + .of_match_table = mma8450_dt_ids,
>> },
>> .probe = mma8450_probe,
>> .remove = __devexit_p(mma8450_remove),
>> --
>> 1.7.4.1
>>
>> _______________________________________________
>> devicetree-discuss mailing list
>> devicetree-discuss@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/devicetree-discuss
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mma8450: add device tree probe support
2011-07-21 16:25 [PATCH] Input: mma8450: add device tree probe support Shawn Guo
2011-07-29 2:38 ` Shawn Guo
@ 2011-07-31 3:07 ` Grant Likely
2011-08-01 2:56 ` Dmitry Torokhov
1 sibling, 1 reply; 5+ messages in thread
From: Grant Likely @ 2011-07-31 3:07 UTC (permalink / raw)
To: Shawn Guo
Cc: linux-input, devicetree-discuss, patches, Sammy He, Eric Miao,
Dmitry Torokhov
On Fri, Jul 22, 2011 at 12:25:51AM +0800, Shawn Guo wrote:
> It adds device tree probe support for mma8450 driver.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Sammy He <r62914@freescale.com>
> Cc: Eric Miao <eric.miao@linaro.org>
> Cc: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> .../devicetree/bindings/input/fsl-mma8450.txt | 11 +++++++++++
> drivers/input/misc/mma8450.c | 8 ++++++++
> 2 files changed, 19 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/input/fsl-mma8450.txt
>
> diff --git a/Documentation/devicetree/bindings/input/fsl-mma8450.txt b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
> new file mode 100644
> index 0000000..a00c94c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/fsl-mma8450.txt
> @@ -0,0 +1,11 @@
> +* Freescale MMA8450 3-Axis Accelerometer
> +
> +Required properties:
> +- compatible : "fsl,mma8450".
> +
> +Example:
> +
> +accelerometer: mma8450@1c {
> + compatible = "fsl,mma8450";
> + reg = <0x1c>;
> +};
> diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
> index 20f8f92..6c76cf7 100644
> --- a/drivers/input/misc/mma8450.c
> +++ b/drivers/input/misc/mma8450.c
> @@ -24,6 +24,7 @@
> #include <linux/delay.h>
> #include <linux/i2c.h>
> #include <linux/input-polldev.h>
> +#include <linux/of_device.h>
>
> #define MMA8450_DRV_NAME "mma8450"
>
> @@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, mma8450_id);
>
> +static const struct of_device_id mma8450_dt_ids[] = {
> + { .compatible = "fsl,mma8450", },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids);
> +
> static struct i2c_driver mma8450_driver = {
> .driver = {
> .name = MMA8450_DRV_NAME,
> .owner = THIS_MODULE,
> + .of_match_table = mma8450_dt_ids,
> },
> .probe = mma8450_probe,
> .remove = __devexit_p(mma8450_remove),
> --
> 1.7.4.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mma8450: add device tree probe support
2011-07-31 3:07 ` Grant Likely
@ 2011-08-01 2:56 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2011-08-01 2:56 UTC (permalink / raw)
To: Grant Likely
Cc: Shawn Guo, linux-input, devicetree-discuss, patches, Sammy He,
Eric Miao
On Sat, Jul 30, 2011 at 09:07:25PM -0600, Grant Likely wrote:
> On Fri, Jul 22, 2011 at 12:25:51AM +0800, Shawn Guo wrote:
> > It adds device tree probe support for mma8450 driver.
> >
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Cc: Sammy He <r62914@freescale.com>
> > Cc: Eric Miao <eric.miao@linaro.org>
> > Cc: Dmitry Torokhov <dtor@mail.ru>
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
Applied, thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-01 2:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21 16:25 [PATCH] Input: mma8450: add device tree probe support Shawn Guo
2011-07-29 2:38 ` Shawn Guo
2011-07-29 3:00 ` Eric Miao
2011-07-31 3:07 ` Grant Likely
2011-08-01 2:56 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).