From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: David Lechner <david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
Peter Meerwald-Stadler
<pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] iio: adc: ti-ads7950: Drop "ti-" prefix from module name
Date: Sat, 14 Jan 2017 12:49:51 +0000 [thread overview]
Message-ID: <4dd9883a-5e50-36a9-135c-802dac4f93b8@kernel.org> (raw)
In-Reply-To: <1484157171-15571-3-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
On 11/01/17 17:52, David Lechner wrote:
> This drops the "ti-" prefix from the module name. It makes the module name
> consistent with other iio ti-ads* drivers and it makes the driver work
> with device tree (the spi subsystem drops the "ti," prefix when matching
> compatible strings from device tree).
>
> Tested working on LEGO MINDSTORMS EV3 with the following device tree node:
>
> adc@3 {
> compatible = "ti,ads7957";
> reg = <3>;
> #io-channel-cells = <1>;
> spi-max-frequency = <10000000>;
> vref-supply = <&adc_ref>;
> };
>
> Signed-off-by: David Lechner <david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
What worries me here is that we might break existing setups. I agree
we should have gotten this 'right' in the first place, but can we fix
it now. Not so sure. We'd be better off perhaps adding an of_device_id
table with the write entries for device tree.
> ---
> drivers/iio/adc/ti-ads7950.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c
> index 0330361..b587fa6 100644
> --- a/drivers/iio/adc/ti-ads7950.c
> +++ b/drivers/iio/adc/ti-ads7950.c
> @@ -459,25 +459,25 @@ static int ti_ads7950_remove(struct spi_device *spi)
> }
>
> static const struct spi_device_id ti_ads7950_id[] = {
> - {"ti-ads7950", TI_ADS7950},
> - {"ti-ads7951", TI_ADS7951},
> - {"ti-ads7952", TI_ADS7952},
> - {"ti-ads7953", TI_ADS7953},
> - {"ti-ads7954", TI_ADS7954},
> - {"ti-ads7955", TI_ADS7955},
> - {"ti-ads7956", TI_ADS7956},
> - {"ti-ads7957", TI_ADS7957},
> - {"ti-ads7958", TI_ADS7958},
> - {"ti-ads7959", TI_ADS7959},
> - {"ti-ads7960", TI_ADS7960},
> - {"ti-ads7961", TI_ADS7961},
> + { "ads7950", TI_ADS7950 },
> + { "ads7951", TI_ADS7951 },
> + { "ads7952", TI_ADS7952 },
> + { "ads7953", TI_ADS7953 },
> + { "ads7954", TI_ADS7954 },
> + { "ads7955", TI_ADS7955 },
> + { "ads7956", TI_ADS7956 },
> + { "ads7957", TI_ADS7957 },
> + { "ads7958", TI_ADS7958 },
> + { "ads7959", TI_ADS7959 },
> + { "ads7960", TI_ADS7960 },
> + { "ads7961", TI_ADS7961 },
> { }
> };
> MODULE_DEVICE_TABLE(spi, ti_ads7950_id);
>
> static struct spi_driver ti_ads7950_driver = {
> .driver = {
> - .name = "ti-ads7950",
> + .name = "ads7950",
> },
> .probe = ti_ads7950_probe,
> .remove = ti_ads7950_remove,
>
--
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
next prev parent reply other threads:[~2017-01-14 12:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 17:52 [PATCH 0/3] ti,ads7950 device tree bindings David Lechner
2017-01-11 17:52 ` [PATCH 1/3] DT/bindings: Add bindings for TI ADS7950 A/DC chips David Lechner
[not found] ` <1484157171-15571-2-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-01-14 12:53 ` Jonathan Cameron
[not found] ` <f1e845c4-7db0-c6fe-fbd2-420902110be9-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-14 18:00 ` David Lechner
2017-01-15 13:52 ` Jonathan Cameron
2017-01-18 19:54 ` Rob Herring
2017-01-11 17:52 ` [PATCH 2/3] iio: adc: ti-ads7950: Drop "ti-" prefix from module name David Lechner
[not found] ` <1484157171-15571-3-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-01-14 12:49 ` Jonathan Cameron [this message]
2017-01-14 18:07 ` David Lechner
2017-01-15 13:54 ` Jonathan Cameron
2017-01-11 17:52 ` [PATCH 3/3] iio: adc: ti-ads7950: Change regulator matching string to "vref" David Lechner
[not found] ` <1484157171-15571-4-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-01-14 12:52 ` Jonathan Cameron
[not found] ` <47d15fe8-85c5-6e1c-cd89-71398ad79def-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-14 18:09 ` David Lechner
2017-01-15 13:55 ` Jonathan Cameron
[not found] ` <1484157171-15571-1-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-01-15 13:58 ` [PATCH 0/3] ti,ads7950 device tree bindings Jonathan Cameron
[not found] ` <c4c59921-d0dc-0858-8d66-c56fa38d3b50-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-15 23:44 ` David Lechner
[not found] ` <b60edc70-1d0f-fbfc-6ae9-1e6e5e3525d1-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-01-21 15:08 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4dd9883a-5e50-36a9-135c-802dac4f93b8@kernel.org \
--to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).