2015-07-17 08:42:52

by Jandy Gou

[permalink] [raw]
Subject: [PATCH 0/2] Add DT binding support for mmc35240

Add basic DT binding for mmc35240
Add DT binding doc for mmc35240

Jandy Gou (2):
iio: magnetometer: mmc35240: Add DT binding
iio: magnetometer: mmc35240: Add DT binding doc

.../devicetree/bindings/iio/magnetometer/mmc35240.txt | 13 +++++++++++++
drivers/iio/magnetometer/mmc35240.c | 7 +++++++
2 files changed, 20 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt

--
1.9.1


2015-07-17 08:42:49

by Jandy Gou

[permalink] [raw]
Subject: [PATCH 1/2] iio: magnetometer: mmc35240: Add DT binding

Signed-off-by: Jandy Gou <[email protected]>
---
drivers/iio/magnetometer/mmc35240.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c
index 7a2ea71..9bc542d 100644
--- a/drivers/iio/magnetometer/mmc35240.c
+++ b/drivers/iio/magnetometer/mmc35240.c
@@ -550,6 +550,12 @@ static const struct dev_pm_ops mmc35240_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mmc35240_suspend, mmc35240_resume)
};

+static const struct of_device_id mmc35240_of_match[] = {
+ { .compatible = "memsic,mmc35240", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, mmc35240_of_match);
+
static const struct acpi_device_id mmc35240_acpi_match[] = {
{"MMC35240", 0},
{ },
@@ -565,6 +571,7 @@ MODULE_DEVICE_TABLE(i2c, mmc35240_id);
static struct i2c_driver mmc35240_driver = {
.driver = {
.name = MMC35240_DRV_NAME,
+ .of_match_table = mmc35240_of_match,
.pm = &mmc35240_pm_ops,
.acpi_match_table = ACPI_PTR(mmc35240_acpi_match),
},
--
1.9.1

2015-07-17 08:42:51

by Jandy Gou

[permalink] [raw]
Subject: [PATCH 2/2] iio: magnetometer: mmc35240: Add DT binding doc

Signed-off-by: Jandy Gou <[email protected]>
---
.../devicetree/bindings/iio/magnetometer/mmc35240.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt b/Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt
new file mode 100644
index 0000000..a01235c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt
@@ -0,0 +1,13 @@
+* MEMSIC MMC35240 magnetometer sensor
+
+Required properties:
+
+ - compatible : should be "memsic,mmc35240"
+ - reg : the I2C address of the magnetometer
+
+Example:
+
+mmc35240@30 {
+ compatible = "memsic,mmc35240";
+ reg = <0x30>;
+};
--
1.9.1

2015-07-17 10:38:08

by Daniel Baluta

[permalink] [raw]
Subject: Re: [PATCH 1/2] iio: magnetometer: mmc35240: Add DT binding

On Fri, Jul 17, 2015 at 11:34 AM, Jandy Gou <[email protected]> wrote:
> Signed-off-by: Jandy Gou <[email protected]>

Acked-by: Daniel Baluta <[email protected]>

2015-07-19 09:56:21

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 1/2] iio: magnetometer: mmc35240: Add DT binding

On 17/07/15 11:38, Daniel Baluta wrote:
> On Fri, Jul 17, 2015 at 11:34 AM, Jandy Gou <[email protected]> wrote:
>> Signed-off-by: Jandy Gou <[email protected]>
>
> Acked-by: Daniel Baluta <[email protected]>
>
Applied to the togreg branch of iio.git - initially pushed out as testing for the
autobuilders to play with it.

Thanks,

Jonathan

2015-07-19 09:57:32

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 2/2] iio: magnetometer: mmc35240: Add DT binding doc

On 17/07/15 09:34, Jandy Gou wrote:
> Signed-off-by: Jandy Gou <[email protected]>
This is so trivial, I'm taking it without waiting for the standard device tree ack / 3 weeks.

Applied to the togreg branch of iio.git - initially pushed out as testing.
> ---
> .../devicetree/bindings/iio/magnetometer/mmc35240.txt | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt
>
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt b/Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt
> new file mode 100644
> index 0000000..a01235c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/mmc35240.txt
> @@ -0,0 +1,13 @@
> +* MEMSIC MMC35240 magnetometer sensor
> +
> +Required properties:
> +
> + - compatible : should be "memsic,mmc35240"
> + - reg : the I2C address of the magnetometer
> +
> +Example:
> +
> +mmc35240@30 {
> + compatible = "memsic,mmc35240";
> + reg = <0x30>;
> +};
>