public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <ldewangan@nvidia.com>,
	<sameo@linux.intel.com>, <linux-kernel@vger.kernel.org>,
	<gg@slimlogic.co.uk>, <ian@slimlogic.co.uk>, <balbi@ti.com>
Subject: Re: [RFC PATCH] regulator: palmas: enable all modes for SMPS10
Date: Thu, 30 May 2013 18:24:37 +0530	[thread overview]
Message-ID: <51A74C0D.6030205@ti.com> (raw)
In-Reply-To: <20130530113247.GI5180@sirena.org.uk>

Hi,

On Thursday 30 May 2013 05:02 PM, Mark Brown wrote:
> On Thu, May 30, 2013 at 04:26:33PM +0530, Kishon Vijay Abraham I wrote:
>
>> Only compile tested. Just sent a patch to get some comments
>> /ideas on how to handle such one off regulators.
>> to handle
>
> What's unclear or confusing?  This all looks really basic...

For instance mapping of regulator modes to smps10 modes is unclear.
>
>> +	palmas_smps_read(pmic->palmas, palmas_regs_info[id].ctrl_addr, &reg);
>> +	reg &= ~PALMAS_SMPS10_CTRL_MODE_ACTIVE_MODE_MASK;
>> +
>> +	if (mode == REGULATOR_MODE_NORMAL)
>> +		reg |= SMPS10_BOOST_EN;
>> +
>> +	if (mode == REGULATOR_MODE_FAST)
>> +		reg |= SMPS10_SWITCH_EN;
>> +
>> +	if (mode == REGULATOR_MODE_IDLE)
>> +		reg |= SMPS10_BYPASS_EN;
>> +
>> +	palmas_smps_write(pmic->palmas, palmas_regs_info[id].ctrl_addr, reg);
>> +	return 0;
>
> This looks like a switch statement and isn't there an update bits
> operation?

There can be multiple modes set at the same time. Having switch 
statement means we would need to call the same API multiple times to set 
the mode. There isn't a palmas wrapper to regmap_update_bits. I can send 
a patch to add a palmas wrapper.

Thanks
Kishon

  reply	other threads:[~2013-05-30 12:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 10:56 [RFC PATCH] regulator: palmas: enable all modes for SMPS10 Kishon Vijay Abraham I
2013-05-30 11:32 ` Mark Brown
2013-05-30 12:54   ` Kishon Vijay Abraham I [this message]
2013-06-01 18:42     ` Mark Brown
2013-05-30 13:00   ` Laxman Dewangan
2013-06-01 18:45     ` Mark Brown
2013-06-01 19:03       ` Laxman Dewangan
2013-06-01 21:05         ` Mark Brown
2013-06-04  9:08           ` Kishon Vijay Abraham I
2013-06-04  9:38             ` Mark Brown
2013-06-04  9:43               ` Kishon Vijay Abraham I
2013-06-04 10:05                 ` Mark Brown
2013-06-10  9:50                   ` Kishon Vijay Abraham I
2013-06-10 10:03                     ` Mark Brown
2013-06-10 11:03                       ` Kishon Vijay Abraham I
2013-06-10 12:49                         ` Mark Brown
2013-06-12  8:42                           ` Laxman Dewangan
2013-06-12 14:14                             ` Mark Brown
2013-06-12 14:31                               ` gg
2013-06-12 14:51                                 ` Mark Brown
2013-06-12 15:23                                   ` gg
2013-06-14 12:34                                     ` Laxman Dewangan
2013-06-18  8:27                                       ` Kishon Vijay Abraham I

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=51A74C0D.6030205@ti.com \
    --to=kishon@ti.com \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=gg@slimlogic.co.uk \
    --cc=ian@slimlogic.co.uk \
    --cc=ldewangan@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@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