lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 26 Jul 2020 13:50:59 +0100 From: Jonathan Cameron <jic23@...nel.org> To: "Pop, Cristian" <Cristian.Pop@...log.com> Cc: Lars-Peter Clausen <lars@...afoo.de>, "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [RFC PATCH] one-bit-adc-dac: Add initial version of one bit ADC, DAC .. > > > > > > + if (ret < 0) > > > > + return ret; > > > > + > > > > + for (i = 0; i < num_ch; i++) { > > > > + channels[i] = (struct > > iio_chan_spec)ONE_BIT_ADC_DAC_CHANNEL(i + > > > > + offset, > > > > + direction); > > > > + channels[i].extend_name = gpio_names[i]; > > > I think we want to avoid using extend_name in new drivers because it > > > makes for a very clumsy ABI. We should add a label property like we > > > have for the device for channels to have a symbolic name of the channel. > The current dts looks like this: > one-bit-adc-dac@0 { > in-gpios = <&gpio 17 0>, <&gpio 27 0>; > in-gpio-names = "i_17", "i_27"; > out-gpios = <&gpio 23 0>, <&gpio 24 0>; > out-gpio-names = "o_23", "o_24"; > }; > Resulting in channels: > in_voltage0_i_17_raw > in_voltage1_i_27_raw > out_voltage2_o_23_raw > out_voltage3_o_24_raw > If we want to lose extend_name, please provide an example for using labels. > How the dts should look like, how do I use it in the driver? Doesn't exist yet :) Proposal was to add support for a label attribute to the iio core. If we were going to do a generic binding it would have to be part of the existing channel bindings. e.g. Documentation/devicetree/bindings/iio/adc/adc.txt But here it might be fine to use the gpio-names to fill one in. Alternative would be to use a binding where the gpio was specified as part of the per channel child nodes rather than as a single entry.
Powered by blists - more mailing lists