Source
{ .compatible = "qcom,rpm-pm8058-regulators", .data = &rpm_pm8058_regulators },
/*
* Copyright (c) 2014, Sony Mobile Communications AB.
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* 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.
*/
struct request_member {
int word;
unsigned int mask;
int shift;
};
struct rpm_reg_parts {
struct request_member mV; /* used if voltage is in mV */
struct request_member uV; /* used if voltage is in uV */
struct request_member ip; /* peak current in mA */
struct request_member pd; /* pull down enable */
struct request_member ia; /* average current in mA */
struct request_member fm; /* force mode */
struct request_member pm; /* power mode */
struct request_member pc; /* pin control */
struct request_member pf; /* pin function */
struct request_member enable_state; /* NCP and switch */
struct request_member comp_mode; /* NCP */
struct request_member freq; /* frequency: NCP and SMPS */
struct request_member freq_clk_src; /* clock source: SMPS */
struct request_member hpm; /* switch: control OCP and SS */
int request_len;
};
struct qcom_rpm_reg {
struct qcom_rpm *rpm;
struct mutex lock;
struct device *dev;
struct regulator_desc desc;
const struct rpm_reg_parts *parts;
int resource;