public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Keerthy <a0393675@ti.com>
Cc: Mark Brown <broonie@kernel.org>, Keerthy <j-keerthy@ti.com>,
	linux-omap@vger.kernel.org, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org, sameo@linux.intel.com
Subject: Re: [PATCH 5/5] regulator: tps65917: Add Regulator driver for tps65917 PMIC
Date: Tue, 27 May 2014 09:30:12 +0100	[thread overview]
Message-ID: <20140527083012.GA5875@lee--X1> (raw)
In-Reply-To: <538404F2.9000505@ti.com>

> >>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

      reply	other threads:[~2014-05-27  8:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26  9:56 [PATCH 0/5] tps65917: Add support for for TPS65917 PMIC Keerthy
2014-05-26  9:56 ` [PATCH 1/5] mfd: Add DT bindings for tps65917 PMIC Keerthy
2014-05-26  9:56 ` [PATCH 2/5] Regulators: Add TPS65917 Bindings Keerthy
2014-05-26  9:56 ` [PATCH 3/5] mfd: palmas: Add tps65917 specific definitions and enums Keerthy
2014-05-27  8:41   ` Lee Jones
2014-05-27  8:43     ` Keerthy
2014-05-26  9:56 ` [PATCH 4/5] mfd: palmas: Add tps65917 support Keerthy
2014-05-27  8:38   ` Lee Jones
2014-05-27  8:39     ` Keerthy
2014-05-26  9:56 ` [PATCH 5/5] regulator: tps65917: Add Regulator driver for tps65917 PMIC Keerthy
2014-05-26 15:00   ` Mark Brown
2014-05-27  3:22     ` Keerthy
2014-05-27  8:30       ` Lee Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140527083012.GA5875@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=a0393675@ti.com \
    --cc=broonie@kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox