From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH V5] iio: adc: Add Renesas GyroADC driver To: Jonathan Cameron , linux-iio@vger.kernel.org References: <20170115001437.30478-1-marek.vasut@gmail.com> <0e0398c2-a858-efe8-230f-c454145ec7bc@gmail.com> Cc: Geert Uytterhoeven , Simon Horman , linux-renesas-soc@vger.kernel.org From: Marek Vasut Message-ID: <17180a96-784b-883b-a4b5-11a3f6a42b98@gmail.com> Date: Sun, 15 Jan 2017 18:06:32 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 List-ID: On 01/15/2017 05:28 PM, Jonathan Cameron wrote: > > > On 15 January 2017 15:47:31 GMT+00:00, Marek Vasut wrote: >> On 01/15/2017 03:05 PM, Jonathan Cameron wrote: >>> On 15/01/17 00:14, Marek Vasut wrote: >>>> Add IIO driver for the Renesas RCar GyroADC block. This block is a >>>> simple 4/8-channel ADC which samples 12/15/24 bits of data every >>>> cycle from all channels. >>>> >>>> Signed-off-by: Marek Vasut >>>> Cc: Geert Uytterhoeven >>>> Cc: Simon Horman >>>> Cc: Jonathan Cameron >>>> Cc: linux-renesas-soc@vger.kernel.org >>> One question about the name attribute and what it gives you. Looks >> like another >>> case of what Lars has been pointing out this morning. >>> >>> We had a load of these sneak in. Changing them would break userspace >> code >>> so we can't fix them, but that attribute ought to give you something >>> related to the part number. >>> >>> Here it might even be cute to give an indication of what is connected >>> to it as part of the name. >> >> You can extract that information from the of_node, so I don't think >> that >> is a good idea, it'd only bring in duplication: >> >> ~ # cat /sys/bus/iio/devices/iio\:device0/of_node/adc@*/compatible >> maxim,max11100 >> > Fair enough >>> J >> >> [...] >> >>>> + ret = rcar_gyroadc_parse_subdevs(indio_dev); >>>> + if (ret) >>>> + return ret; >>>> + >>>> + ret = rcar_gyroadc_init_supplies(indio_dev); >>>> + if (ret) >>>> + return ret; >>>> + >>>> + priv->model = (enum rcar_gyroadc_model)of_id->data; >>>> + >>>> + platform_set_drvdata(pdev, indio_dev); >>>> + >>>> + indio_dev->name = dev_name(dev); >>> What do you then get when you read /sys/bus/iio/iio\:deviceX/name? >> >> e6e54000.adc >> >>> Should be something like the part number, rather than the id of the >>> parent device (I'm not 100% sure what that even is in this case!) >> >> You mean like "rcar-gyroadc" ? That works for me, sure. > Yes, that will do nicely. Done and V6 is out. -- Best regards, Marek Vasut