All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
Cc: jean-michel.hautbois-B+Q8N6RmIDZBDgjK7y7TUQ@public.gmane.org,
	linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] Add support for definition of register maps in DT in ADV7604
Date: Wed, 27 Aug 2014 16:05:30 +0200	[thread overview]
Message-ID: <53FDE5AA.2040805@metafoo.de> (raw)
In-Reply-To: <53FDD718.3020202-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>

On 08/27/2014 03:03 PM, Hans Verkuil wrote:
> On 08/27/14 14:53, jean-michel.hautbois-B+Q8N6RmIDZBDgjK7y7TUQ@public.gmane.org wrote:
>> From: Jean-Michel Hautbois <jean-michel.hautbois-B+Q8N6RmIDZBDgjK7y7TUQ@public.gmane.org>
>>
>> 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-B+Q8N6RmIDZBDgjK7y7TUQ@public.gmane.org>
>> ---
>>   .../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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Lars-Peter Clausen <lars@metafoo.de>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: jean-michel.hautbois@vodalys.com, linux-media@vger.kernel.org,
	Wolfram Sang <w.sang@pengutronix.de>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] Add support for definition of register maps in DT in ADV7604
Date: Wed, 27 Aug 2014 16:05:30 +0200	[thread overview]
Message-ID: <53FDE5AA.2040805@metafoo.de> (raw)
In-Reply-To: <53FDD718.3020202@xs4all.nl>

On 08/27/2014 03:03 PM, Hans Verkuil wrote:
> On 08/27/14 14:53, jean-michel.hautbois@vodalys.com wrote:
>> From: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
>>
>> 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@vodalys.com>
>> ---
>>   .../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

  parent reply	other threads:[~2014-08-27 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 12:53 [PATCH] Add support for definition of register maps in DT in ADV7604 jean-michel.hautbois
2014-08-27 13:03 ` Hans Verkuil
2014-08-27 13:13   ` Jean-Michel Hautbois
     [not found]   ` <53FDD718.3020202-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2014-08-27 14:05     ` Lars-Peter Clausen [this message]
2014-08-27 14:05       ` Lars-Peter Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FDE5AA.2040805@metafoo.de \
    --to=lars-qo5elluwu/uelga04laivw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org \
    --cc=jean-michel.hautbois-B+Q8N6RmIDZBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.