lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 1 Aug 2016 21:39:34 +0800
From:	Chen-Yu Tsai <wens@...e.org>
To:	Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc:	Icenowy Zheng <icenowy@...c.xyz>,
	"codekipper@...il.com" <codekipper@...il.com>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"lgirdwood@...il.com" <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"be17068@...rbole.bo.it" <be17068@...rbole.bo.it>,
	"linux-sunxi@...glegroups.com" <linux-sunxi@...glegroups.com>,
	"broonie@...nel.org" <broonie@...nel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [linux-sunxi] Re: [PATCH 2/2] ASoC: sunxi: compatibility for
 sun6i to SPDIF

Hi,

On Sat, Jul 30, 2016 at 11:20 PM, maxime.ripard@...e-electrons.com
<maxime.ripard@...e-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.


Regards
ChenYu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ