* [PATCH 0/4] dac7512: some cleanups and DT bindings @ 2013-09-22 19:51 Daniel Mack 2013-09-22 19:51 ` [PATCH 1/4] drivers: misc: ti_dac7512: drop module version Daniel Mack ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Daniel Mack @ 2013-09-22 19:51 UTC (permalink / raw) To: linux-kernel; +Cc: broonie, devicetree, Daniel Mack Here are some trivial things for the ti_dac7512 driver. Mark, can you take them through your spi tree? Thanks, Daniel Daniel Mack (4): drivers: misc: ti_dac7512: drop module version drivers: misc: ti_dac7512: drop DAC7512_DRV_NAME drivers: misc: ti_dac7512: provide a SPI ID table drivers: misc: ti_dac7512: add support for DT matching .../devicetree/bindings/misc/ti,dac7512.txt | 20 +++++++++++++++++++ drivers/misc/ti_dac7512.c | 23 +++++++++++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/misc/ti,dac7512.txt -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] drivers: misc: ti_dac7512: drop module version 2013-09-22 19:51 [PATCH 0/4] dac7512: some cleanups and DT bindings Daniel Mack @ 2013-09-22 19:51 ` Daniel Mack 2013-09-22 19:51 ` [PATCH 2/4] drivers: misc: ti_dac7512: drop DAC7512_DRV_NAME Daniel Mack [not found] ` <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2 siblings, 0 replies; 9+ messages in thread From: Daniel Mack @ 2013-09-22 19:51 UTC (permalink / raw) To: linux-kernel; +Cc: broonie, devicetree, Daniel Mack Providing a module version doesn't add any value, so drop it. Signed-off-by: Daniel Mack <zonque@gmail.com> --- drivers/misc/ti_dac7512.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c index 9b23722..db47333 100644 --- a/drivers/misc/ti_dac7512.c +++ b/drivers/misc/ti_dac7512.c @@ -24,7 +24,6 @@ #include <linux/spi/spi.h> #define DAC7512_DRV_NAME "dac7512" -#define DRIVER_VERSION "1.0" static ssize_t dac7512_store_val(struct device *dev, struct device_attribute *attr, @@ -89,4 +88,3 @@ module_spi_driver(dac7512_driver); MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); MODULE_DESCRIPTION("DAC7512 16-bit DAC"); MODULE_LICENSE("GPL v2"); -MODULE_VERSION(DRIVER_VERSION); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] drivers: misc: ti_dac7512: drop DAC7512_DRV_NAME 2013-09-22 19:51 [PATCH 0/4] dac7512: some cleanups and DT bindings Daniel Mack 2013-09-22 19:51 ` [PATCH 1/4] drivers: misc: ti_dac7512: drop module version Daniel Mack @ 2013-09-22 19:51 ` Daniel Mack [not found] ` <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2 siblings, 0 replies; 9+ messages in thread From: Daniel Mack @ 2013-09-22 19:51 UTC (permalink / raw) To: linux-kernel; +Cc: broonie, devicetree, Daniel Mack The driver's name can be provided directly, so drop the #define. Signed-off-by: Daniel Mack <zonque@gmail.com> --- drivers/misc/ti_dac7512.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c index db47333..46dfbf3 100644 --- a/drivers/misc/ti_dac7512.c +++ b/drivers/misc/ti_dac7512.c @@ -23,8 +23,6 @@ #include <linux/init.h> #include <linux/spi/spi.h> -#define DAC7512_DRV_NAME "dac7512" - static ssize_t dac7512_store_val(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) @@ -76,7 +74,7 @@ static int dac7512_remove(struct spi_device *spi) static struct spi_driver dac7512_driver = { .driver = { - .name = DAC7512_DRV_NAME, + .name = "dac7512", .owner = THIS_MODULE, }, .probe = dac7512_probe, -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* [PATCH 3/4] drivers: misc: ti_dac7512: provide a SPI ID table [not found] ` <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2013-09-22 19:51 ` Daniel Mack 2013-09-22 19:51 ` [PATCH 4/4] drivers: misc: ti_dac7512: add support for DT matching Daniel Mack 2013-09-23 10:19 ` [PATCH 0/4] dac7512: some cleanups and DT bindings Mark Brown 2 siblings, 0 replies; 9+ messages in thread From: Daniel Mack @ 2013-09-22 19:51 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, Daniel Mack This way, the module can be autoloaded by the SPI core. Signed-off-by: Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- drivers/misc/ti_dac7512.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c index 46dfbf3..6393a68 100644 --- a/drivers/misc/ti_dac7512.c +++ b/drivers/misc/ti_dac7512.c @@ -72,6 +72,12 @@ static int dac7512_remove(struct spi_device *spi) return 0; } +static const struct spi_device_id dac7512_id_table[] = { + { "dac7512", 0 }, + { } +}; +MODULE_DEVICE_TABLE(spi, dac7512_id_table); + static struct spi_driver dac7512_driver = { .driver = { .name = "dac7512", @@ -79,6 +85,7 @@ static struct spi_driver dac7512_driver = { }, .probe = dac7512_probe, .remove = dac7512_remove, + .id_table = dac7512_id_table, }; module_spi_driver(dac7512_driver); -- 1.8.3.1 -- 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] 9+ messages in thread
* [PATCH 4/4] drivers: misc: ti_dac7512: add support for DT matching [not found] ` <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2013-09-22 19:51 ` [PATCH 3/4] drivers: misc: ti_dac7512: provide a SPI ID table Daniel Mack @ 2013-09-22 19:51 ` Daniel Mack 2013-09-23 10:19 ` [PATCH 0/4] dac7512: some cleanups and DT bindings Mark Brown 2 siblings, 0 replies; 9+ messages in thread From: Daniel Mack @ 2013-09-22 19:51 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, Daniel Mack Only matching is done via DT, no other details can be passed. Signed-off-by: Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- .../devicetree/bindings/misc/ti,dac7512.txt | 20 ++++++++++++++++++++ drivers/misc/ti_dac7512.c | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/ti,dac7512.txt diff --git a/Documentation/devicetree/bindings/misc/ti,dac7512.txt b/Documentation/devicetree/bindings/misc/ti,dac7512.txt new file mode 100644 index 0000000..1db4593 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/ti,dac7512.txt @@ -0,0 +1,20 @@ +TI DAC7512 DEVICETREE BINDINGS + +Required properties: + + - "compatible" Must be set to "ti,dac7512" + +Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt +apply. In particular, "reg" and "spi-max-frequency" properties must be given. + + +Example: + + spi_master { + dac7512: dac7512@0 { + compatible = "ti,dac7512"; + reg = <0>; /* CS0 */ + spi-max-frequency = <1000000>; + }; + }; + diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c index 6393a68..83da711 100644 --- a/drivers/misc/ti_dac7512.c +++ b/drivers/misc/ti_dac7512.c @@ -22,6 +22,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/spi/spi.h> +#include <linux/of.h> static ssize_t dac7512_store_val(struct device *dev, struct device_attribute *attr, @@ -78,10 +79,19 @@ static const struct spi_device_id dac7512_id_table[] = { }; MODULE_DEVICE_TABLE(spi, dac7512_id_table); +#ifdef CONFIG_OF +static const struct of_device_id dac7512_of_match[] = { + { .compatible = "ti,dac7512", }, + { } +}; +MODULE_DEVICE_TABLE(of, dac7512_of_match); +#endif + static struct spi_driver dac7512_driver = { .driver = { .name = "dac7512", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(dac7512_of_match), }, .probe = dac7512_probe, .remove = dac7512_remove, -- 1.8.3.1 -- 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] 9+ messages in thread
* Re: [PATCH 0/4] dac7512: some cleanups and DT bindings [not found] ` <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2013-09-22 19:51 ` [PATCH 3/4] drivers: misc: ti_dac7512: provide a SPI ID table Daniel Mack 2013-09-22 19:51 ` [PATCH 4/4] drivers: misc: ti_dac7512: add support for DT matching Daniel Mack @ 2013-09-23 10:19 ` Mark Brown [not found] ` <20130923101940.GZ21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2 siblings, 1 reply; 9+ messages in thread From: Mark Brown @ 2013-09-23 10:19 UTC (permalink / raw) To: Daniel Mack Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 283 bytes --] On Sun, Sep 22, 2013 at 09:51:45PM +0200, Daniel Mack wrote: > Here are some trivial things for the ti_dac7512 driver. > > Mark, can you take them through your spi tree? I can but it's normally Greg who looks after drivers/misc - probably best to at least run these by him. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20130923101940.GZ21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>]
* Re: [PATCH 0/4] dac7512: some cleanups and DT bindings [not found] ` <20130923101940.GZ21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> @ 2013-09-23 10:31 ` Daniel Mack [not found] ` <52401884.2070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Daniel Mack @ 2013-09-23 10:31 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Mark Brown, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA On 23.09.2013 12:19, Mark Brown wrote: > On Sun, Sep 22, 2013 at 09:51:45PM +0200, Daniel Mack wrote: >> Here are some trivial things for the ti_dac7512 driver. >> >> Mark, can you take them through your spi tree? > > I can but it's normally Greg who looks after drivers/misc - probably > best to at least run these by him. Alright. Greg, I posted the series to LKML yesterday. Can you pick the patches from there or do you want me to resend? Thanks, Daniel -- 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] 9+ messages in thread
[parent not found: <52401884.2070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 0/4] dac7512: some cleanups and DT bindings [not found] ` <52401884.2070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2013-09-23 13:49 ` Greg Kroah-Hartman 2013-09-26 16:03 ` Greg Kroah-Hartman 1 sibling, 0 replies; 9+ messages in thread From: Greg Kroah-Hartman @ 2013-09-23 13:49 UTC (permalink / raw) To: Daniel Mack Cc: Mark Brown, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA On Mon, Sep 23, 2013 at 12:31:32PM +0200, Daniel Mack wrote: > On 23.09.2013 12:19, Mark Brown wrote: > > On Sun, Sep 22, 2013 at 09:51:45PM +0200, Daniel Mack wrote: > >> Here are some trivial things for the ti_dac7512 driver. > >> > >> Mark, can you take them through your spi tree? > > > > I can but it's normally Greg who looks after drivers/misc - probably > > best to at least run these by him. > > Alright. Greg, I posted the series to LKML yesterday. Can you pick the > patches from there or do you want me to resend? I'll pick them up from there, thanks for pointing them out to me. greg k-h -- 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] 9+ messages in thread
* Re: [PATCH 0/4] dac7512: some cleanups and DT bindings [not found] ` <52401884.2070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2013-09-23 13:49 ` Greg Kroah-Hartman @ 2013-09-26 16:03 ` Greg Kroah-Hartman 1 sibling, 0 replies; 9+ messages in thread From: Greg Kroah-Hartman @ 2013-09-26 16:03 UTC (permalink / raw) To: Daniel Mack Cc: Mark Brown, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA On Mon, Sep 23, 2013 at 12:31:32PM +0200, Daniel Mack wrote: > On 23.09.2013 12:19, Mark Brown wrote: > > On Sun, Sep 22, 2013 at 09:51:45PM +0200, Daniel Mack wrote: > >> Here are some trivial things for the ti_dac7512 driver. > >> > >> Mark, can you take them through your spi tree? > > > > I can but it's normally Greg who looks after drivers/misc - probably > > best to at least run these by him. > > Alright. Greg, I posted the series to LKML yesterday. Can you pick the > patches from there or do you want me to resend? I've got them and will take them through my tree, thanks. greg k-h -- 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] 9+ messages in thread
end of thread, other threads:[~2013-09-26 16:03 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-22 19:51 [PATCH 0/4] dac7512: some cleanups and DT bindings Daniel Mack 2013-09-22 19:51 ` [PATCH 1/4] drivers: misc: ti_dac7512: drop module version Daniel Mack 2013-09-22 19:51 ` [PATCH 2/4] drivers: misc: ti_dac7512: drop DAC7512_DRV_NAME Daniel Mack [not found] ` <1379879509-3608-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2013-09-22 19:51 ` [PATCH 3/4] drivers: misc: ti_dac7512: provide a SPI ID table Daniel Mack 2013-09-22 19:51 ` [PATCH 4/4] drivers: misc: ti_dac7512: add support for DT matching Daniel Mack 2013-09-23 10:19 ` [PATCH 0/4] dac7512: some cleanups and DT bindings Mark Brown [not found] ` <20130923101940.GZ21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2013-09-23 10:31 ` Daniel Mack [not found] ` <52401884.2070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2013-09-23 13:49 ` Greg Kroah-Hartman 2013-09-26 16:03 ` Greg Kroah-Hartman
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).