From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Icenowy Zheng <icenowy@aosc.xyz>,
"codekipper@gmail.com" <codekipper@gmail.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"be17068@iperbole.bo.it" <be17068@iperbole.bo.it>,
"linux-sunxi@googlegroups.com" <linux-sunxi@googlegroups.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [linux-sunxi] Re: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF
Date: Mon, 22 Aug 2016 18:04:21 +0200 [thread overview]
Message-ID: <20160822160421.GR7104@lukather> (raw)
In-Reply-To: <CAGb2v65Hyp8U1OMrfy0Bo9-qC0eO5de+NjWQzch87_2Ty+fBqQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
Hi,
On Mon, Aug 01, 2016 at 09:39:34PM +0800, Chen-Yu Tsai wrote:
> Hi,
>
> On Sat, Jul 30, 2016 at 11:20 PM, maxime.ripard@free-electrons.com
> <maxime.ripard@free-electrons.com> wrote:
> > On Sat, Jul 30, 2016 at 10:52:45PM +0800, Icenowy Zheng wrote:
> >> > + if (of_device_is_compatible(pdev->dev.of_node,
> >> > + "allwinner,sun6i-a31-spdif")) {
> >> > + host->rst = devm_reset_control_get_optional(&pdev->dev, NULL);
> >> > + if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
> >> > + ret = -EPROBE_DEFER;
> >> > + dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
> >> > + goto err_disable_apb_clk;
> >> > + }
> >> > + if (!IS_ERR(host->rst))
> >> > + reset_control_deassert(host->rst);
> >> > + }
> >> > +
> >> I think you do not need the compatible.
> >> You can just detect whether the reset is present.
> >
> > That would weaken the error check. If we're running on the A31 and are
> > missing our reset property, it would go unnoticed.
>
> We've been doing it this way with the mmc controller and the usb hosts though.
> IIRC you once said in the older SoCs, the reset control is tied to the clock
> gate in the hardware.
>
> The _optional variant is also funny, though I understand it is a design
> of the reset controller framework.
Yes, I know. But that doesn't prevent that design from being better.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-22 16:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 14:27 [PATCH 0/2] ASoC: Extended SPDIF support to Allwinner A31 SoCs codekipper
2016-07-30 14:27 ` [PATCH 1/2] ASoC: sunxi: Add bindings for sun6i to SPDIF codekipper
2016-07-30 15:17 ` Maxime Ripard
2016-07-30 15:34 ` Code Kipper
2016-07-30 15:40 ` Maxime Ripard
2016-07-30 14:27 ` [PATCH 2/2] ASoC: sunxi: compatibility " codekipper
2016-07-30 14:40 ` [linux-sunxi] " Julian Calaby
2016-07-30 15:21 ` Maxime Ripard
2016-07-30 15:19 ` Maxime Ripard
[not found] ` <170941469890365@web9j.yandex.ru>
2016-07-30 15:20 ` maxime.ripard
2016-08-01 13:39 ` [linux-sunxi] " Chen-Yu Tsai
2016-08-22 16:04 ` Maxime Ripard [this message]
2016-08-12 12:29 ` Applied "ASoC: sunxi: compatibility for sun6i to SPDIF" to the asoc tree Mark Brown
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=20160822160421.GR7104@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=alsa-devel@alsa-project.org \
--cc=be17068@iperbole.bo.it \
--cc=broonie@kernel.org \
--cc=codekipper@gmail.com \
--cc=icenowy@aosc.xyz \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).