All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: devicetree@vger.kernel.org,
	Garlic Tseng <garlic.tseng@mediatek.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [SPAM]Re: [PATCH v3 4/5] dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device
Date: Wed, 28 Feb 2018 09:13:21 -0600	[thread overview]
Message-ID: <CAL_Jsq+NK-sUY-qOZ2Xv1ZfWVm-vG0tyAgN_auKeaQxMq58vkw@mail.gmail.com> (raw)
In-Reply-To: <1519272878.1907.87.camel@mtkswgap22>

On Wed, Feb 21, 2018 at 10:14 PM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> On Wed, 2018-02-21 at 08:10 -0600, Rob Herring wrote:
>> On Wed, Feb 21, 2018 at 12:04 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
>> > On Mon, 2018-02-19 at 12:29 -0600, Rob Herring wrote:
>> >> On Mon, Feb 12, 2018 at 5:28 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
>> >> > The MediaTek audio hardware block that exposes functionalities that are
>> >> > handled by separate subsystems in the kernel.  These functions are all
>> >> > mapped somewhere at 0x112xxxxx, and there are some control bits are mixed
>> >> > up with other functions within the same registers.
>> >>
>> >> I still don't think this change is necessary.
>> >>
>> >> Just because a hardware block in DT maps to different subsystems in a
>> >> particular OS doesn't mean you need a DT node for each OS subsystem.
>> >> What we have subsystems for changes over time and DT shouldn't really
>> >> be changing based on that. And DT is not the only way to instantiate
>> >> drivers.
>> >>
>> >
>> > Apart right now we have the definition of both functions. The other
>> > location is here:../sonud/mt2701-afe-pcm.txt. The ways I could come up
>> > with are:
>>
>> There are several problems you need to fix. First,
>> "mediatek,mt2701-audsys" is not documented. It is only used in the
>> example. Second, bindings/arm/mediatek/mediatek,audsys.txt should move
>> to bindings/sound/ if it is only audio related functions. Or perhaps
>> just combine the 2 documents because it is all inconsistent currently.
>
> Because the series crossed subsystems but didn't apply at the same time.
>
>> The 2 documents are inconsistent as to what is the relationship of
>> -audsys and -audio (afe) nodes. mt2701-afe-pcm.txt shows that the AFE
>> is already a child of -audsys. The -audsys node should have
>> #clock-cells. It should also not be a simple-mfd (another
>> inconsistency in the binding) because it needs to probe first to
>> provide clocks to child nodes, and then trigger probing the child
>> nodes.
>
> This is the 1st version I sent before, and the clock parts still under
> review :( .  But yes, the 2 inconsistent documents should be fixed -
> this may depend on what we end up doing with the DT appearance.
>
> IMHO, apart from overlapping regions with other functions I didn't see
> any difference between audsys and other clock drivers (providers).
>
> For the sake of uniformity, I make the 2 sub-devices parallel and move
> "simple-mfd" to the top, and the sequences should actually be handled
> through "probe deferral mechanism" - that would make this kind of
> situations much easier to manage.

If a child node has a dependency on the parent, probe deferral is not
the correct solution. The parent should probe first and control
probing of the chlidren. "simple-mfd" is intended for cases where
there is no dependency on the parent node.

> BTW, I could make the AFE driver be instantiated/probed from the clock
> driver but this seems superfluous to me.  Just make sure is this what
> you want?

I would think it would be the other way around. The AFE driver creates
some clocks. Whether that's a separate driver or a single driver is a
kernel issue that has nothing to do with the binding. IIRC, there's
several examples in display controllers and camera interfaces where
those drivers are also clock providers.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh+dt@kernel.org>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: devicetree@vger.kernel.org,
	Garlic Tseng <garlic.tseng@mediatek.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [SPAM]Re: [PATCH v3 4/5] dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device
Date: Wed, 28 Feb 2018 09:13:21 -0600	[thread overview]
Message-ID: <CAL_Jsq+NK-sUY-qOZ2Xv1ZfWVm-vG0tyAgN_auKeaQxMq58vkw@mail.gmail.com> (raw)
In-Reply-To: <1519272878.1907.87.camel@mtkswgap22>

On Wed, Feb 21, 2018 at 10:14 PM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> On Wed, 2018-02-21 at 08:10 -0600, Rob Herring wrote:
>> On Wed, Feb 21, 2018 at 12:04 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
>> > On Mon, 2018-02-19 at 12:29 -0600, Rob Herring wrote:
>> >> On Mon, Feb 12, 2018 at 5:28 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
>> >> > The MediaTek audio hardware block that exposes functionalities that are
>> >> > handled by separate subsystems in the kernel.  These functions are all
>> >> > mapped somewhere at 0x112xxxxx, and there are some control bits are mixed
>> >> > up with other functions within the same registers.
>> >>
>> >> I still don't think this change is necessary.
>> >>
>> >> Just because a hardware block in DT maps to different subsystems in a
>> >> particular OS doesn't mean you need a DT node for each OS subsystem.
>> >> What we have subsystems for changes over time and DT shouldn't really
>> >> be changing based on that. And DT is not the only way to instantiate
>> >> drivers.
>> >>
>> >
>> > Apart right now we have the definition of both functions. The other
>> > location is here:../sonud/mt2701-afe-pcm.txt. The ways I could come up
>> > with are:
>>
>> There are several problems you need to fix. First,
>> "mediatek,mt2701-audsys" is not documented. It is only used in the
>> example. Second, bindings/arm/mediatek/mediatek,audsys.txt should move
>> to bindings/sound/ if it is only audio related functions. Or perhaps
>> just combine the 2 documents because it is all inconsistent currently.
>
> Because the series crossed subsystems but didn't apply at the same time.
>
>> The 2 documents are inconsistent as to what is the relationship of
>> -audsys and -audio (afe) nodes. mt2701-afe-pcm.txt shows that the AFE
>> is already a child of -audsys. The -audsys node should have
>> #clock-cells. It should also not be a simple-mfd (another
>> inconsistency in the binding) because it needs to probe first to
>> provide clocks to child nodes, and then trigger probing the child
>> nodes.
>
> This is the 1st version I sent before, and the clock parts still under
> review :( .  But yes, the 2 inconsistent documents should be fixed -
> this may depend on what we end up doing with the DT appearance.
>
> IMHO, apart from overlapping regions with other functions I didn't see
> any difference between audsys and other clock drivers (providers).
>
> For the sake of uniformity, I make the 2 sub-devices parallel and move
> "simple-mfd" to the top, and the sequences should actually be handled
> through "probe deferral mechanism" - that would make this kind of
> situations much easier to manage.

If a child node has a dependency on the parent, probe deferral is not
the correct solution. The parent should probe first and control
probing of the chlidren. "simple-mfd" is intended for cases where
there is no dependency on the parent node.

> BTW, I could make the AFE driver be instantiated/probed from the clock
> driver but this seems superfluous to me.  Just make sure is this what
> you want?

I would think it would be the other way around. The AFE driver creates
some clocks. Whether that's a separate driver or a single driver is a
kernel issue that has nothing to do with the binding. IIRC, there's
several examples in display controllers and camera interfaces where
those drivers are also clock providers.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: robh+dt@kernel.org (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [SPAM]Re: [PATCH v3 4/5] dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device
Date: Wed, 28 Feb 2018 09:13:21 -0600	[thread overview]
Message-ID: <CAL_Jsq+NK-sUY-qOZ2Xv1ZfWVm-vG0tyAgN_auKeaQxMq58vkw@mail.gmail.com> (raw)
In-Reply-To: <1519272878.1907.87.camel@mtkswgap22>

On Wed, Feb 21, 2018 at 10:14 PM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> On Wed, 2018-02-21 at 08:10 -0600, Rob Herring wrote:
>> On Wed, Feb 21, 2018 at 12:04 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
>> > On Mon, 2018-02-19 at 12:29 -0600, Rob Herring wrote:
>> >> On Mon, Feb 12, 2018 at 5:28 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
>> >> > The MediaTek audio hardware block that exposes functionalities that are
>> >> > handled by separate subsystems in the kernel.  These functions are all
>> >> > mapped somewhere at 0x112xxxxx, and there are some control bits are mixed
>> >> > up with other functions within the same registers.
>> >>
>> >> I still don't think this change is necessary.
>> >>
>> >> Just because a hardware block in DT maps to different subsystems in a
>> >> particular OS doesn't mean you need a DT node for each OS subsystem.
>> >> What we have subsystems for changes over time and DT shouldn't really
>> >> be changing based on that. And DT is not the only way to instantiate
>> >> drivers.
>> >>
>> >
>> > Apart right now we have the definition of both functions. The other
>> > location is here:../sonud/mt2701-afe-pcm.txt. The ways I could come up
>> > with are:
>>
>> There are several problems you need to fix. First,
>> "mediatek,mt2701-audsys" is not documented. It is only used in the
>> example. Second, bindings/arm/mediatek/mediatek,audsys.txt should move
>> to bindings/sound/ if it is only audio related functions. Or perhaps
>> just combine the 2 documents because it is all inconsistent currently.
>
> Because the series crossed subsystems but didn't apply at the same time.
>
>> The 2 documents are inconsistent as to what is the relationship of
>> -audsys and -audio (afe) nodes. mt2701-afe-pcm.txt shows that the AFE
>> is already a child of -audsys. The -audsys node should have
>> #clock-cells. It should also not be a simple-mfd (another
>> inconsistency in the binding) because it needs to probe first to
>> provide clocks to child nodes, and then trigger probing the child
>> nodes.
>
> This is the 1st version I sent before, and the clock parts still under
> review :( .  But yes, the 2 inconsistent documents should be fixed -
> this may depend on what we end up doing with the DT appearance.
>
> IMHO, apart from overlapping regions with other functions I didn't see
> any difference between audsys and other clock drivers (providers).
>
> For the sake of uniformity, I make the 2 sub-devices parallel and move
> "simple-mfd" to the top, and the sequences should actually be handled
> through "probe deferral mechanism" - that would make this kind of
> situations much easier to manage.

If a child node has a dependency on the parent, probe deferral is not
the correct solution. The parent should probe first and control
probing of the chlidren. "simple-mfd" is intended for cases where
there is no dependency on the parent node.

> BTW, I could make the AFE driver be instantiated/probed from the clock
> driver but this seems superfluous to me.  Just make sure is this what
> you want?

I would think it would be the other way around. The AFE driver creates
some clocks. Whether that's a separate driver or a single driver is a
kernel issue that has nothing to do with the binding. IIRC, there's
several examples in display controllers and camera interfaces where
those drivers are also clock providers.

Rob

  reply	other threads:[~2018-02-28 15:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 11:28 [PATCH v3 0/5] switch to MFD device for MediaTek audio subsystem Ryder Lee
2018-02-12 11:28 ` Ryder Lee
2018-02-12 11:28 ` Ryder Lee
2018-02-12 11:28 ` [PATCH v3 1/5] clk: mediatek: update missing clock data for MT7622 audsys Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-13  9:13   ` Matthias Brugger
2018-02-13  9:13     ` Matthias Brugger
2018-02-13  9:13     ` Matthias Brugger
2018-02-13  9:13     ` Matthias Brugger
2018-02-12 11:28 ` [PATCH v3 2/5] clk: mediatek: modify MT7622 audsys to adapt MFD device Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-13  9:24   ` Matthias Brugger
2018-02-13  9:24     ` Matthias Brugger
2018-02-12 11:28 ` [PATCH v3 3/5] clk: mediatek: add audsys support for MT2701 Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-12 11:28 ` [PATCH v3 4/5] dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-19 18:29   ` Rob Herring
2018-02-19 18:29     ` Rob Herring
2018-02-19 18:29     ` Rob Herring
2018-02-21  6:04     ` [SPAM]Re: " Ryder Lee
2018-02-21  6:04       ` Ryder Lee
2018-02-21  6:04       ` Ryder Lee
2018-02-21 14:10       ` Rob Herring
2018-02-21 14:10         ` Rob Herring
2018-02-21 14:10         ` Rob Herring
2018-02-22  4:14         ` Ryder Lee
2018-02-22  4:14           ` Ryder Lee
2018-02-22  4:14           ` Ryder Lee
2018-02-28 15:13           ` Rob Herring [this message]
2018-02-28 15:13             ` Rob Herring
2018-02-28 15:13             ` Rob Herring
     [not found]             ` <CAL_Jsq+NK-sUY-qOZ2Xv1ZfWVm-vG0tyAgN_auKeaQxMq58vkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-28 17:58               ` Sean Wang
2018-02-28 17:58                 ` Sean Wang
2018-02-28 17:58                 ` Sean Wang
2018-03-05  9:23             ` Ryder Lee
2018-03-05  9:23               ` Ryder Lee
2018-03-05  9:23               ` Ryder Lee
2018-02-12 11:28 ` [PATCH v3 5/5] arm: dts: mediatek: add audio-subsystem node for both MT2701 and MT7623 Ryder Lee
2018-02-12 11:28   ` Ryder Lee
2018-02-12 11:28   ` Ryder Lee

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=CAL_Jsq+NK-sUY-qOZ2Xv1ZfWVm-vG0tyAgN_auKeaQxMq58vkw@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=garlic.tseng@mediatek.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ryder.lee@mediatek.com \
    --cc=sboyd@codeaurora.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.