From: Michal Simek <michal.simek@xilinx.com>
To: Phil Reid <preid@electromag.com.au>,
Michal Simek <michal.simek@xilinx.com>,
linux-kernel@vger.kernel.org, monstr@monstr.eu,
linux@roeck-us.net
Cc: "Colin Ian King" <colin.king@canonical.com>,
linux-iio@vger.kernel.org,
"Stefan Brüns" <stefan.bruens@rwth-aachen.de>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Jonathan Cameron" <jic23@kernel.org>,
"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
"Hartmut Knaack" <knaack.h@gmx.de>
Subject: Re: [PATCH 2/4] iio: adc: ina2xx: Setup better name then simple ina2xx
Date: Wed, 21 Aug 2019 10:36:03 +0200 [thread overview]
Message-ID: <282e9668-affd-7266-b144-125a59e08e5b@xilinx.com> (raw)
In-Reply-To: <1c96bed1-2651-3667-3573-2167cd788bd7@electromag.com.au>
On 21. 08. 19 4:10, Phil Reid wrote:
> On 20/08/2019 22:11, Michal Simek wrote:
>> On systems with multiple ina2xx chips it is impossible to find out which
>> iio device is which one based on probe order. That's why it is
>> necessary to
>> setup better name based on possition.
>> The patch is reusing dev_name which is setup by core with client->name.
>>
>> name char array was setup to 128 byte length to correspond the same name
>> length by HID device.
>>
>> Before this patch:
>> iio:device9: ina226 (buffer capable)
>> After:
>> iio:device9: ina226-3-004a (buffer capable)
>
> Could this break existing user space code that's just looking for just
> ina226.
> I2c bus numbers aren't all that great at id'ing devices either. It's
> better than
> nothing but depending on what cards we have plugged into our system the
> same device gets
> a different bus number.
Fair point. Let's wait what dt guys say about label property.
I can simply drop this patch and use just this.
indio_dev->name = of_get_property(np, "label", NULL) ? : id->name;
Thanks,
Michal
next prev parent reply other threads:[~2019-08-21 8:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 14:11 [PATCH 0/4] iio: adc: ina2xx: Improve device identification Michal Simek
2019-08-20 14:11 ` [PATCH 1/4] iio: adc: ina2xx: Define *device_node only once Michal Simek
2019-08-21 1:56 ` Phil Reid
2019-08-20 14:11 ` [PATCH 2/4] iio: adc: ina2xx: Setup better name then simple ina2xx Michal Simek
2019-08-21 2:10 ` Phil Reid
2019-08-21 8:36 ` Michal Simek [this message]
2019-08-20 14:11 ` [PATCH 3/4] dt-bindings: Add optional label property for ina2xx Michal Simek
2019-08-27 17:06 ` Rob Herring
2019-08-20 14:11 ` [PATCH 4/4] iio: adc: ina2xx: Use label proper for device identification Michal Simek
2019-08-21 2:11 ` Phil Reid
2019-08-21 9:12 ` Michal Simek
2019-08-25 18:07 ` Jonathan Cameron
2019-08-27 3:55 ` Phil Reid
2019-08-27 6:14 ` Michal Simek
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=282e9668-affd-7266-b144-125a59e08e5b@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=colin.king@canonical.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=monstr@monstr.eu \
--cc=pmeerw@pmeerw.net \
--cc=preid@electromag.com.au \
--cc=stefan.bruens@rwth-aachen.de \
/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
all inboxes | Powered by JetHome®