From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Rob Herring <robh@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
mchehab@kernel.org, Mark Rutland <mark.rutland@arm.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] dt-bindings: media: adv748x: Document re-mappable addresses
Date: Mon, 13 Aug 2018 20:17:42 +0100 [thread overview]
Message-ID: <dedade62-91ed-2c92-dac7-fe4a8f9d9452@ideasonboard.com> (raw)
In-Reply-To: <20180813174544.GA11379@rob-hp-laptop>
Hi Rob,
On 13/08/18 18:45, Rob Herring wrote:
> On Thu, Aug 09, 2018 at 08:29:44PM +0100, Kieran Bingham wrote:
>> The ADV748x supports configurable slave addresses for its I2C pages.
>> Document the page names, and provide an example for setting each of the
>> pages explicitly.
>
> It would be good to say why you need this.
In fact - I should probably have added a fixes tag here, which would
have added more context:
Fixes: 67537fe960e5 ("media: i2c: adv748x: Add support for
i2c_new_secondary_device")
Should I repost with this fixes tag?
Or can it be collected with the RB tag?
> The only use I can think of
> is if there are other devices on the bus and you need to make sure the
> addresses don't conflict.
Yes, precisely. This driver has 'slave pages' which are created and
mapped by the driver. The device has default addresses which are used by
the driver - but it's very easy for these to conflict with other devices
on the same I2C bus.
Because the mappings are simply a software construct, we have a means to
specify the desired mappings through DT at the board level - which
allows the boards to ensure that conflicts do not appear.
> Arguably, that information could be figured out without this in DT.
How so ?
Scanning the bus is error prone, and dependant upon driver state (and
presence), and we have no means currently of requesting 'free/unused'
addresses from the I2C core framework.
> Regardless,
>
> Reviewed-by: Rob Herring <robh@kernel.org>
Thank you.
--
Regards
Kieran
>
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>
>> ---
>> v2:
>> - Fix commit message
>> - Extend documentation for the "required property" reg:
>>
>> v3
>> - Fix missing comment from Laurent.
>> - correct the reg descrption
>> ---
>> .../devicetree/bindings/media/i2c/adv748x.txt | 16 ++++++++++++++--
>> 1 file changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/adv748x.txt b/Documentation/devicetree/bindings/media/i2c/adv748x.txt
>> index 21ffb5ed8183..25a02496f4ba 100644
>> --- a/Documentation/devicetree/bindings/media/i2c/adv748x.txt
>> +++ b/Documentation/devicetree/bindings/media/i2c/adv748x.txt
>> @@ -10,7 +10,11 @@ Required Properties:
>> - "adi,adv7481" for the ADV7481
>> - "adi,adv7482" for the ADV7482
>>
>> - - reg: I2C slave address
>> + - reg: I2C slave addresses
>> + The ADV748x has up to twelve 256-byte maps that can be accessed via the
>> + main I2C ports. Each map has it own I2C address and acts as a standard
>> + slave device on the I2C bus. The main address is mandatory, others are
>> + optional and remain at default values if not specified.
>>
>> Optional Properties:
>>
>> @@ -18,6 +22,11 @@ Optional Properties:
>> "intrq3". All interrupts are optional. The "intrq3" interrupt
>> is only available on the adv7481
>> - interrupts: Specify the interrupt lines for the ADV748x
>> + - reg-names : Names of maps with programmable addresses.
>> + It shall contain all maps needing a non-default address.
>> + Possible map names are:
>> + "main", "dpll", "cp", "hdmi", "edid", "repeater",
>> + "infoframe", "cbus", "cec", "sdp", "txa", "txb"
>>
>> The device node must contain one 'port' child node per device input and output
>> port, in accordance with the video interface bindings defined in
>> @@ -47,7 +56,10 @@ Example:
>>
>> video-receiver@70 {
>> compatible = "adi,adv7482";
>> - reg = <0x70>;
>> + reg = <0x70 0x71 0x72 0x73 0x74 0x75
>> + 0x60 0x61 0x62 0x63 0x64 0x65>;
>> + reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
>> + "infoframe", "cbus", "cec", "sdp", "txa", "txb";
>>
>> #address-cells = <1>;
>> #size-cells = <0>;
>> --
>> 2.17.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Regards
--
Kieran
next prev parent reply other threads:[~2018-08-13 19:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 19:29 Kieran Bingham
2018-08-13 17:45 ` Rob Herring
2018-08-13 19:17 ` Kieran Bingham [this message]
2018-08-13 22:48 ` Rob Herring
2018-08-14 5:40 ` Laurent Pinchart
2018-08-14 9:00 ` Kieran Bingham
2018-08-13 20:06 ` Laurent Pinchart
2018-08-16 8:36 ` Niklas Söderlund
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=dedade62-91ed-2c92-dac7-fe4a8f9d9452@ideasonboard.com \
--to=kieran.bingham@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®