devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 00/11] staging/iio: Devicetree support
@ 2013-01-31 21:42 Guenter Roeck
       [not found] ` <1359668588-13678-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 36+ messages in thread
From: Guenter Roeck @ 2013-01-31 21:42 UTC (permalink / raw)
  To: linux-iio-u79uwXL29TY76Z2rM5mHXA, Jonathan Cameron
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	Naveen Krishna Chatradhi, Lars-Peter Clausen, Doug Anderson,
	Tomasz Figa, Grant Likely, Rob Herring, Guenter Roeck

This patch set adds basic device tree support to the IIO subsystem. It is the
result of the [1] and [2] discussions. The patch set is based on v3.8-rc5.

Patches 1 to 7 are either bug fixes or cleanup patches and can at least in
theory be applied immediately, per the subsystem maintainer's choice.

Patch 8 and 9 modify the parameters to iio_channel_get_all_cb(),
iio_channel_get_all(), and iio_map_array_unregister() to prepare for the
subsequent patches. If and how those changes are acceptable is TBD.
Obviously the changes make sense to me, but if anyone has a better solution
please let me know.

Patch 10 adds basic OF support to the IIO subsystem. Support is modeled after
the clock subsystem. Obviously this will need some cleanup, and we'll have to
decide if the approach is acceptable and which OF specific functions will be
required. But it is at least a starting point for the discussion.

Patch 11 adds basic device-tree configuration to the MAX1363 driver;
I needed that for my target system which uses an external reference voltage.

For reference, here is a real dts file snippet:

	max1139: voltage-sensor@35 {
        	compatible = "maxim,max1139";
		reg = <0x35>;
		vref = <3300>;
		#io-channel-cells = <1>;
	};
	...
	iio_hwmon {
		compatible = "iio-hwmon";
		io-channels = <&max1139 0>, <&max1139 1>, <&max1139 2>,
			<&max1139 3>, <&max1139 4>, <&max1139 5>,
			<&max1139 6>, <&max1139 7>, <&max1139 8>,
			<&max1139 9>, <&max1139 10>, <&max1139 11>;
	};

This is the resulting output from the "sensors" command:

iio_hwmon-isa-000a
Adapter: ISA adapter
in1:          +0.00 V
in2:          +3.12 V
in3:          +1.64 V
in4:          +2.50 V
in5:          +3.29 V
in6:          +1.51 V
in7:          +3.30 V
in8:          +3.30 V
in9:          +1.05 V
in10:         +3.30 V
in11:         +1.65 V
in12:         +1.65 V

Probe deferral works quite nicely:

[   17.267086] platform iio_hwmon.10: Driver iio_hwmon requests probe deferral

Guenter

---
[1] http://marc.info/?l=linux-iio&m=135902119507483&w=2
[2] http://marc.info/?l=lm-sensors&m=135375101529918&w=1

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

end of thread, other threads:[~2013-02-03 16:28 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-31 21:42 [RFC 00/11] staging/iio: Devicetree support Guenter Roeck
     [not found] ` <1359668588-13678-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-01-31 21:42   ` [PATCH 01/11] staging/iio: (iio_hwmon) Use devm_kzalloc Guenter Roeck
     [not found]     ` <1359668588-13678-2-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02  9:50       ` Jonathan Cameron
2013-01-31 21:42   ` [PATCH 02/11] staging/iio: (iio_hwmon) Add support for sysfs name attribute Guenter Roeck
     [not found]     ` <1359668588-13678-3-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02  9:52       ` Jonathan Cameron
2013-01-31 21:43   ` [PATCH 03/11] staging/iio: (iio_hwmon) Basic devicetree support Guenter Roeck
     [not found]     ` <1359668588-13678-4-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02  9:54       ` Jonathan Cameron
2013-01-31 21:43   ` [PATCH 04/11] iio/adc: (lp8788) Provide OF node information to iio device Guenter Roeck
     [not found]     ` <1359668588-13678-5-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02  9:55       ` Jonathan Cameron
2013-01-31 21:43   ` [PATCH 05/11] iio/adc: (max1363) " Guenter Roeck
     [not found]     ` <1359668588-13678-6-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 10:06       ` Jonathan Cameron
2013-01-31 21:43   ` [PATCH 06/11] iio/adc: (max1363) Remove duplicate code Guenter Roeck
     [not found]     ` <1359668588-13678-7-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 10:07       ` Jonathan Cameron
2013-01-31 21:43   ` [PATCH 07/11] iio/adc: (max1363) Fix data conversion problems Guenter Roeck
     [not found]     ` <1359668588-13678-8-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 10:08       ` Jonathan Cameron
2013-01-31 21:43   ` [RFC 08/11] iio: Update iio_channel_get_all and iio_channel_get_all_cb API Guenter Roeck
     [not found]     ` <1359668588-13678-9-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 10:14       ` Jonathan Cameron
2013-01-31 21:43   ` [RFC 09/11] iio: Simplify iio_map_array_unregister API Guenter Roeck
     [not found]     ` <1359668588-13678-10-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 10:16       ` Jonathan Cameron
2013-01-31 21:43   ` [RFC 10/11] iio: Add OF support Guenter Roeck
     [not found]     ` <1359668588-13678-11-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-01 11:58       ` Lars-Peter Clausen
     [not found]         ` <510BADCA.1030407-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-02-01 14:33           ` Guenter Roeck
     [not found]             ` <20130201143307.GB20767-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-01 14:59               ` Lars-Peter Clausen
     [not found]                 ` <510BD845.1010200-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-02-01 19:42                   ` Guenter Roeck
     [not found]                     ` <20130201194213.GA17968-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 14:37                       ` Lars-Peter Clausen
     [not found]                         ` <510D24BA.5000300-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-02-02 16:14                           ` Guenter Roeck
2013-02-02 10:29       ` Jonathan Cameron
     [not found]         ` <510CEA6E.9010708-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-02 16:10           ` Guenter Roeck
     [not found]             ` <20130202161054.GA10386-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-03 11:39               ` Jonathan Cameron
     [not found]                 ` <510E4C85.9060507-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-03 11:47                   ` Lars-Peter Clausen
     [not found]                     ` <510E4E36.8090409-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-02-03 11:52                       ` Lars-Peter Clausen
     [not found]                         ` <510E4F76.1030702-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-02-03 11:57                           ` Jonathan Cameron
     [not found]                             ` <510E50C1.2010909-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-03 16:28                               ` Guenter Roeck
2013-01-31 21:43   ` [RFC 11/11] iio/adc: (max1363) Add basic OF bindings and external vref support Guenter Roeck
     [not found]     ` <1359668588-13678-12-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-02 10:33       ` Jonathan Cameron
     [not found]         ` <510CEB68.5000205-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-02 16:13           ` Guenter Roeck

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