linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Phil Reid <preid@electromag.com.au>,
	Jonathan Cameron <jic23@kernel.org>,
	Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu,
	linux@roeck-us.net, "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>,
	"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
	"Hartmut Knaack" <knaack.h@gmx.de>
Subject: Re: [PATCH 4/4] iio: adc: ina2xx: Use label proper for device identification
Date: Tue, 27 Aug 2019 08:14:59 +0200	[thread overview]
Message-ID: <2135d69c-c429-00ad-9ddf-41c2e88d6d06@xilinx.com> (raw)
In-Reply-To: <af5fdfc3-dbc8-40fc-2893-c786670f28d4@electromag.com.au>

On 27. 08. 19 5:55, Phil Reid wrote:
> On 26/08/2019 02:07, Jonathan Cameron wrote:
>> On Wed, 21 Aug 2019 11:12:00 +0200
>> Michal Simek <michal.simek@xilinx.com> wrote:
>>
>>> On 21. 08. 19 4:11, Phil Reid wrote:
>>>> On 20/08/2019 22:11, Michal Simek wrote:
>>>>> Add support for using label property for easier device
>>>>> identification via
>>>>> iio framework.
>>>>>
>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>> ---
>>>>>
>>>>>    drivers/iio/adc/ina2xx-adc.c | 2 +-
>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/iio/adc/ina2xx-adc.c
>>>>> b/drivers/iio/adc/ina2xx-adc.c
>>>>> index 7c7c63677bf4..077c54915f70 100644
>>>>> --- a/drivers/iio/adc/ina2xx-adc.c
>>>>> +++ b/drivers/iio/adc/ina2xx-adc.c
>>>>> @@ -1033,7 +1033,7 @@ static int ina2xx_probe(struct i2c_client
>>>>> *client,
>>>>>        snprintf(chip->name, sizeof(chip->name), "%s-%s",
>>>>>             client->name, dev_name(&client->dev));
>>>>>    -    indio_dev->name = chip->name;
>>>>> +    indio_dev->name = of_get_property(np, "label", NULL) ? :
>>>>> chip->name;
>>>>>        indio_dev->setup_ops = &ina2xx_setup_ops;
>>>>>          buffer = devm_iio_kfifo_allocate(&indio_dev->dev);
>>>>>   
>>>> I like this personally. It'd be nice if it was a core function so
>>>> it could be an opt in to any iio device.
>>>>
>>>> Don't know how well received that'd be thou.
>>>>    
>> I'm not particularly keen on changing the semantics of existing
>> ABI, but how about adding new ABI to provide this?
>>
>> /sys/bus/iio/devices/iio\:device0/label for example?
>>
>> I haven't thought about it in depth yet though.  If you spin
>> a patch with that and the DT docs we'll be more likely to get
>> a view from DT maintainers if this is acceptable use of label.
>>
> 
> I've sent "iio: core: Add optional symbolic label to device attributes"
> for further discussion.

Series looks good. I expect that there will be also update in libiio if
this is accepted.

Thanks,
Michal

      reply	other threads:[~2019-08-27  6:15 UTC|newest]

Thread overview: 12+ 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
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 [this message]

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=2135d69c-c429-00ad-9ddf-41c2e88d6d06@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;
as well as URLs for NNTP newsgroup(s).