linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Mark Brown <broonie@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv4 1/4] dt-bindings: sound: add motorola,cpcap-audio-codec
Date: Fri, 16 Feb 2018 07:57:07 -0800	[thread overview]
Message-ID: <20180216155706.GS6364@atomide.com> (raw)
In-Reply-To: <20180216151609.GK5886@sirena.org.uk>

* Mark Brown <broonie@kernel.org> [180216 15:17]:
> On Fri, Feb 16, 2018 at 03:12:37PM +0100, Sebastian Reichel wrote:
> > On Fri, Feb 16, 2018 at 01:44:48PM +0000, Mark Brown wrote:
> > > On Fri, Feb 16, 2018 at 02:25:38PM +0100, Sebastian Reichel wrote:
> 
> > > > While it looks empty in the DT binding file, it's actually not empty
> > > > once some standard properties are added to support audio-graph-card.
> 
> > > This tells me you're missing something in the binding defining the
> > > DAIs and...
> 
> > Well it is described by the following document:
> 
> > Documentation/devicetree/bindings/sound/audio-graph-card.txt
> 
> You still need to say which DAIs exist on the device and how they are
> identified - if there's only one DAI it's obviously easy but if a device
> has multiple DAIs then there's some naming to do.
> 
> > > ...that still doesn't require a compatible here.
> 
> > I agree, that it's not required. Also the node is not required.
> > Everything could be dumped into the main node. Many things are
> > not required, but they make implementations easier and help in
> > regards to DT readability and consistency. Having the compatible
> > means, that all sub-functions _can_ be handled equally by the
> > operating system. Not having the compatible means you _always_
> > need special handling for the audio codec. This basically makes
> > the codec node different for the simple purpose of "because it is
> > not strictly required". If we have a compatible node, other
> > operating systems can still decide to ignore it, right?
> 
> It's not just other operating systems, it's also other versions of
> Linux we have to think about here.  The most obvious issue with audio is
> the clocking where the division between ASoC and clock APIs is not super
> obvious and could easily change in the future.

Yeah let's stick to describing how the hardware is wired in the
dts files. In this case it's really only the routing to the SoC,
right?

One advantage of using a compatible property for the pmic subdevices
though is that it leaves out a dependency between various device
drivers things happen automagically. The mfd core driver can be
minimal and just implement interrupt handling and regmap. So no need
to to parse the child nodes in the pmic mfd driver :)

So personally I'd prefer the option that requires least amount
of custom code if compatible vs no compatible property is the
only issue here.

Regards,

Tony

  reply	other threads:[~2018-02-16 15:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 22:07 [PATCHv4 0/4] Motorola Droid 4 Audio Support Sebastian Reichel
2018-02-14 22:07 ` [PATCHv4 1/4] dt-bindings: sound: add motorola,cpcap-audio-codec Sebastian Reichel
2018-02-16 11:30   ` Mark Brown
2018-02-16 13:25     ` Sebastian Reichel
2018-02-16 13:44       ` Mark Brown
2018-02-16 14:12         ` Sebastian Reichel
2018-02-16 15:16           ` Mark Brown
2018-02-16 15:57             ` Tony Lindgren [this message]
2018-02-19 13:05               ` Mark Brown
2018-02-22 19:54                 ` Tony Lindgren
2018-02-23 12:47                   ` Sebastian Reichel
2018-02-16 15:58             ` Sebastian Reichel
2018-02-19 13:25               ` Mark Brown
2018-02-14 22:07 ` [PATCHv4 2/4] ASoC: codec: cpcap: new codec Sebastian Reichel
2018-02-15  9:50   ` Philippe Ombredanne
2018-02-16 13:31     ` Sebastian Reichel
2018-02-16 11:39   ` Mark Brown
2018-02-16 13:51     ` Sebastian Reichel
2018-02-16 14:27       ` Mark Brown
2018-02-23  8:07         ` Pavel Machek
2018-02-23 12:44           ` Sebastian Reichel
2018-02-14 22:07 ` [PATCHv4 3/4] ARM: dts: motorola-cpcap-mapphone: add audio-codec Sebastian Reichel
2018-02-14 22:07 ` [PATCHv4 4/4] ARM: dts: omap4-droid4: add soundcard Sebastian Reichel

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=20180216155706.GS6364@atomide.com \
    --to=tony@atomide.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.co.uk \
    --cc=tiwai@suse.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).