[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <282e9668-affd-7266-b144-125a59e08e5b@xilinx.com>
Date: Wed, 21 Aug 2019 10:36:03 +0200
From: Michal Simek <michal.simek@...inx.com>
To: Phil Reid <preid@...ctromag.com.au>,
Michal Simek <michal.simek@...inx.com>,
linux-kernel@...r.kernel.org, monstr@...str.eu, linux@...ck-us.net
Cc: Colin Ian King <colin.king@...onical.com>,
linux-iio@...r.kernel.org,
Stefan BrĂ¼ns <stefan.bruens@...h-aachen.de>,
Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Hartmut Knaack <knaack.h@....de>
Subject: Re: [PATCH 2/4] iio: adc: ina2xx: Setup better name then simple
ina2xx
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
Powered by blists - more mailing lists