All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: "myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
	"cw00.choi@samsung.com" <cw00.choi@samsung.com>,
	"balbi@ti.com" <balbi@ti.com>,
	"gg@slimlogic.co.uk" <gg@slimlogic.co.uk>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"devicetree-discuss@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"rob@landley.net" <rob@landley.net>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"george.cherian@ti.com" <george.cherian@ti.com>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>
Subject: Re: [PATCH 1/3] drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10
Date: Sat, 25 May 2013 22:30:25 +0530	[thread overview]
Message-ID: <51A0EE29.6060708@nvidia.com> (raw)
In-Reply-To: <1369405896-30246-2-git-send-email-kishon@ti.com>

Hi Kishon/Graeme,

On Friday 24 May 2013 08:01 PM, Kishon Vijay Abraham I wrote:
> From: Graeme Gregory <gg@slimlogic.co.uk>
>
> Added an API to set/clear the switch bit on SMPS10 which can be used by
> palmas usb. The switch bit should be set in order for palmas to
> supply VBUS and is needed when OMAP is acting as USB HOST.
>
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>   drivers/regulator/palmas-regulator.c | 26 ++++++++++++++++++++++++++
>   include/linux/mfd/palmas.h           |  2 ++
>   2 files changed, 28 insertions(+)
>
> diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
> index 92ceed0..d57ab55 100644
> --- a/drivers/regulator/palmas-regulator.c
> +++ b/drivers/regulator/palmas-regulator.c
> @@ -465,6 +465,32 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev,
>   	return ret;
>   }
>   
> +/**
> + * palmas_set_switch_smps10() - set or clear the switch bit on SMPS10
> + * @param palmas pointer to the palmas mfd structure
> + * @param sw boolean to indicate switch status
> + *
> + * There is not a way to represent this function within the regulator
> + * framework. This sets/clears the switch of SMPS10 so SMPS10_OUT1 and
> + * SMPS10_OUT2 are shorted together.
> + */
>

As per datasheet, SMPS10 has 2 outputs, OUT1 and OUT2.
OUT2 is always available either through parasitic diode or bypass switch 
or boost mode. It can not be off at all.
OUT2 can be enable/disable through the switch bit.

The smps10 regulator is implemented  enable/disable on which it just 
enable/disable boost mode.
I think this is not proper control, actually we should control OUT1 
switch on regulator enable/disable of the smps10.

And hence in this case, we will not need this API.

Otherwise it will difficult to use this api outside of palmas.

In tegra platform, we have connected the USB-VBUS supply from 
SMPS10-OUT1 and usb driver control the vbus enabled/disable and so it 
can not call this API. This functionality need to be exposed through the 
regulator only.



  parent reply	other threads:[~2013-05-25 17:05 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 14:31 [PATCH 0/3] palmas usb driver Kishon Vijay Abraham I
2013-05-24 14:31 ` Kishon Vijay Abraham I
2013-05-24 14:31 ` [PATCH 1/3] drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10 Kishon Vijay Abraham I
2013-05-24 14:31   ` Kishon Vijay Abraham I
2013-05-24 15:09   ` Sergei Shtylyov
2013-05-24 15:09     ` Sergei Shtylyov
2013-05-25 17:00   ` Laxman Dewangan [this message]
2013-05-25 17:00     ` Laxman Dewangan
2013-05-24 14:31 ` [PATCH v5 2/3] extcon: Palmas Extcon Driver Kishon Vijay Abraham I
2013-05-24 14:31   ` Kishon Vijay Abraham I
2013-05-25 17:10   ` Laxman Dewangan
2013-05-25 17:10     ` Laxman Dewangan
2013-05-27  5:34   ` Chanwoo Choi
2013-05-27  5:54     ` Kishon Vijay Abraham I
2013-05-27  5:54       ` Kishon Vijay Abraham I
2013-05-27  6:08       ` Chanwoo Choi
2013-05-27  6:22         ` Laxman Dewangan
2013-05-27  6:22           ` Laxman Dewangan
2013-05-27  6:31           ` Kishon Vijay Abraham I
2013-05-27  6:31             ` Kishon Vijay Abraham I
2013-05-27  6:36             ` Laxman Dewangan
2013-05-27  6:36               ` Laxman Dewangan
2013-05-27  6:41               ` Kishon Vijay Abraham I
2013-05-27  6:41                 ` Kishon Vijay Abraham I
2013-05-27  6:56                 ` Laxman Dewangan
2013-05-27  6:56                   ` Laxman Dewangan
2013-05-27  9:24                   ` Kishon Vijay Abraham I
2013-05-27  9:24                     ` Kishon Vijay Abraham I
2013-05-24 14:31 ` [PATCH 3/3] usb: dwc3: use extcon fwrk to receive connect/disconnect notification Kishon Vijay Abraham I
2013-05-24 14:31   ` Kishon Vijay Abraham I
2013-05-27  5:38   ` Chanwoo Choi
2013-05-30 23:45   ` Chanwoo Choi
2013-05-27 13:33 ` [PATCH v6] extcon: Palmas Extcon Driver Kishon Vijay Abraham I
2013-05-27 13:33   ` Kishon Vijay Abraham I
2013-05-28  2:51   ` Chanwoo Choi
2013-05-27 13:35 ` [PATCH v2] usb: dwc3: use extcon fwrk to receive connect/disconnect notification Kishon Vijay Abraham I
2013-05-27 13:35   ` Kishon Vijay Abraham I
2013-05-28  2:24   ` Chanwoo Choi
2013-05-28  2:24     ` Chanwoo Choi
2013-05-28  5:27     ` Kishon Vijay Abraham I
2013-05-28  5:27       ` Kishon Vijay Abraham I
2013-05-28 17:35 ` [PATCH 0/3] palmas usb driver Felipe Balbi
2013-05-28 17:35   ` Felipe Balbi
2013-05-29  6:06   ` Kishon Vijay Abraham I
2013-05-29  6:06     ` Kishon Vijay Abraham I
2013-05-29 17:38     ` Felipe Balbi
2013-05-29 17:38       ` Felipe Balbi
     [not found]       ` <20130529173851.GC21290-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-05-30  2:17         ` Chanwoo Choi
2013-05-30  2:44         ` Chanwoo Choi
2013-05-30  2:46         ` Chanwoo Choi

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=51A0EE29.6060708@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=george.cherian@ti.com \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.