Commit e93762bb authored by Vignesh R's avatar Vignesh R Committed by Greg Kroah-Hartman

w1: masters: omap_hdq: add support for 1-wire mode

This patches makes following changes to omap_hdq driver
 - Enable 1-wire mode.
 - Implement w1_triplet callback to facilitate search rom
   procedure and auto detection of 1-wire slaves.
 - Proper enabling and disabling of interrupt.
 - Cleanups (formatting and return value checks).

HDQ mode remains unchanged.
Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
Cc: Jonathan Corbet <corbet@lwn.net>
CC: Tony Lindgren <tony@atomide.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Fabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5052436d
* OMAP HDQ One wire bus master controller * OMAP HDQ One wire bus master controller
Required properties: Required properties:
- compatible : should be "ti,omap3-1w" - compatible : should be "ti,omap3-1w" or "ti,am4372-hdq"
- reg : Address and length of the register set for the device - reg : Address and length of the register set for the device
- interrupts : interrupt line. - interrupts : interrupt line.
- ti,hwmods : "hdq1w" - ti,hwmods : "hdq1w"
Optional properties:
- ti,mode: should be "hdq": HDQ mode "1w": one-wire mode.
If not specified HDQ mode is implied.
Example: Example:
- From omap3.dtsi - From omap3.dtsi
...@@ -14,4 +18,5 @@ Example: ...@@ -14,4 +18,5 @@ Example:
reg = <0x480b2000 0x1000>; reg = <0x480b2000 0x1000>;
interrupts = <58>; interrupts = <58>;
ti,hwmods = "hdq1w"; ti,hwmods = "hdq1w";
ti,mode = "hdq";
}; };
...@@ -44,3 +44,9 @@ e.g: ...@@ -44,3 +44,9 @@ e.g:
insmod omap_hdq.ko W1_ID=2 insmod omap_hdq.ko W1_ID=2
inamod w1_bq27000.ko F_ID=2 inamod w1_bq27000.ko F_ID=2
The driver also supports 1-wire mode. In this mode, there is no need to
pass slave ID as parameter. The driver will auto-detect slaves connected
to the bus using SEARCH_ROM procedure. 1-wire mode can be selected by
setting "ti,mode" property to "1w" in DT (see
Documentation/devicetree/bindings/w1/omap-hdq.txt for more details).
By default driver is in HDQ mode.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment