Lines Matching defs:buf
995 static int parse_strtoul(const char *buf,
1000 *value = simple_strtoul(skip_spaces(buf), &endp, 0);
1245 char *buf)
1260 return sysfs_emit(buf, "%d\n",
1266 const char *buf, size_t count)
1273 if (parse_strtoul(buf, 1, &t))
1314 static int tpacpi_rfk_procfs_write(const enum tpacpi_rfk_id id, char *buf)
1323 while ((cmd = strsep(&buf, ","))) {
1348 static ssize_t interface_version_show(struct device_driver *drv, char *buf)
1350 return sysfs_emit(buf, "0x%08x\n", TPACPI_SYSFS_VERSION);
1355 static ssize_t debug_level_show(struct device_driver *drv, char *buf)
1357 return sysfs_emit(buf, "0x%04x\n", dbg_level);
1360 static ssize_t debug_level_store(struct device_driver *drv, const char *buf,
1365 if (parse_strtoul(buf, 0xffff, &t))
1375 static ssize_t version_show(struct device_driver *drv, char *buf)
1377 return sysfs_emit(buf, "%s v%s\n",
1387 static ssize_t wlsw_emulstate_show(struct device_driver *drv, char *buf)
1389 return sysfs_emit(buf, "%d\n", !!tpacpi_wlsw_emulstate);
1392 static ssize_t wlsw_emulstate_store(struct device_driver *drv, const char *buf,
1397 if (parse_strtoul(buf, 1, &t))
1410 static ssize_t bluetooth_emulstate_show(struct device_driver *drv, char *buf)
1412 return sysfs_emit(buf, "%d\n", !!tpacpi_bluetooth_emulstate);
1416 const char *buf, size_t count)
1420 if (parse_strtoul(buf, 1, &t))
1430 static ssize_t wwan_emulstate_show(struct device_driver *drv, char *buf)
1432 return sysfs_emit(buf, "%d\n", !!tpacpi_wwan_emulstate);
1435 static ssize_t wwan_emulstate_store(struct device_driver *drv, const char *buf,
1440 if (parse_strtoul(buf, 1, &t))
1450 static ssize_t uwb_emulstate_show(struct device_driver *drv, char *buf)
1452 return sysfs_emit(buf, "%d\n", !!tpacpi_uwb_emulstate);
1455 static ssize_t uwb_emulstate_store(struct device_driver *drv, const char *buf,
1460 if (parse_strtoul(buf, 1, &t))
2605 char *buf)
2616 return sysfs_emit(buf, "%d\n", status);
2621 const char *buf, size_t count)
2628 if (parse_strtoul(buf, 1, &t))
2642 char *buf)
2644 return sysfs_emit(buf, "0x%08x\n", hotkey_user_mask);
2649 const char *buf, size_t count)
2654 if (parse_strtoul(buf, 0xffffffffUL, &t))
2678 char *buf)
2680 return sprintf(buf, "0\n");
2688 char *buf)
2692 return sysfs_emit(buf, "0x%08x\n", hotkey_orig_mask);
2700 char *buf)
2702 return sysfs_emit(buf, "0x%08x\n",
2711 char *buf)
2713 return sysfs_emit(buf, "0x%08x\n",
2722 char *buf)
2724 return sysfs_emit(buf, "0x%08x\n",
2736 char *buf)
2738 return sysfs_emit(buf, "0x%08x\n", hotkey_source_mask);
2743 const char *buf, size_t count)
2749 if (parse_strtoul(buf, 0xffffffffUL, &t) ||
2787 char *buf)
2789 return sysfs_emit(buf, "%d\n", hotkey_poll_freq);
2794 const char *buf, size_t count)
2798 if (parse_strtoul(buf, 25, &t))
2821 char *buf)
2831 return sysfs_emit(buf, "%d\n",
2847 char *buf)
2854 return sysfs_emit(buf, "%d\n", !!s);
2869 char *buf)
2871 return sysfs_emit(buf, "%d\n", hotkey_wakeup_reason);
2885 char *buf)
2887 return sysfs_emit(buf, "%d\n", hotkey_autosleep_ack);
2914 char *buf)
2922 return sysfs_emit(buf, "%d\n", current_mode);
2927 const char *buf, size_t count)
2932 if (parse_strtoul(buf, LAYFLAT_MODE, &t))
4180 static int hotkey_write(char *buf)
4195 while ((cmd = strsep(&buf, ","))) {
4318 char *buf)
4321 attr, buf);
4326 const char *buf, size_t count)
4329 attr, buf, count);
4500 static int bluetooth_write(char *buf)
4502 return tpacpi_rfk_procfs_write(TPACPI_RFK_BLUETOOTH_SW_ID, buf);
4573 char *buf)
4576 attr, buf);
4581 const char *buf, size_t count)
4584 attr, buf, count);
4679 static int wan_write(char *buf)
4681 return tpacpi_rfk_procfs_write(TPACPI_RFK_WWAN_SW_ID, buf);
5095 static int video_write(char *buf)
5111 while ((cmd = strsep(&buf, ","))) {
5347 static int kbdlight_write(char *buf)
5355 while ((cmd = strsep(&buf, ","))) {
5523 static int light_write(char *buf)
5531 while ((cmd = strsep(&buf, ","))) {
5557 const char *buf, size_t count)
5562 if (parse_strtoul(buf, 21, &cmos_cmd))
5616 static int cmos_write(char *buf)
5621 while ((cmd = strsep(&buf, ","))) {
5998 static int led_write(char *buf)
6007 while ((cmd = strsep(&buf, ","))) {
6086 static int beep_write(char *buf)
6094 while ((cmd = strsep(&buf, ","))) {
6257 char *buf)
6271 return sysfs_emit(buf, "%d\n", value);
6345 static ssize_t temp1_label_show(struct device *dev, struct device_attribute *attr, char *buf)
6347 return sysfs_emit(buf, "CPU\n");
6351 static ssize_t temp2_label_show(struct device *dev, struct device_attribute *attr, char *buf)
6353 return sysfs_emit(buf, "GPU\n");
6998 static int brightness_write(char *buf)
7008 while ((cmd = strsep(&buf, ","))) {
7731 static int volume_write(char *buf)
7759 while ((cmd = strsep(&buf, ","))) {
8522 char *buf)
8538 return sysfs_emit(buf, "%d\n", mode);
8543 const char *buf, size_t count)
8548 if (parse_strtoul(buf, 2, &t))
8588 char *buf)
8604 return sysfs_emit(buf, "%u\n", (status * 255) / 7);
8609 const char *buf, size_t count)
8615 if (parse_strtoul(buf, 255, &s))
8648 char *buf)
8657 return sysfs_emit(buf, "%u\n", speed);
8665 char *buf)
8674 return sysfs_emit(buf, "%u\n", speed);
8680 static ssize_t fan_watchdog_show(struct device_driver *drv, char *buf)
8682 return sysfs_emit(buf, "%u\n", fan_watchdog_maxinterval);
8685 static ssize_t fan_watchdog_store(struct device_driver *drv, const char *buf,
8690 if (parse_strtoul(buf, 120, &t))
9163 static int fan_write(char *buf)
9168 while (!rc && (cmd = strsep(&buf, ","))) {
9631 const char *buf, size_t count)
9653 rval = kstrtoul(buf, 10, &value);
9699 char *buf)
9721 return sprintf(buf, "%d\n", ret);
9726 char *buf)
9728 return tpacpi_battery_show(THRESHOLD_START, device, buf);
9733 char *buf)
9735 return tpacpi_battery_show(THRESHOLD_STOP, device, buf);
9740 char *buf)
9769 return power_supply_charge_behaviour_show(dev, available, active, buf);
9774 const char *buf, size_t count)
9776 return tpacpi_battery_store(THRESHOLD_START, dev, buf, count);
9781 const char *buf, size_t count)
9783 return tpacpi_battery_store(THRESHOLD_STOP, dev, buf, count);
9788 const char *buf, size_t count)
9796 selected = power_supply_charge_behaviour_parse(available, buf);
10011 static int lcdshadow_write(char *buf)
10019 while ((cmd = strsep(&buf, ","))) {
10143 char *buf)
10146 return sysfs_emit(buf, "%d\n", lap_state);
10147 return sysfs_emit(buf, "\n");
10153 char *buf)
10156 return sysfs_emit(buf, "%d\n", palm_state);
10157 return sysfs_emit(buf, "\n");
10675 char *buf)
10685 len += sysfs_emit_at(buf, len, "%s", " ");
10688 len += sysfs_emit_at(buf, len, "[%s]", keyboard_lang_data[i].lang_str);
10690 len += sysfs_emit_at(buf, len, "%s", keyboard_lang_data[i].lang_str);
10693 len += sysfs_emit_at(buf, len, "\n");
10700 const char *buf, size_t count)
10707 if (sysfs_streq(buf, keyboard_lang_data[i].lang_str)) {
10727 "keyboard language is set to %s\n", buf);
10819 char *buf)
10823 return sysfs_emit(buf, "type a\n");
10825 return sysfs_emit(buf, "type b\n");