lkml.org 
[lkml]   [2013]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] regulator: palmas: enable all modes for SMPS10
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...

> + 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?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-05-30 14:01    [W:0.062 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site