From: jacopo <jacopo@jmondi.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
geert@linux-m68k.org, wsa+renesas@sang-engineering.com,
magnus.damm@gmail.com, laurent.pinchart@ideasonboard.com,
knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
robh+dt@kernel.org, mark.rutland@arm.com,
linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/4] iio: adc: Add Maxim max9611 ADC driver
Date: Sun, 26 Mar 2017 12:02:39 +0200 [thread overview]
Message-ID: <20170326100239.GB5981@w540> (raw)
In-Reply-To: <834f03d3-36d2-9b86-6b1e-04a23d440e10@kernel.org>
Hi Jonathan,
On Sat, Mar 25, 2017 at 05:37:52PM +0000, Jonathan Cameron wrote:
> On 25/03/17 17:21, jacopo wrote:
> > Hi Jonathan,
> > thanks for review
[snip]
> >>> +
> >>> + indio_dev->dev.parent = &client->dev;
> >>> + indio_dev->dev.of_node = client->dev.of_node;
> >>> + indio_dev->name = client->dev.of_node->name;
> >> What's this going to give for the name? Name in IIO is supposed to
> >> be an indication of the part rather than anything more explicit.
> >> That's not easily obtained from device tree directly...
> >>
> >
> > I used the one coming from device tree as otherwise device entries
> > have the same name, and I wanted to have it to inclued the unit
> > address (eg. adc@7c and not just adc)
> > But from you comment I guess it's fine just adc, so I'll change this
> > back to v1).
> Should be the part number - so max9611 or similar..
>
> You can query the device node details directly if you need to identify
> which is which.
That would not help, as I've been suggested to use a generic "adc" in
node name property.
I can hard-code "max9611" here. That would not help with the fact that
two chips will appear in userspace with the same name (and that's why
I wanted to have the unit address).
Otherwise I can do what Quentin is suggesting in his review of
AST2400: have different name for each compatible entry, so that this
will appear as either max9611 or max9612 in userspace
Thanks
j
> >
> > Thanks
> > j
> >
> >>> + indio_dev->modes = INDIO_DIRECT_MODE;
> >>> + indio_dev->info = &indio_info;
> >>> + indio_dev->channels = max9611_channels;
> >>> + indio_dev->num_channels = ARRAY_SIZE(max9611_channels);
> >>> +
> >>> + return devm_iio_device_register(&client->dev, indio_dev);
> >>> +}
> >>> +
> >>> +static const struct of_device_id max9611_of_table[] = {
> >>> + {.compatible = "maxim,max9611"},
> >>> + {.compatible = "maxim,max9612"},
> >>> + { },
> >>> +};
> >>> +
> >>> +MODULE_DEVICE_TABLE(of, max9611_of_table);
> >>> +
> >>> +static struct i2c_driver max9611_driver = {
> >>> + .driver = {
> >>> + .name = DRIVER_NAME,
> >>> + .owner = THIS_MODULE,
> >>> + .of_match_table = max9611_of_table,
> >>> + },
> >>> + .probe = max9611_probe,
> >>> +};
> >>> +module_i2c_driver(max9611_driver);
> >>> +
> >>> +MODULE_AUTHOR("Jacopo Mondi <jacopo+renesas@jmondi.org>");
> >>> +MODULE_DESCRIPTION("Maxim max9611/12 current sense amplifier with 12bit ADC");
> >>> +MODULE_LICENSE("GPL v2");
> >>>
> >>
>
WARNING: multiple messages have this Message-ID (diff)
From: jacopo <jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
To: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Jacopo Mondi
<jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>,
geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org,
wsa+renesas-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org,
magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org,
knaack.h-Mmb7MZpHnFY@public.gmane.org,
lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org,
pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3 3/4] iio: adc: Add Maxim max9611 ADC driver
Date: Sun, 26 Mar 2017 12:02:39 +0200 [thread overview]
Message-ID: <20170326100239.GB5981@w540> (raw)
In-Reply-To: <834f03d3-36d2-9b86-6b1e-04a23d440e10-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Hi Jonathan,
On Sat, Mar 25, 2017 at 05:37:52PM +0000, Jonathan Cameron wrote:
> On 25/03/17 17:21, jacopo wrote:
> > Hi Jonathan,
> > thanks for review
[snip]
> >>> +
> >>> + indio_dev->dev.parent = &client->dev;
> >>> + indio_dev->dev.of_node = client->dev.of_node;
> >>> + indio_dev->name = client->dev.of_node->name;
> >> What's this going to give for the name? Name in IIO is supposed to
> >> be an indication of the part rather than anything more explicit.
> >> That's not easily obtained from device tree directly...
> >>
> >
> > I used the one coming from device tree as otherwise device entries
> > have the same name, and I wanted to have it to inclued the unit
> > address (eg. adc@7c and not just adc)
> > But from you comment I guess it's fine just adc, so I'll change this
> > back to v1).
> Should be the part number - so max9611 or similar..
>
> You can query the device node details directly if you need to identify
> which is which.
That would not help, as I've been suggested to use a generic "adc" in
node name property.
I can hard-code "max9611" here. That would not help with the fact that
two chips will appear in userspace with the same name (and that's why
I wanted to have the unit address).
Otherwise I can do what Quentin is suggesting in his review of
AST2400: have different name for each compatible entry, so that this
will appear as either max9611 or max9612 in userspace
Thanks
j
> >
> > Thanks
> > j
> >
> >>> + indio_dev->modes = INDIO_DIRECT_MODE;
> >>> + indio_dev->info = &indio_info;
> >>> + indio_dev->channels = max9611_channels;
> >>> + indio_dev->num_channels = ARRAY_SIZE(max9611_channels);
> >>> +
> >>> + return devm_iio_device_register(&client->dev, indio_dev);
> >>> +}
> >>> +
> >>> +static const struct of_device_id max9611_of_table[] = {
> >>> + {.compatible = "maxim,max9611"},
> >>> + {.compatible = "maxim,max9612"},
> >>> + { },
> >>> +};
> >>> +
> >>> +MODULE_DEVICE_TABLE(of, max9611_of_table);
> >>> +
> >>> +static struct i2c_driver max9611_driver = {
> >>> + .driver = {
> >>> + .name = DRIVER_NAME,
> >>> + .owner = THIS_MODULE,
> >>> + .of_match_table = max9611_of_table,
> >>> + },
> >>> + .probe = max9611_probe,
> >>> +};
> >>> +module_i2c_driver(max9611_driver);
> >>> +
> >>> +MODULE_AUTHOR("Jacopo Mondi <jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>");
> >>> +MODULE_DESCRIPTION("Maxim max9611/12 current sense amplifier with 12bit ADC");
> >>> +MODULE_LICENSE("GPL v2");
> >>>
> >>
>
next prev parent reply other threads:[~2017-03-26 10:03 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 15:28 [PATCH v3 0/4] iio: adc: Maxim max9611 driver Jacopo Mondi
2017-03-24 15:28 ` Jacopo Mondi
2017-03-24 15:28 ` [PATCH v3 1/4] Documentation: dt-bindings: iio: Add max9611 ADC Jacopo Mondi
2017-03-24 15:28 ` Jacopo Mondi
2017-03-25 15:27 ` Jonathan Cameron
2017-03-25 15:27 ` Jonathan Cameron
2017-03-24 15:28 ` [PATCH v3 2/4] iio: Documentation: Add max9611 sysfs documentation Jacopo Mondi
2017-03-24 15:28 ` Jacopo Mondi
2017-03-25 16:32 ` Jonathan Cameron
2017-03-25 16:32 ` Jonathan Cameron
2017-03-26 8:38 ` Geert Uytterhoeven
2017-03-26 8:38 ` Geert Uytterhoeven
2017-03-24 15:28 ` [PATCH v3 3/4] iio: adc: Add Maxim max9611 ADC driver Jacopo Mondi
2017-03-24 15:28 ` Jacopo Mondi
2017-03-25 15:45 ` Jonathan Cameron
2017-03-25 15:45 ` Jonathan Cameron
2017-03-25 16:13 ` Peter Meerwald-Stadler
2017-03-25 16:34 ` Jonathan Cameron
2017-03-26 10:08 ` jacopo
2017-03-26 10:24 ` Jonathan Cameron
2017-03-26 10:50 ` jacopo
2017-03-27 8:30 ` jacopo
2017-03-25 17:21 ` jacopo
2017-03-25 17:21 ` jacopo
2017-03-25 17:37 ` Jonathan Cameron
2017-03-25 17:37 ` Jonathan Cameron
2017-03-26 10:02 ` jacopo [this message]
2017-03-26 10:02 ` jacopo
2017-03-26 10:23 ` Jonathan Cameron
2017-03-26 10:23 ` Jonathan Cameron
2017-03-24 15:28 ` [PATCH v3 4/4] arm64: dts: salvator-x: Add current sense amplifiers Jacopo Mondi
2017-03-24 15:28 ` Jacopo Mondi
2017-03-26 8:49 ` Geert Uytterhoeven
2017-03-26 8:49 ` Geert Uytterhoeven
2017-03-26 9:07 ` [PATCH v3 0/4] iio: adc: Maxim max9611 driver Geert Uytterhoeven
2017-03-26 9:18 ` Jonathan Cameron
2017-03-26 9:18 ` Jonathan Cameron
2017-03-27 8:53 ` Geert Uytterhoeven
2017-03-27 8:53 ` Geert Uytterhoeven
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=20170326100239.GB5981@w540 \
--to=jacopo@jmondi.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=jacopo+renesas@jmondi.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.