Thara Gopinath <thara@xxxxxx> writes: > OMAP3 smartreflex modules are capable of two different classes > of implementaion - > Class-2: Continuous Software Calibration > Class-3: Continuous Hardware Calibration. > OMAP3 along with T2/Gaia supports the Class 3 implementaion. > With a different PMIC it can support Class 2 implementaion also. > > The idea behind this patch is that smartreflex.c should be able > to support both the classes of Smartreflex and the class specific > details for smartreflex should stay out of this file in a separate > class file. > This patch introduces smartreflex class specific hooks in > smartreflex.c. This patch only takes care of smartreflex enable > disable hooks which differ between Class 2 and Class 3. There > are some register setting changes between both the classes which > will be taken care of in a later patch. > This will form the base for adding class specific > drivers in later patches. > > Signed-off-by: Thara Gopinath <thara@xxxxxx> > --- > arch/arm/mach-omap2/pm34xx.c | 8 +- > arch/arm/mach-omap2/smartreflex.c | 251 ++++++++++++++++++++---------------- > arch/arm/mach-omap2/smartreflex.h | 48 ++++++-- > 3 files changed, 182 insertions(+), 125 deletions(-) > [...] > diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c > index c00925d..ba9f899 100644 > --- a/arch/arm/mach-omap2/smartreflex.c > +++ b/arch/arm/mach-omap2/smartreflex.c > @@ -55,6 +55,7 @@ struct omap_sr { > > /* sr_list contains all the instances of smartreflex module */ > static LIST_HEAD(sr_list); > +static struct omap_smartreflex_class_data *sr_class; I think the class should be part of 'struct omap_sr'. This should be coded in a way to allow a different class type or each SR module (even if that is never useful in practice.) Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html