2015-07-17 07:43:17

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 07:43:59

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 07:44:00

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 08:21:20

by Daniel Baluta

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

On Fri, Jul 17, 2015 at 10:35 AM, Jandy Gou <[email protected]> wrote:
> 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

Looks good to me but you will also need to CC [email protected].

thanks,
Daniel.