* it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#define pr_fmt(fmt) "%s: " fmt, __func__

#include "rpm-regulator-private.h"

static struct rpm_vreg_parts ldo_parts = {
	.request_len	= 2,
	.uV		= REQUEST_MEMBER(0, 0x007FFFFF,  0),
	.pd		= REQUEST_MEMBER(0, 0x00800000, 23),
	.pc		= REQUEST_MEMBER(0, 0x0F000000, 24),
	.pf		= REQUEST_MEMBER(0, 0xF0000000, 28),
	.ip		= REQUEST_MEMBER(1, 0x000003FF,  0),
	.ia		= REQUEST_MEMBER(1, 0x000FFC00, 10),
	.fm		= REQUEST_MEMBER(1, 0x00700000, 20),
};

static struct rpm_vreg_parts smps_parts = {
	.request_len	= 2,
	.uV		= REQUEST_MEMBER(0, 0x007FFFFF,  0),
	.pd		= REQUEST_MEMBER(0, 0x00800000, 23),
	.pc		= REQUEST_MEMBER(0, 0x0F000000, 24),
	.pf		= REQUEST_MEMBER(0, 0xF0000000, 28),
	.ip		= REQUEST_MEMBER(1, 0x000003FF,  0),
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#define pr_fmt(fmt) "%s: " fmt, __func__

#include "rpm-regulator-private.h"

/* RPM regulator request formats */
static struct rpm_vreg_parts ldo_parts = {
	.request_len	= 2,
	.mV		= REQUEST_MEMBER(0, 0x00000FFF,  0),
	.ip		= REQUEST_MEMBER(0, 0x00FFF000, 12),
	.fm		= REQUEST_MEMBER(0, 0x03000000, 24),
	.pc		= REQUEST_MEMBER(0, 0x3C000000, 26),
	.pf		= REQUEST_MEMBER(0, 0xC0000000, 30),
	.pd		= REQUEST_MEMBER(1, 0x00000001,  0),
	.ia		= REQUEST_MEMBER(1, 0x00001FFE,  1),
};

static struct rpm_vreg_parts smps_parts = {
	.request_len	= 2,
	.mV		= REQUEST_MEMBER(0, 0x00000FFF,  0),
	.ip		= REQUEST_MEMBER(0, 0x00FFF000, 12),
	.fm		= REQUEST_MEMBER(0, 0x03000000, 24),
	.pc		= REQUEST_MEMBER(0, 0x3C000000, 26),
	.pf		= REQUEST_MEMBER(0, 0xC0000000, 30),