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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b9d7ba7f59b5c6787c40f86e0258f55fe73e10c.camel@fi.rohmeurope.com>
Date:   Fri, 18 Sep 2020 06:06:24 +0000
From:   "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To:     "linux@...ck-us.net" <linux@...ck-us.net>,
        "mazziesaccount@...il.com" <mazziesaccount@...il.com>
CC:     "wim@...ux-watchdog.org" <wim@...ux-watchdog.org>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        linux-power <linux-power@...rohmeurope.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
        "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
Subject: Re: [PATCH v1 4/6] wdt: Support wdt on ROHM BD9576MUF and BD9573MUF

Thanks (again) for review Guenter!

On Thu, 2020-09-17 at 22:45 -0700, Guenter Roeck wrote:
> On 9/17/20 1:03 AM, Matti Vaittinen wrote:
> > Add Watchdog support for ROHM BD9576MUF and BD9573MUF PMICs which
> > are
> > mainly used to power the R-Car series processors. The watchdog is
> > pinged using a GPIO and enabled using another GPIO. Additionally
> > watchdog time-out can be configured to HW prior starting the
> > watchdog.
> > Watchdog timeout can be configured to detect only delayed ping or
> > in
> > a window mode where also too fast pings are detected.
> > 
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> > ---
> >  drivers/watchdog/Kconfig      |  13 ++
> >  drivers/watchdog/Makefile     |   1 +
> >  drivers/watchdog/bd9576_wdt.c | 295
> > ++++++++++++++++++++++++++++++++++
> >  3 files changed, 309 insertions(+)
> >  create mode 100644 drivers/watchdog/bd9576_wdt.c

> 
> > +
> > +	ret = of_property_read_u32(np,
> > +				   "hw_margin_ms", &hw_margin);
> 
> Line splits are arbitrary. Why is this "hw_margin_ms" and not
> "rohm,hw_margin_ms" ?

"hw_margin_ms" is an existing binding for specifying the maximum TMO in
HW (if I understood it correctly). (It is used at least by the generig
GPIO watchdog) I thought it's better to not invent a new vendor
specific binding when we have a generic one.

https://elixir.bootlin.com/linux/v5.9-rc2/source/Documentation/devicetree/bindings/watchdog/gpio-wdt.txt

> 
> > +	if (ret) {
> > +		if (ret != -EINVAL)
> > +			return ret;
> > +
> > +		hw_margin = BD957X_WDT_DEFAULT_MARGIN;
> > +	}
> > +
> > +	ret = of_property_read_u32(np, "rohm,hw-margin-min-ms",
> > &hw_margin_min);
> > +	if (ret == -EINVAL)
> > +		hw_margin_min = 0;
> > +	else if (ret)
> > +		return ret;
> 
> Please use a single mechanism to handle -EINVAL after
> of_property_read_u32().

Sorry Guenter - I am probably a bit slow today but I am unsure if I
understand the suggestion. Do you mean something like:

hw_margin_min = 0;

ret = of_property_read_u32(np, "rohm,hw-margin-min-ms",
&hw_margin_min);
if (ret && ret != -EINVAL)
	return ret;

Other than that - all findings are clear to me. I'll craft a new
version but I'll wait for a while to see if Lee has time to send some
feedback on MFD so I could get both WDG and MFD fixes to same version
:)

Best Regards
	--Matti


--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland
SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~

Simon says - in Latin please.
"non cogito me" dixit Rene Descarte, deinde evanescavit

(Thanks for the translation Simon)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ