linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch 0/5] iio: adc: xilinx: Fix some minor issues
@ 2015-04-15 19:11 Thomas Betker
  2015-04-15 19:11 ` [PATCH 1/5] iio: adc: xilinx: Fix register addresses Thomas Betker
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Thomas Betker @ 2015-04-15 19:11 UTC (permalink / raw)
  To: linux-iio
  Cc: Jonathan Cameron, Lars-Peter Clausen, Michal Simek,
	Sören Brinkmann, Thomas Betker

This patch series fixes some issues found by tests on our Zynq-7020 
board; the issues usually result in incorrect voltage readings:

[1/5] iio: adc: xilinx: Fix register addresses
[2/5] iio: adc: xilinx: Fix "vccaux" channel .address
[3/5] iio: adc: xilinx: Fix VREFP scale
[4/5] iio: adc: xilinx: Fix VREFN sign
[5/5] iio: adc: xilinx: Set .datasheet_name instead of .extend_name

About [1]: The register addresses in question are currently not used by 
the driver, but we do use them for extended tests. (I might provide a 
patch to support lowest/highest values another time; see also [5].)

About [3], [4]: The transfer functions for VREFP and VREFN are 
	vrefp = unsigned(code) * 3.0 / 4096
	vrefn = signed(code) * 1.0 / 4096
I know it's not consistent, but that's what UG480 says ... VREFP = 1.25 
definitely needs the factor 3.0 to get reasonable values (a factor 1.0 
will never get you more than 1.0V). As for VREFN = 0V, we did actually 
see negative values on our boards.

About [5]: This may be a matter of debate on the IIO list, but I didn't 
get the impression that extensions are intended to be used that way.
    .extend_name = "vccint" means that the sysfs node names are 
in_voltage0_vccint_raw/_scale, which is a bit unexpected. I would 
rather see them called just in_voltage0_*, and reserve extensions for 
things like in_voltage0_lowest_* and in_voltage0_highest_* (MIN_VCCINT, 
MAX_VCCINT) -- that's what we do in our project.
    Note that .extend_name = "vccint", "vccaux", ... also has the side 
effect of creating the sysfs nodes vccint_sampling_frequency, 
vccaux_sampling_frequency, ... [due to .info_mask_shared_by_all = 
BIT(IIO_CHAN_INFO_SAMP_FREQ)], which is probably not desired.

Best regards,
Thomas Betker

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-07-03  7:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15 19:11 [Patch 0/5] iio: adc: xilinx: Fix some minor issues Thomas Betker
2015-04-15 19:11 ` [PATCH 1/5] iio: adc: xilinx: Fix register addresses Thomas Betker
2015-04-19 12:48   ` Jonathan Cameron
2015-04-15 19:11 ` [PATCH 2/5] iio: adc: xilinx: Fix "vccaux" channel .address Thomas Betker
2015-04-19 12:51   ` Jonathan Cameron
2015-04-15 19:11 ` [PATCH 3/5] iio: adc: xilinx: Fix VREFP scale Thomas Betker
2015-04-19 12:51   ` Jonathan Cameron
2015-06-26 21:55   ` Hartmut Knaack
2015-06-30 10:56     ` Thomas.Betker
2015-07-01 18:30       ` Hartmut Knaack
2015-07-03  7:52         ` Thomas.Betker
2015-04-15 19:11 ` [PATCH 4/5] iio: adc: xilinx: Fix VREFN sign Thomas Betker
2015-04-19 12:52   ` Jonathan Cameron
2015-04-15 19:11 ` [PATCH 5/5] iio: adc: xilinx: Set .datasheet_name instead of .extend_name Thomas Betker
2015-04-15 20:54 ` [Patch 0/5] iio: adc: xilinx: Fix some minor issues Jonathan Cameron
2015-04-16  6:20   ` Lars-Peter Clausen
2015-04-16  8:03     ` Thomas.Betker
2015-04-16  7:53   ` Thomas.Betker
2015-04-18 19:26     ` Jonathan Cameron
2015-04-20  8:34       ` Thomas.Betker
2015-04-21 19:35         ` Jonathan Cameron

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).