Re: [PATCH] Add support for definition of register maps in DT in ADV7604

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/27/2014 03:03 PM, Hans Verkuil wrote:
On 08/27/14 14:53, jean-michel.hautbois@xxxxxxxxxxx wrote:
From: Jean-Michel Hautbois <jean-michel.hautbois@xxxxxxxxxxx>

This patch adds support for DT parsing of register maps adresses.
This allows multiple adv76xx devices on the same bus.

Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@xxxxxxxxxxx>
---
  .../devicetree/bindings/media/i2c/adv7604.txt      | 12 ++++
  drivers/media/i2c/adv7604.c                        | 71 ++++++++++++++++++----
  2 files changed, 71 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt
index c27cede..33881fb 100644
--- a/Documentation/devicetree/bindings/media/i2c/adv7604.txt
+++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt
@@ -32,6 +32,18 @@ The digital output port node must contain at least one endpoint.
  Optional Properties:

    - reset-gpios: Reference to the GPIO connected to the device's reset pin.
+  - adv7604-page-avlink: Programmed address for avlink register map
+  - adv7604-page-cec: Programmed address for cec register map
+  - adv7604-page-infoframe: Programmed address for infoframe register map
+  - adv7604-page-esdp: Programmed address for esdp register map
+  - adv7604-page-dpp: Programmed address for dpp register map
+  - adv7604-page-afe: Programmed address for afe register map
+  - adv7604-page-rep: Programmed address for rep register map
+  - adv7604-page-edid: Programmed address for edid register map
+  - adv7604-page-hdmi: Programmed address for hdmi register map
+  - adv7604-page-test: Programmed address for test register map
+  - adv7604-page-cp: Programmed address for cp register map
+  - adv7604-page-vdp: Programmed address for vdp register map

Might adv7604-addr-avlink be a better name? Other than that it looks good
to me.

Those properties need at least a vendor prefix. But to be honest I'd rather see generic support for multiple addresses in the I2C core. This is not a feature that is specific to this particular device. And for example similar things work already fine for other buses like for example MMIO devices.

E.g. something like

reg = <0x12 0x34 0x56 0x78 ...>
reg-names = "main", "avlink", "cec", "infoframe", ...

Ideally accessing those other addresses will be hidden in the I2C core by a helper function that allows you to create a dummy device for a particular sub-address.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux