Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 1 | #include <linux/kernel.h> |
| 2 | #include <linux/init.h> |
| 3 | #include <linux/debugfs.h> |
| 4 | |
| 5 | #include <plat/common.h> |
| 6 | |
| 7 | #include "voltage.h" |
| 8 | #include "vp.h" |
| 9 | #include "prm-regbits-34xx.h" |
| 10 | #include "prm-regbits-44xx.h" |
| 11 | #include "prm44xx.h" |
| 12 | |
| 13 | static void __init vp_debugfs_init(struct voltagedomain *voltdm); |
| 14 | |
| 15 | static void vp_latch_vsel(struct voltagedomain *voltdm) |
| 16 | { |
| 17 | struct omap_vp_instance_data *vp = voltdm->vdd->vp_data; |
| 18 | u32 vpconfig; |
| 19 | unsigned long uvdc; |
| 20 | char vsel; |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 21 | |
| 22 | uvdc = omap_voltage_get_nom_volt(voltdm); |
| 23 | if (!uvdc) { |
| 24 | pr_warning("%s: unable to find current voltage for vdd_%s\n", |
| 25 | __func__, voltdm->name); |
| 26 | return; |
| 27 | } |
| 28 | |
Kevin Hilman | ce8ebe0 | 2011-03-30 11:01:10 -0700 | [diff] [blame^] | 29 | if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 30 | pr_warning("%s: PMIC function to convert voltage in uV to" |
| 31 | " vsel not registered\n", __func__); |
| 32 | return; |
| 33 | } |
| 34 | |
Kevin Hilman | ce8ebe0 | 2011-03-30 11:01:10 -0700 | [diff] [blame^] | 35 | vsel = voltdm->pmic->uv_to_vsel(uvdc); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 36 | |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 37 | vpconfig = voltdm->read(vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 38 | vpconfig &= ~(vp->vp_common->vpconfig_initvoltage_mask | |
| 39 | vp->vp_common->vpconfig_initvdd); |
| 40 | vpconfig |= vsel << vp->vp_common->vpconfig_initvoltage_shift; |
| 41 | |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 42 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 43 | |
| 44 | /* Trigger initVDD value copy to voltage processor */ |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 45 | voltdm->write((vpconfig | vp->vp_common->vpconfig_initvdd), |
| 46 | vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 47 | |
| 48 | /* Clear initVDD copy trigger bit */ |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 49 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | /* Generic voltage init functions */ |
| 53 | void __init omap_vp_init(struct voltagedomain *voltdm) |
| 54 | { |
| 55 | struct omap_vp_instance_data *vp = voltdm->vdd->vp_data; |
| 56 | struct omap_vdd_info *vdd = voltdm->vdd; |
| 57 | u32 vp_val; |
| 58 | |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 59 | if (!voltdm->read || !voltdm->write) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 60 | pr_err("%s: No read/write API for accessing vdd_%s regs\n", |
| 61 | __func__, voltdm->name); |
| 62 | return; |
| 63 | } |
| 64 | |
| 65 | vp_val = vdd->vp_rt_data.vpconfig_erroroffset | |
| 66 | (vdd->vp_rt_data.vpconfig_errorgain << |
| 67 | vp->vp_common->vpconfig_errorgain_shift) | |
| 68 | vp->vp_common->vpconfig_timeouten; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 69 | voltdm->write(vp_val, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 70 | |
| 71 | vp_val = ((vdd->vp_rt_data.vstepmin_smpswaittimemin << |
| 72 | vp->vp_common->vstepmin_smpswaittimemin_shift) | |
| 73 | (vdd->vp_rt_data.vstepmin_stepmin << |
| 74 | vp->vp_common->vstepmin_stepmin_shift)); |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 75 | voltdm->write(vp_val, vp->vstepmin); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 76 | |
| 77 | vp_val = ((vdd->vp_rt_data.vstepmax_smpswaittimemax << |
| 78 | vp->vp_common->vstepmax_smpswaittimemax_shift) | |
| 79 | (vdd->vp_rt_data.vstepmax_stepmax << |
| 80 | vp->vp_common->vstepmax_stepmax_shift)); |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 81 | voltdm->write(vp_val, vp->vstepmax); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 82 | |
| 83 | vp_val = ((vdd->vp_rt_data.vlimitto_vddmax << |
| 84 | vp->vp_common->vlimitto_vddmax_shift) | |
| 85 | (vdd->vp_rt_data.vlimitto_vddmin << |
| 86 | vp->vp_common->vlimitto_vddmin_shift) | |
| 87 | (vdd->vp_rt_data.vlimitto_timeout << |
| 88 | vp->vp_common->vlimitto_timeout_shift)); |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 89 | voltdm->write(vp_val, vp->vlimitto); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 90 | |
| 91 | vp_debugfs_init(voltdm); |
| 92 | } |
| 93 | |
| 94 | /* VP force update method of voltage scaling */ |
| 95 | int omap_vp_forceupdate_scale(struct voltagedomain *voltdm, |
| 96 | unsigned long target_volt) |
| 97 | { |
| 98 | struct omap_vp_instance_data *vp = voltdm->vdd->vp_data; |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 99 | u32 vpconfig; |
| 100 | u8 target_vsel, current_vsel; |
| 101 | int ret, timeout = 0; |
| 102 | |
| 103 | ret = omap_vc_pre_scale(voltdm, target_volt, &target_vsel, ¤t_vsel); |
| 104 | if (ret) |
| 105 | return ret; |
| 106 | |
| 107 | /* |
| 108 | * Clear all pending TransactionDone interrupt/status. Typical latency |
| 109 | * is <3us |
| 110 | */ |
| 111 | while (timeout++ < VP_TRANXDONE_TIMEOUT) { |
Kevin Hilman | 842ec22 | 2011-03-28 11:57:18 -0700 | [diff] [blame] | 112 | vp->vp_common->ops->clear_txdone(vp->id); |
| 113 | if (!vp->vp_common->ops->check_txdone(vp->id)) |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 114 | break; |
| 115 | udelay(1); |
| 116 | } |
| 117 | if (timeout >= VP_TRANXDONE_TIMEOUT) { |
| 118 | pr_warning("%s: vdd_%s TRANXDONE timeout exceeded." |
| 119 | "Voltage change aborted", __func__, voltdm->name); |
| 120 | return -ETIMEDOUT; |
| 121 | } |
| 122 | |
| 123 | /* Configure for VP-Force Update */ |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 124 | vpconfig = voltdm->read(vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 125 | vpconfig &= ~(vp->vp_common->vpconfig_initvdd | |
| 126 | vp->vp_common->vpconfig_forceupdate | |
| 127 | vp->vp_common->vpconfig_initvoltage_mask); |
| 128 | vpconfig |= ((target_vsel << |
| 129 | vp->vp_common->vpconfig_initvoltage_shift)); |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 130 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 131 | |
| 132 | /* Trigger initVDD value copy to voltage processor */ |
| 133 | vpconfig |= vp->vp_common->vpconfig_initvdd; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 134 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 135 | |
| 136 | /* Force update of voltage */ |
| 137 | vpconfig |= vp->vp_common->vpconfig_forceupdate; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 138 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 139 | |
| 140 | /* |
| 141 | * Wait for TransactionDone. Typical latency is <200us. |
| 142 | * Depends on SMPSWAITTIMEMIN/MAX and voltage change |
| 143 | */ |
| 144 | timeout = 0; |
Kevin Hilman | 842ec22 | 2011-03-28 11:57:18 -0700 | [diff] [blame] | 145 | omap_test_timeout(vp->vp_common->ops->check_txdone(vp->id), |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 146 | VP_TRANXDONE_TIMEOUT, timeout); |
| 147 | if (timeout >= VP_TRANXDONE_TIMEOUT) |
| 148 | pr_err("%s: vdd_%s TRANXDONE timeout exceeded." |
| 149 | "TRANXDONE never got set after the voltage update\n", |
| 150 | __func__, voltdm->name); |
| 151 | |
| 152 | omap_vc_post_scale(voltdm, target_volt, target_vsel, current_vsel); |
| 153 | |
| 154 | /* |
| 155 | * Disable TransactionDone interrupt , clear all status, clear |
| 156 | * control registers |
| 157 | */ |
| 158 | timeout = 0; |
| 159 | while (timeout++ < VP_TRANXDONE_TIMEOUT) { |
Kevin Hilman | 842ec22 | 2011-03-28 11:57:18 -0700 | [diff] [blame] | 160 | vp->vp_common->ops->clear_txdone(vp->id); |
| 161 | if (!vp->vp_common->ops->check_txdone(vp->id)) |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 162 | break; |
| 163 | udelay(1); |
| 164 | } |
| 165 | |
| 166 | if (timeout >= VP_TRANXDONE_TIMEOUT) |
| 167 | pr_warning("%s: vdd_%s TRANXDONE timeout exceeded while trying" |
| 168 | "to clear the TRANXDONE status\n", |
| 169 | __func__, voltdm->name); |
| 170 | |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 171 | vpconfig = voltdm->read(vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 172 | /* Clear initVDD copy trigger bit */ |
| 173 | vpconfig &= ~vp->vp_common->vpconfig_initvdd; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 174 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 175 | /* Clear force bit */ |
| 176 | vpconfig &= ~vp->vp_common->vpconfig_forceupdate; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 177 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 178 | |
| 179 | return 0; |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * omap_vp_get_curr_volt() - API to get the current vp voltage. |
| 184 | * @voltdm: pointer to the VDD. |
| 185 | * |
| 186 | * This API returns the current voltage for the specified voltage processor |
| 187 | */ |
| 188 | unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm) |
| 189 | { |
| 190 | struct omap_vp_instance_data *vp = voltdm->vdd->vp_data; |
| 191 | struct omap_vdd_info *vdd; |
| 192 | u8 curr_vsel; |
| 193 | |
| 194 | if (!voltdm || IS_ERR(voltdm)) { |
| 195 | pr_warning("%s: VDD specified does not exist!\n", __func__); |
| 196 | return 0; |
| 197 | } |
| 198 | |
| 199 | vdd = voltdm->vdd; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 200 | if (!voltdm->read) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 201 | pr_err("%s: No read API for reading vdd_%s regs\n", |
| 202 | __func__, voltdm->name); |
| 203 | return 0; |
| 204 | } |
| 205 | |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 206 | curr_vsel = voltdm->read(vp->voltage); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 207 | |
Kevin Hilman | ce8ebe0 | 2011-03-30 11:01:10 -0700 | [diff] [blame^] | 208 | if (!voltdm->pmic || !voltdm->pmic->vsel_to_uv) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 209 | pr_warning("%s: PMIC function to convert vsel to voltage" |
| 210 | "in uV not registerd\n", __func__); |
| 211 | return 0; |
| 212 | } |
| 213 | |
Kevin Hilman | ce8ebe0 | 2011-03-30 11:01:10 -0700 | [diff] [blame^] | 214 | return voltdm->pmic->vsel_to_uv(curr_vsel); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | /** |
| 218 | * omap_vp_enable() - API to enable a particular VP |
| 219 | * @voltdm: pointer to the VDD whose VP is to be enabled. |
| 220 | * |
| 221 | * This API enables a particular voltage processor. Needed by the smartreflex |
| 222 | * class drivers. |
| 223 | */ |
| 224 | void omap_vp_enable(struct voltagedomain *voltdm) |
| 225 | { |
| 226 | struct omap_vp_instance_data *vp; |
| 227 | struct omap_vdd_info *vdd; |
| 228 | u32 vpconfig; |
| 229 | |
| 230 | if (!voltdm || IS_ERR(voltdm)) { |
| 231 | pr_warning("%s: VDD specified does not exist!\n", __func__); |
| 232 | return; |
| 233 | } |
| 234 | |
| 235 | vdd = voltdm->vdd; |
| 236 | vp = voltdm->vdd->vp_data; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 237 | if (!voltdm->read || !voltdm->write) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 238 | pr_err("%s: No read/write API for accessing vdd_%s regs\n", |
| 239 | __func__, voltdm->name); |
| 240 | return; |
| 241 | } |
| 242 | |
| 243 | /* If VP is already enabled, do nothing. Return */ |
| 244 | if (vdd->vp_enabled) |
| 245 | return; |
| 246 | |
| 247 | vp_latch_vsel(voltdm); |
| 248 | |
| 249 | /* Enable VP */ |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 250 | vpconfig = voltdm->read(vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 251 | vpconfig |= vp->vp_common->vpconfig_vpenable; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 252 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 253 | vdd->vp_enabled = true; |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * omap_vp_disable() - API to disable a particular VP |
| 258 | * @voltdm: pointer to the VDD whose VP is to be disabled. |
| 259 | * |
| 260 | * This API disables a particular voltage processor. Needed by the smartreflex |
| 261 | * class drivers. |
| 262 | */ |
| 263 | void omap_vp_disable(struct voltagedomain *voltdm) |
| 264 | { |
| 265 | struct omap_vp_instance_data *vp; |
| 266 | struct omap_vdd_info *vdd; |
| 267 | u32 vpconfig; |
| 268 | int timeout; |
| 269 | |
| 270 | if (!voltdm || IS_ERR(voltdm)) { |
| 271 | pr_warning("%s: VDD specified does not exist!\n", __func__); |
| 272 | return; |
| 273 | } |
| 274 | |
| 275 | vdd = voltdm->vdd; |
| 276 | vp = voltdm->vdd->vp_data; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 277 | if (!voltdm->read || !voltdm->write) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 278 | pr_err("%s: No read/write API for accessing vdd_%s regs\n", |
| 279 | __func__, voltdm->name); |
| 280 | return; |
| 281 | } |
| 282 | |
| 283 | /* If VP is already disabled, do nothing. Return */ |
| 284 | if (!vdd->vp_enabled) { |
| 285 | pr_warning("%s: Trying to disable VP for vdd_%s when" |
| 286 | "it is already disabled\n", __func__, voltdm->name); |
| 287 | return; |
| 288 | } |
| 289 | |
| 290 | /* Disable VP */ |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 291 | vpconfig = voltdm->read(vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 292 | vpconfig &= ~vp->vp_common->vpconfig_vpenable; |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 293 | voltdm->write(vpconfig, vp->vpconfig); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 294 | |
| 295 | /* |
| 296 | * Wait for VP idle Typical latency is <2us. Maximum latency is ~100us |
| 297 | */ |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 298 | omap_test_timeout((voltdm->read(vp->vstatus)), |
| 299 | VP_IDLE_TIMEOUT, timeout); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 300 | |
| 301 | if (timeout >= VP_IDLE_TIMEOUT) |
| 302 | pr_warning("%s: vdd_%s idle timedout\n", |
| 303 | __func__, voltdm->name); |
| 304 | |
| 305 | vdd->vp_enabled = false; |
| 306 | |
| 307 | return; |
| 308 | } |
| 309 | |
| 310 | /* Voltage debugfs support */ |
| 311 | static int vp_volt_debug_get(void *data, u64 *val) |
| 312 | { |
| 313 | struct voltagedomain *voltdm = (struct voltagedomain *)data; |
| 314 | struct omap_vp_instance_data *vp = voltdm->vdd->vp_data; |
| 315 | struct omap_vdd_info *vdd = voltdm->vdd; |
| 316 | u8 vsel; |
| 317 | |
| 318 | if (!vdd) { |
| 319 | pr_warning("Wrong paramater passed\n"); |
| 320 | return -EINVAL; |
| 321 | } |
| 322 | |
Kevin Hilman | 4bcc475 | 2011-03-28 10:40:15 -0700 | [diff] [blame] | 323 | vsel = voltdm->read(vp->voltage); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 324 | |
Kevin Hilman | ce8ebe0 | 2011-03-30 11:01:10 -0700 | [diff] [blame^] | 325 | if (!voltdm->pmic->vsel_to_uv) { |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 326 | pr_warning("PMIC function to convert vsel to voltage" |
| 327 | "in uV not registerd\n"); |
| 328 | return -EINVAL; |
| 329 | } |
| 330 | |
Kevin Hilman | ce8ebe0 | 2011-03-30 11:01:10 -0700 | [diff] [blame^] | 331 | *val = voltdm->pmic->vsel_to_uv(vsel); |
Kevin Hilman | 01f48d3 | 2011-03-21 14:29:13 -0700 | [diff] [blame] | 332 | return 0; |
| 333 | } |
| 334 | |
| 335 | DEFINE_SIMPLE_ATTRIBUTE(vp_volt_debug_fops, vp_volt_debug_get, NULL, "%llu\n"); |
| 336 | |
| 337 | static void __init vp_debugfs_init(struct voltagedomain *voltdm) |
| 338 | { |
| 339 | struct omap_vdd_info *vdd = voltdm->vdd; |
| 340 | struct dentry *debug_dir; |
| 341 | |
| 342 | debug_dir = debugfs_create_dir("vp", vdd->debug_dir); |
| 343 | if (IS_ERR(debug_dir)) |
| 344 | pr_err("%s: Unable to create VP debugfs dir dir\n", __func__); |
| 345 | |
| 346 | (void) debugfs_create_x16("errorgain", S_IRUGO, debug_dir, |
| 347 | &(vdd->vp_rt_data.vpconfig_errorgain)); |
| 348 | (void) debugfs_create_x16("smpswaittimemin", S_IRUGO, |
| 349 | debug_dir, |
| 350 | &(vdd->vp_rt_data.vstepmin_smpswaittimemin)); |
| 351 | (void) debugfs_create_x8("stepmin", S_IRUGO, debug_dir, |
| 352 | &(vdd->vp_rt_data.vstepmin_stepmin)); |
| 353 | (void) debugfs_create_x16("smpswaittimemax", S_IRUGO, |
| 354 | debug_dir, |
| 355 | &(vdd->vp_rt_data.vstepmax_smpswaittimemax)); |
| 356 | (void) debugfs_create_x8("stepmax", S_IRUGO, debug_dir, |
| 357 | &(vdd->vp_rt_data.vstepmax_stepmax)); |
| 358 | (void) debugfs_create_x8("vddmax", S_IRUGO, debug_dir, |
| 359 | &(vdd->vp_rt_data.vlimitto_vddmax)); |
| 360 | (void) debugfs_create_x8("vddmin", S_IRUGO, debug_dir, |
| 361 | &(vdd->vp_rt_data.vlimitto_vddmin)); |
| 362 | (void) debugfs_create_x16("timeout", S_IRUGO, debug_dir, |
| 363 | &(vdd->vp_rt_data.vlimitto_timeout)); |
| 364 | (void) debugfs_create_file("curr_volt", S_IRUGO, debug_dir, |
| 365 | (void *) voltdm, &vp_volt_debug_fops); |
| 366 | } |