devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Vikas Sajjan <sajjan.linux@gmail.com>, Tomasz Figa <t.figa@samsung.com>
Cc: devicetree@vger.kernel.org, k.debski@samsung.com,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	sunil joshi <joshi@samsung.com>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Chanho Park <chanho61.park@samsung.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH 1/4] ARM: dts: exynos4: add PMU syscon node
Date: Sat, 26 Apr 2014 01:52:15 +0200	[thread overview]
Message-ID: <535AF52F.4090906@gmail.com> (raw)
In-Reply-To: <CAGm_ybjhcAqX7biOvqLMgzHPQK=-EtaHtXpCtcJ1rcdRsxN_Og@mail.gmail.com>

Hi Vikas,

On 25.04.2014 10:05, Vikas Sajjan wrote:
> Hi,
>
>
> On Thu, Apr 24, 2014 at 9:37 PM, Tomasz Figa <t.figa@samsung.com> wrote:
>> Hi Chanho,
>>
>>
>> On 14.04.2014 14:48, Chanho Park wrote:
>>>
>>> This patch adds a PMU(Power Management Unit) syscon node. This
>>> should be required for USB Phy syscon regmap I/F.
>>>
>>> Cc: Tomasz Figa <t.figa@samsung.com>
>>> Cc: Kamil Debski <k.debski@samsung.com>
>>> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
>>> ---
>>>    arch/arm/boot/dts/exynos4.dtsi | 5 +++++
>>>    1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/exynos4.dtsi
>>> b/arch/arm/boot/dts/exynos4.dtsi
>>> index 2f8bcd0..e565b86 100644
>>> --- a/arch/arm/boot/dts/exynos4.dtsi
>>> +++ b/arch/arm/boot/dts/exynos4.dtsi
>>> @@ -110,6 +110,11 @@
>>>                  reg = <0x10010000 0x400>;
>>>          };
>>>
>>> +       pmu_reg: syscon@10020000 {
>>> +               compatible = "samsung,exynos4-pmureg", "syscon";
>>
>
>   Assume a case where exynos PMU is made as platform driver [1] and we
> need use the compatible  "samsung,exynos4-pmureg" in the driver.
> But since syscon driver uses compatible "syscon" and once the syscon
> driver is probed, the  exynos PMU platform driver [1] will NEVER be
> probed.
> So my question is, can we have 2 compatible strings for a DT node, and
> both the compatible strings are used for probing purpose?
> Recently I faced this issue on exynos5250, where i was testing PMU
> driver [1] and I noticed that  PMU driver [1] was NEVER probed, if I
> enable syscon driver in menuconfig.

No, it is not possible to bind two drivers with different compatible 
strings to the same node. Basically this is because only one platform 
driver can be bound to particular platform device.

The rule is that the most specific compatible string (e.g. the first 
from the left) that matches should be used, but I'm not sure if this is 
implemented this way in Linux kernel, especially considering that a 
platform driver usually probes when it is being registered. So we might 
have a race here, which you can work around by making sure that your PMU 
driver is always registered first (e.g. by lowering its initcall level).

Best regards,
Tomasz

  reply	other threads:[~2014-04-25 23:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 12:48 [PATCH 0/4] Enable usbphy and hsotg for exynos4 Chanho Park
2014-04-14 12:48 ` [PATCH 1/4] ARM: dts: exynos4: add PMU syscon node Chanho Park
2014-04-24 16:07   ` Tomasz Figa
2014-04-25  8:05     ` Vikas Sajjan
2014-04-25 23:52       ` Tomasz Figa [this message]
2014-04-26  2:33         ` Pankaj Dubey
2014-04-14 12:48 ` [PATCH 2/4] ARM: dts: exynos4: add exynos_usbphy node Chanho Park
2014-04-24 16:09   ` Tomasz Figa
2014-04-14 12:48 ` [PATCH 3/4] ARM: dts: exynos4: add hsotg device node Chanho Park
2014-04-24 16:16   ` Tomasz Figa
2014-04-14 12:48 ` [PATCH 4/4] ARM: dts: exynos4412-trats2: enable usb nodes Chanho Park

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=535AF52F.4090906@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=chanho61.park@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=joshi@samsung.com \
    --cc=k.debski@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sajjan.linux@gmail.com \
    --cc=t.figa@samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).