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:	Tue, 27 May 2014 09:30:12 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Keerthy <a0393675@...com>
Cc:	Mark Brown <broonie@...nel.org>, Keerthy <j-keerthy@...com>,
	linux-omap@...r.kernel.org, lgirdwood@...il.com,
	linux-kernel@...r.kernel.org, sameo@...ux.intel.com
Subject: Re: [PATCH 5/5] regulator: tps65917: Add Regulator driver for
 tps65917 PMIC

> >>This patch adds support for TPS65917 PMIC regulators.
> >>
> >>The regulators set consists of 5 SMPSs and 5 LDOs. The output
> >>voltages are configurable and are meant to supply power to the
> >>main processor and other components.
> >This appears to look *very* like the Palmas driver, should it not be
> >sharing code with that?  If it were just data tables it'd be less of a
> >concern but there's quite a bit of actual code here.
> Yes it is. The difference is in the entire register space of the regulators
> between the two. There are other differences in how the ramp delay
> is configured and SMPS ordering. The difference is also a bit in the
> programming
> sequence. I agree that largely it is Palmas based. I did not want to
> add more
> checks in the probe of the palmas driver. Hence came up with a new one.
> 
> Coming to sharing the code, can we have 2 drivers which share the common
> functions with separate data and specific functions?

Yes, that is what the match functionality is for.  Once you know which
driver you're dealing with, you can call specific initialisation
functions and/or supplement generic generic data structures with device
specific ones.

> I just simply do not want to add anything more to the palmas driver
> probe function.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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