All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] tegra: dpaux: pinctrl proposal
Date: Mon, 01 Jun 2015 13:24:51 -0600	[thread overview]
Message-ID: <556CB183.5020606@wwwdotorg.org> (raw)
In-Reply-To: <55688AB4.2030505-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 05/29/2015 09:50 AM, Jon Hunter wrote:
>
> On 22/05/15 15:37, Thierry Reding wrote:
>> I'd still clearly prefer to have the pinctrl code live directly in the
>> DPAUX driver, so I think we should at least give that a shot.
>
> I have been working on this more this week and the good news is that by
> using some of the pinconf-generic handlers I can simplify the code and
> avoid moving headers and structures around.
>
> However, I have ran into another issue. The current binding looks like
> this ...
>
>               dpaux: dpaux@0,545c0000 {
>                       compatible = "nvidia,tegra124-dpaux";
>                       reg = <0x0 0x545c0000 0x0 0x40000>;
>                       interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
>                       clocks = <&tegra_car TEGRA124_CLK_DPAUX>,
>                                <&tegra_car TEGRA124_CLK_PLL_DP>;
>                       clock-names = "dpaux", "parent";
>                       resets = <&tegra_car 181>;
>                       reset-names = "dpaux";
>                       status = "disabled";
>
>                       dpaux_state: dpaux_state0 {
>                               dpaux {
>                                       groups = "dpaux_io";
>                                       function = "dpaux";
>                                       nvidia,dpaux-drvi;
>                                       nvidia,dpaux-drvz;
>                                       nvidia,dpaux-cmh;
>                               };
>                       };
>
>                       i2c_state: i2c_state0 {
>                               i2c {
>                                       groups = "dpaux_io";
>                                       function = "i2c";
>                               };
>                       };
>
> This all works well, however, because the display-port binding now has
> child devices which are not i2c clients I see the following messages
> during kernel boot ...
>
> [    1.607606] i2c i2c-6: of_i2c: modalias failure on
> /host1x@0,50000000/dpaux@0,545c0000/dpaux_state0
> [    1.616658] i2c i2c-6: of_i2c: modalias failure on
> /host1x@0,50000000/dpaux@0,545c0000/i2c_state0

Hmm. The DT binding doc for dpaux doesn't say anything about the device 
being an I2C controller and hence inheriting/aggregating the core I2C 
schema. It should...

Equally, being an I2C controller means the node should have 
#address-cells/#size-cells properties for the I2C address.

> In other words, i2c_add_adapter() (which is called by probing the dpaux)
> then parses the child nodes looking for i2c client devices. However,
> these child devices are not i2c client devices and hence the above error
> messages. I can't find an easy way to avoid this. There is no
> side-effect from these messages, but I would prefer not to see them.

If this were a completely new binding, I think the best way would be to 
have the dpaux node contain a child node for each semantic service 
implemented by the device, e.g.:

dpaux {
     compatible = "nvidia,tegra124-dpaux";
     ...
     pinctrl {
         dpaux_state: dpaux_state0 {
             ...
         i2c_state: i2c_state0 {
             ...
     };
     i2c-bus {
         // i2c devices go here
         // I2C core pointed at this sub-node, not the dpaux node
     };
};

I guess we can't change the binding this way since it already exists, 
unless we introduce a new compatible value to distinguish the old and 
new styles.

Perhaps i2c_add_adapter should only attempt to instantiate devices for 
sub-nodes that contain a compatible and/or a reg property?

> Thierry, my understanding is the i2c-over-aux protocol is a simplified
> version of the i2c protocol. From a DT perspective would a dpaux device
> ever have i2c client devices as children like a normal i2c device has? I
> am wondering if it would be valid in this case to tell the i2c-core not
> to search for children. Although that sounds like a hack. I am not sure
> if the i2c folks would allow us to make these dev_dbg() prints.

  parent reply	other threads:[~2015-06-01 19:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 15:33 [RFC] tegra: dpaux: pinctrl proposal Jon Hunter
     [not found] ` <1431963229-12867-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-19 14:46   ` Thierry Reding
     [not found]     ` <20150519144654.GG26748-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-20 13:46       ` Jon Hunter
     [not found]         ` <555C901F.8090009-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-20 15:40           ` Thierry Reding
     [not found]             ` <20150520154022.GB7734-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-20 15:54               ` Jon Hunter
     [not found]                 ` <555CAE47.6070907-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-20 19:12                   ` Stephen Warren
     [not found]                     ` <555CDC82.1010104-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-05-21 13:03                       ` Jon Hunter
     [not found]                         ` <555DD7B3.6020608-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-21 14:03                           ` Thierry Reding
     [not found]                             ` <20150521140356.GA28021-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-22  7:03                               ` Linus Walleij
     [not found]                                 ` <CACRpkdYP5FN=4_pWxc1j=e_JfcjA3bXCPDRmZYHeiZ8HDyEaEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-22  9:57                                   ` Thierry Reding
2015-05-22 12:17                                   ` Jon Hunter
     [not found]                                     ` <555F1E3E.7040500-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-22 14:37                                       ` Thierry Reding
     [not found]                                         ` <20150522143706.GA19922-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-22 15:37                                           ` Jon Hunter
2015-05-29 15:50                                           ` Jon Hunter
     [not found]                                             ` <55688AB4.2030505-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-06-01 19:24                                               ` Stephen Warren [this message]
     [not found]                                                 ` <556CB183.5020606-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-06-02  9:18                                                   ` Jon Hunter
2015-05-22 15:41                                   ` Stephen Warren
     [not found]                                     ` <555F4E11.3050201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-05-24 21:13                                       ` Linus Walleij

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=556CB183.5020606@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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.