Lines Matching full:vid
3 * atxp1.c - kernel module for setting CPU VID and general purpose
17 #include <linux/hwmon-vid.h>
42 u8 vid; /* VID output register */ member
43 u8 cpu_vid; /* VID input from CPU */
60 data->reg.vid = i2c_smbus_read_byte_data(client, ATXP1_VID); in atxp1_update_device()
83 size = sprintf(buf, "%d\n", vid_from_reg(data->reg.vid & ATXP1_VIDMASK, in cpu0_vid_show()
95 int vid, cvid; in cpu0_vid_store() local
106 /* Calculate VID */ in cpu0_vid_store()
107 vid = vid_to_reg(vcore, data->vrm); in cpu0_vid_store()
108 if (vid < 0) { in cpu0_vid_store()
109 dev_err(dev, "VID calculation failed.\n"); in cpu0_vid_store()
110 return vid; in cpu0_vid_store()
115 * Otherwise original CPU VID in cpu0_vid_store()
117 if (data->reg.vid & ATXP1_VIDENA) in cpu0_vid_store()
118 cvid = data->reg.vid & ATXP1_VIDMASK; in cpu0_vid_store()
123 if (vid == cvid) in cpu0_vid_store()
126 dev_dbg(dev, "Setting VCore to %d mV (0x%02x)\n", (int)vcore, vid); in cpu0_vid_store()
129 if (cvid > vid) { in cpu0_vid_store()
130 for (; cvid >= vid; cvid--) in cpu0_vid_store()
134 for (; cvid <= vid; cvid++) in cpu0_vid_store()