From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from saturn.retrosnub.co.uk ([178.18.118.26]:47914 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbbFGQta (ORCPT ); Sun, 7 Jun 2015 12:49:30 -0400 Message-ID: <55747616.1010901@kernel.org> Date: Sun, 07 Jun 2015 17:49:26 +0100 From: Jonathan Cameron MIME-Version: 1.0 To: Xander Huff , lars@metafoo.de, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org CC: michal.simek@xilinx.com, soren.brinkmann@xilinx.com, knaack.h@gmx.de, pmeerw@pmeerw.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org, ben.shelton@ni.com, joshc@ni.com, joe.hershberger@ni.com Subject: Re: [PATCH v2 2/2] iio: adc: xilinx-xadc: Add label as an optional argument for aux channels References: <555B78A3.2030202@metafoo.de> <1432135352-29848-1-git-send-email-xander.huff@ni.com> <1432135352-29848-2-git-send-email-xander.huff@ni.com> In-Reply-To: <1432135352-29848-2-git-send-email-xander.huff@ni.com> Content-Type: text/plain; charset=windows-1252 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On 20/05/15 16:22, Xander Huff wrote: > To better facilitate user-mode access to optional aux channels, allow > device trees to specify a custom label for defined channels. > > Signed-off-by: Xander Huff > Reviewed-by: Joe Hershberger > Reviewed-by: Josh Cartwright > --- > drivers/iio/adc/xilinx-xadc-core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c > index ce93bd8..bda4241 100644 > --- a/drivers/iio/adc/xilinx-xadc-core.c > +++ b/drivers/iio/adc/xilinx-xadc-core.c > @@ -1119,6 +1119,9 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np, > if (ret || reg > 16) > continue; > > + of_property_read_string(child, "label", > + &chan->extend_name); > + > if (of_property_read_bool(child, "xlnx,bipolar")) > chan->scan_type.sign = 's'; > > I think what Lars was suggesting was a change to the IIO side of this rather than just changing the device tree binding. Perhaps an additional per channel attribute called _label which would allow for board specific labelling? From mboxrd@z Thu Jan 1 00:00:00 1970 From: jic23@kernel.org (Jonathan Cameron) Date: Sun, 07 Jun 2015 17:49:26 +0100 Subject: [PATCH v2 2/2] iio: adc: xilinx-xadc: Add label as an optional argument for aux channels In-Reply-To: <1432135352-29848-2-git-send-email-xander.huff@ni.com> References: <555B78A3.2030202@metafoo.de> <1432135352-29848-1-git-send-email-xander.huff@ni.com> <1432135352-29848-2-git-send-email-xander.huff@ni.com> Message-ID: <55747616.1010901@kernel.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 20/05/15 16:22, Xander Huff wrote: > To better facilitate user-mode access to optional aux channels, allow > device trees to specify a custom label for defined channels. > > Signed-off-by: Xander Huff > Reviewed-by: Joe Hershberger > Reviewed-by: Josh Cartwright > --- > drivers/iio/adc/xilinx-xadc-core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c > index ce93bd8..bda4241 100644 > --- a/drivers/iio/adc/xilinx-xadc-core.c > +++ b/drivers/iio/adc/xilinx-xadc-core.c > @@ -1119,6 +1119,9 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np, > if (ret || reg > 16) > continue; > > + of_property_read_string(child, "label", > + &chan->extend_name); > + > if (of_property_read_bool(child, "xlnx,bipolar")) > chan->scan_type.sign = 's'; > > I think what Lars was suggesting was a change to the IIO side of this rather than just changing the device tree binding. Perhaps an additional per channel attribute called _label which would allow for board specific labelling? From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Cameron Subject: Re: [PATCH v2 2/2] iio: adc: xilinx-xadc: Add label as an optional argument for aux channels Date: Sun, 07 Jun 2015 17:49:26 +0100 Message-ID: <55747616.1010901@kernel.org> References: <555B78A3.2030202@metafoo.de> <1432135352-29848-1-git-send-email-xander.huff@ni.com> <1432135352-29848-2-git-send-email-xander.huff@ni.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432135352-29848-2-git-send-email-xander.huff-acOepvfBmUk@public.gmane.org> Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Xander Huff , lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org Cc: michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org, soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org, knaack.h-Mmb7MZpHnFY@public.gmane.org, pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ben.shelton-acOepvfBmUk@public.gmane.org, joshc-acOepvfBmUk@public.gmane.org, joe.hershberger-acOepvfBmUk@public.gmane.org List-Id: devicetree@vger.kernel.org On 20/05/15 16:22, Xander Huff wrote: > To better facilitate user-mode access to optional aux channels, allow > device trees to specify a custom label for defined channels. > > Signed-off-by: Xander Huff > Reviewed-by: Joe Hershberger > Reviewed-by: Josh Cartwright > --- > drivers/iio/adc/xilinx-xadc-core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c > index ce93bd8..bda4241 100644 > --- a/drivers/iio/adc/xilinx-xadc-core.c > +++ b/drivers/iio/adc/xilinx-xadc-core.c > @@ -1119,6 +1119,9 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np, > if (ret || reg > 16) > continue; > > + of_property_read_string(child, "label", > + &chan->extend_name); > + > if (of_property_read_bool(child, "xlnx,bipolar")) > chan->scan_type.sign = 's'; > > I think what Lars was suggesting was a change to the IIO side of this rather than just changing the device tree binding. Perhaps an additional per channel attribute called _label which would allow for board specific labelling?