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]
Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7014B22B961@SW-EX-MBX02.diasemi.com>
Date:	Tue, 19 May 2015 08:34:45 +0000
From:	"Opensource [Steve Twiss]" <stwiss.opensource@...semi.com>
To:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>
CC:	LINUXKERNEL <linux-kernel@...r.kernel.org>,
	Lee Jones <lee.jones@...aro.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	"Alessandro Zummo" <a.zummo@...ertech.it>,
	DEVICETREE <devicetree@...r.kernel.org>,
	"David Dajun Chen" <david.chen@...semi.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	LINUXINPUT <linux-input@...r.kernel.org>,
	LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Pawel Moll <pawel.moll@....com>,
	RTCLINUX <rtc-linux@...glegroups.com>,
	Rob Herring <robh+dt@...nel.org>,
	"Support Opensource" <Support.Opensource@...semi.com>,
	Wim Van Sebroeck <wim@...ana.be>
Subject: RE: [rtc-linux] [PATCH V2 1/4] mfd: da9062: DA9062 MFD core driver

On 16 May 2015 09:53 Alexandre Belloni wrote:

Hi Alexandre,

> On 14/05/2015 at 17:43:52 +0100, S Twiss wrote :

[...]

> > +	{
> > +		.name		= "da9062-watchdog",
> > +		.num_resources	= ARRAY_SIZE(da9062_wdt_resources),
> > +		.resources	= da9062_wdt_resources,
> > +		.of_compatible  = "dlg,da9062-wdt",
> > +	},
> > +	{
> > +		.name		= "da9062-onkey",
> > +		.num_resources	= ARRAY_SIZE(da9062_onkey_resources),
> > +		.resources	= da9062_onkey_resources,
> > +		.of_compatible  = "dlg,da9062-onkey",
> > +	},
> > +	{
> > +		.name		= "da9062-thermal",
> > +		.num_resources	= ARRAY_SIZE(da9062_thermal_resources),
> > +		.resources	= da9062_thermal_resources,
> > +		.of_compatible  = "dlg,da9062-thermal",
> > +	},
> > +	{
> > +		.name		= "da9062-rtc",
> > +		.num_resources	= ARRAY_SIZE(da9062_rtc_resources),
> > +		.resources	= da9062_rtc_resources,
> > +		.of_compatible  = "dlg,da9062-rtc",
> 
> Did you try to use "da9063-rtc"? The register set seems to be exactly
> the same. Unfortunately, the datasheet are not available on the diasemi
> website...

I will remove the DA9062 OnKey and RTC parts with a view to putting them back
when I do the work for the DA9063 alterations.

> Also, the .of_compatibles are not necessary because you don't add any of
> bindings to the underlying drivers. The match happens on .name.
> 
> > diff --git a/include/linux/mfd/da9062/registers.h
> b/include/linux/mfd/da9062/registers.h
> > new file mode 100644
> > index 0000000..d07c2bc
> > --- /dev/null
> > +++ b/include/linux/mfd/da9062/registers.h
> 
> Comparing that file with da9063/registers.h, It really seems that
> DA062AA, DA9063AD and DA9063BB are register compatible, apart from a
> few
> differences in the regulator and the gpio count.
> 
> Also, at least the watchdog and rtc driver are duplicating their da9063
> counterpart. I'm not trying to annoy you, I just want you to understand
> that the less code is duplicated, the easiest it will be to maintain
> later.

This has come up a lot lately.

https://lkml.org/lkml/2015/4/24/304
https://lkml.org/lkml/2015/5/13/383
https://lkml.org/lkml/2015/5/6/505
https://lkml.org/lkml/2015/5/18/511

The short answer is that the DA9062 and DA9063 chips are not identical. Although
their numbers are sequential and there are functional similarities for some of the
components, this is not the norm for the two chips.

In some cases re-using driver components from DA9063 is a good way forward, but
making all components part of a monolithic driver would make both DA9062 and
DA9063 over complicated and unmaintainable -- in my opinion.

However it's not just my opinion we have to consider here I think.

The RTC and OnKey in this case can be done fairly easily I think -- there can be some
re-use in those components -- although there are fairly important RTC differences between
the DA9063 AD and DA9063 BB silicon revisions (in the form of a new register, different
functionality in the alarm and a register shift). So even that is not a straight-forward
"swap" to run DA9062.

Regards,
Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ