* [PATCH 0/3] DW9714 DT support
@ 2017-08-17 13:42 Sakari Ailus
[not found] ` <1502977376-22836-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sakari Ailus @ 2017-08-17 13:42 UTC (permalink / raw)
To: linux-media; +Cc: devicetree, rajmohan.mani
Hi all,
This patchset adds DT bindings as well as DT support for DW9714. The
unused ACPI match table is removed.
Sakari Ailus (3):
dt-bindings: Add bindings for Dongwoon DW9714 voice coil
dw9714: Add Devicetree support
dw9714: Remove ACPI match tables, convert to use probe_new
.../bindings/media/i2c/dongwoon,dw9714.txt | 9 ++++++++
.../devicetree/bindings/vendor-prefixes.txt | 1 +
drivers/media/i2c/dw9714.c | 26 +++++++++-------------
3 files changed, 21 insertions(+), 15 deletions(-)
create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] dt-bindings: Add bindings for Dongwoon DW9714 voice coil
[not found] ` <1502977376-22836-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2017-08-17 13:42 ` Sakari Ailus
[not found] ` <1502977376-22836-2-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-23 1:22 ` [PATCH 0/3] DW9714 DT support Mani, Rajmohan
1 sibling, 1 reply; 6+ messages in thread
From: Sakari Ailus @ 2017-08-17 13:42 UTC (permalink / raw)
To: linux-media-u79uwXL29TY76Z2rM5mHXA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
rajmohan.mani-ral2JQCrhuEAvxtiuMwx3w
Dongwoon DW9714 is a voice coil lens driver.
Also add a vendor prefix for Dongwoon for one did not exist previously.
Signed-off-by: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt | 9 +++++++++
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
2 files changed, 10 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
new file mode 100644
index 0000000..b88dcdd
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
@@ -0,0 +1,9 @@
+Dongwoon Anatech DW9714 camera voice coil lens driver
+
+DW9174 is a 10-bit DAC with current sink capability. It is intended
+for driving voice coil lenses in camera modules.
+
+Mandatory properties:
+
+- compatible: "dongwoon,dw9714"
+- reg: I²C slave address
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index daf465be..6b6e683 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -88,6 +88,7 @@ dlg Dialog Semiconductor
dlink D-Link Corporation
dmo Data Modul AG
domintech Domintech Co., Ltd.
+dongwoon Dongwoon Anatech
dptechnics DPTechnics
dragino Dragino Technology Co., Limited
ea Embedded Artists AB
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] dw9714: Add Devicetree support
2017-08-17 13:42 [PATCH 0/3] DW9714 DT support Sakari Ailus
[not found] ` <1502977376-22836-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2017-08-17 13:42 ` Sakari Ailus
2017-08-17 13:42 ` [PATCH 3/3] dw9714: Remove ACPI match tables, convert to use probe_new Sakari Ailus
2 siblings, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2017-08-17 13:42 UTC (permalink / raw)
To: linux-media; +Cc: devicetree, rajmohan.mani
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/dw9714.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
index 6a607d7..bcf64ef 100644
--- a/drivers/media/i2c/dw9714.c
+++ b/drivers/media/i2c/dw9714.c
@@ -264,6 +264,12 @@ static const struct i2c_device_id dw9714_id_table[] = {
MODULE_DEVICE_TABLE(i2c, dw9714_id_table);
+static const struct of_device_id dw9714_of_table[] = {
+ { .compatible = "dongwoon,dw9714" },
+ { { 0 } }
+};
+MODULE_DEVICE_TABLE(of, dw9714_of_table);
+
static const struct dev_pm_ops dw9714_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(dw9714_vcm_suspend, dw9714_vcm_resume)
SET_RUNTIME_PM_OPS(dw9714_vcm_suspend, dw9714_vcm_resume, NULL)
@@ -274,6 +280,7 @@ static struct i2c_driver dw9714_i2c_driver = {
.name = DW9714_NAME,
.pm = &dw9714_pm_ops,
.acpi_match_table = ACPI_PTR(dw9714_acpi_match),
+ .of_match_table = dw9714_of_table,
},
.probe = dw9714_probe,
.remove = dw9714_remove,
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] dw9714: Remove ACPI match tables, convert to use probe_new
2017-08-17 13:42 [PATCH 0/3] DW9714 DT support Sakari Ailus
[not found] ` <1502977376-22836-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-17 13:42 ` [PATCH 2/3] dw9714: Add Devicetree support Sakari Ailus
@ 2017-08-17 13:42 ` Sakari Ailus
2 siblings, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2017-08-17 13:42 UTC (permalink / raw)
To: linux-media; +Cc: devicetree, rajmohan.mani
The ACPI match table is empty. Remove it.
Also convert the drive to use probe_new callback in struct i2c_driver.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/dw9714.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
index bcf64ef..95af4fc 100644
--- a/drivers/media/i2c/dw9714.c
+++ b/drivers/media/i2c/dw9714.c
@@ -11,7 +11,6 @@
* GNU General Public License for more details.
*/
-#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/module.h>
@@ -147,8 +146,7 @@ static int dw9714_init_controls(struct dw9714_device *dev_vcm)
return hdl->error;
}
-static int dw9714_probe(struct i2c_client *client,
- const struct i2c_device_id *devid)
+static int dw9714_probe(struct i2c_client *client)
{
struct dw9714_device *dw9714_dev;
int rval;
@@ -250,18 +248,10 @@ static int __maybe_unused dw9714_vcm_resume(struct device *dev)
return 0;
}
-#ifdef CONFIG_ACPI
-static const struct acpi_device_id dw9714_acpi_match[] = {
- {},
-};
-MODULE_DEVICE_TABLE(acpi, dw9714_acpi_match);
-#endif
-
static const struct i2c_device_id dw9714_id_table[] = {
- {DW9714_NAME, 0},
- {}
+ { DW9714_NAME, 0 },
+ { { 0 } }
};
-
MODULE_DEVICE_TABLE(i2c, dw9714_id_table);
static const struct of_device_id dw9714_of_table[] = {
@@ -279,10 +269,9 @@ static struct i2c_driver dw9714_i2c_driver = {
.driver = {
.name = DW9714_NAME,
.pm = &dw9714_pm_ops,
- .acpi_match_table = ACPI_PTR(dw9714_acpi_match),
.of_match_table = dw9714_of_table,
},
- .probe = dw9714_probe,
+ .probe_new = dw9714_probe,
.remove = dw9714_remove,
.id_table = dw9714_id_table,
};
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] dt-bindings: Add bindings for Dongwoon DW9714 voice coil
[not found] ` <1502977376-22836-2-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2017-08-22 2:24 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-08-22 2:24 UTC (permalink / raw)
To: Sakari Ailus
Cc: linux-media-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
rajmohan.mani-ral2JQCrhuEAvxtiuMwx3w
On Thu, Aug 17, 2017 at 04:42:54PM +0300, Sakari Ailus wrote:
> Dongwoon DW9714 is a voice coil lens driver.
>
> Also add a vendor prefix for Dongwoon for one did not exist previously.
>
> Signed-off-by: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
> Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt | 9 +++++++++
> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> 2 files changed, 10 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 0/3] DW9714 DT support
[not found] ` <1502977376-22836-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-17 13:42 ` [PATCH 1/3] dt-bindings: Add bindings for Dongwoon DW9714 voice coil Sakari Ailus
@ 2017-08-23 1:22 ` Mani, Rajmohan
1 sibling, 0 replies; 6+ messages in thread
From: Mani, Rajmohan @ 2017-08-23 1:22 UTC (permalink / raw)
To: Sakari Ailus, linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Sakari,
Thanks for the patches.
I have verified that the dw9714 driver gets probed via DT bindings, with these patches on 4.13-rc6 kernel.
Feel free to add
Tested-by: Rajmohan Mani <rajmohan.mani-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Raj
> -----Original Message-----
> From: Sakari Ailus [mailto:sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org]
> Sent: Thursday, August 17, 2017 6:43 AM
> To: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Mani, Rajmohan
> <rajmohan.mani-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Subject: [PATCH 0/3] DW9714 DT support
>
> Hi all,
>
> This patchset adds DT bindings as well as DT support for DW9714. The unused
> ACPI match table is removed.
>
> Sakari Ailus (3):
> dt-bindings: Add bindings for Dongwoon DW9714 voice coil
> dw9714: Add Devicetree support
> dw9714: Remove ACPI match tables, convert to use probe_new
>
> .../bindings/media/i2c/dongwoon,dw9714.txt | 9 ++++++++
> .../devicetree/bindings/vendor-prefixes.txt | 1 +
> drivers/media/i2c/dw9714.c | 26 +++++++++-------------
> 3 files changed, 21 insertions(+), 15 deletions(-) create mode 100644
> Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
>
> --
> 2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-23 1:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 13:42 [PATCH 0/3] DW9714 DT support Sakari Ailus
[not found] ` <1502977376-22836-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-17 13:42 ` [PATCH 1/3] dt-bindings: Add bindings for Dongwoon DW9714 voice coil Sakari Ailus
[not found] ` <1502977376-22836-2-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-22 2:24 ` Rob Herring
2017-08-23 1:22 ` [PATCH 0/3] DW9714 DT support Mani, Rajmohan
2017-08-17 13:42 ` [PATCH 2/3] dw9714: Add Devicetree support Sakari Ailus
2017-08-17 13:42 ` [PATCH 3/3] dw9714: Remove ACPI match tables, convert to use probe_new Sakari Ailus
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).