Lines Matching refs:value

117 		 "on (default: no change from current value)");
123 "on the model (default: no change from current value)");
640 int value; /* current setting */
726 u64 *value)
732 if (value) {
736 in.integer.value = *value;
741 (unsigned int)(*value >> 32),
742 (unsigned int)*value & 0xffffffff);
761 static int sony_nc_buffer_call(acpi_handle handle, char *name, u64 *value,
766 union acpi_object *object = __call_snc_method(handle, name, value);
779 len = MIN(buflen, sizeof(object->integer.value));
781 memcpy(buffer, &object->integer.value, len);
792 static int sony_nc_int_call(acpi_handle handle, char *name, int *value, int
797 if (value) {
798 u64 v = *value;
919 static int brightness_default_validate(const int direction, const int value)
923 return value - 1;
925 if (value >= 0 && value < SONY_MAX_BRIGHTNESS)
926 return value + 1;
934 * received value.
936 static int boolean_validate(const int direction, const int value)
939 if (value != 0 && value != 1)
942 return value;
951 int value, ret = 0;
959 &value);
964 value = item->validate(SNC_VALIDATE_OUT, value);
966 return sysfs_emit(buffer, "%d\n", value);
973 int value;
984 if (kstrtoint(buffer, 10, &value))
988 value = item->validate(SNC_VALIDATE_IN, value);
990 if (value < 0)
991 return value;
994 &value, NULL);
998 item->value = value;
1024 int value;
1026 if (sony_nc_int_call(sony_nc_acpi_handle, "GBRT", NULL, &value))
1029 return value - 1;
1045 int value, result;
1049 value = bd->props.brightness + sdev->offset;
1050 if (sony_call_snc_handle(sdev->handle, sdev->cmd_base | (value << 0x10),
1054 return value;
1556 &item->value, NULL);
1768 static ssize_t __sony_nc_kbd_backlight_mode_set(u8 value)
1772 if (value > 2)
1776 (value << 0x10) | (kbdbl_ctl->base), &result))
1780 if (value != 1)
1782 (value << 0x0f) | (kbdbl_ctl->base + 0x100),
1785 kbdbl_ctl->mode = value;
1795 unsigned long value;
1800 if (kstrtoul(buffer, 10, &value))
1803 ret = __sony_nc_kbd_backlight_mode_set(value);
1816 static int __sony_nc_kbd_backlight_timeout_set(u8 value)
1820 if (value > 3)
1823 if (sony_call_snc_handle(kbdbl_ctl->handle, (value << 0x10) |
1827 kbdbl_ctl->timeout = value;
1837 unsigned long value;
1842 if (kstrtoul(buffer, 10, &value))
1845 ret = __sony_nc_kbd_backlight_timeout_set(value);
1980 unsigned long value;
1985 if (kstrtoul(buffer, 10, &value))
2002 if (value > 0) {
2003 if (value <= 50)
2006 else if (value <= 80)
2009 else if (value <= 100)
2315 unsigned long value;
2320 if (kstrtoul(buffer, 10, &value) || value > 1)
2323 /* the value we have to write to SNC is a bitmask:
2337 if (value)
2338 value = lid_ctl->status | (1 << pos);
2340 value = lid_ctl->status & ~(1 << pos);
2342 if (sony_call_snc_handle(lid_ctl->handle, value << 0x10 | 0x0100,
2346 lid_ctl->status = value;
2544 unsigned long value;
2549 if (kstrtoul(buffer, 10, &value) || value > 1)
2552 if (sony_call_snc_handle(0x0131, value << 0x10 | 0x0200, &result))
2618 unsigned long value;
2623 if (kstrtoul(buffer, 10, &value) || value > 1)
2626 if (sony_call_snc_handle(0x0121, value << 8, &result))
2684 unsigned long value;
2689 if (kstrtoul(buffer, 10, &value) || value > 1)
2692 if (sony_call_snc_handle(0x0149, value << 0x10 | 0x0200, &result))
2791 unsigned long value;
2796 if (kstrtoul(buffer, 10, &value) || value > 1)
2799 if (sony_call_snc_handle(0x0155, value << 0x10 | 0x0100, &result))
2912 unsigned long value;
2917 if (kstrtoul(buffer, 10, &value) || value > 1)
2920 if (sony_call_snc_handle(0x0168, value << 0x10, &result))
2970 unsigned long value;
2975 if (kstrtoul(buffer, 10, &value) || value > 1)
2982 (!value << 0x10) | 0x100, &result))
3826 int sony_pic_camera_command(int command, u8 value)
3835 if (value)
3841 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_BRIGHTNESS, value),
3845 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_CONTRAST, value),
3849 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_HUE, value),
3853 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_COLOR, value),
3857 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_SHARPNESS, value),
3861 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_PICTURE, value),
3865 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_AGC, value),
3892 unsigned long value;
3896 if (kstrtoul(buffer, 10, &value))
3900 __sony_pic_set_wwanpower(value);
3931 unsigned long value;
3935 if (kstrtoul(buffer, 10, &value))
3939 __sony_pic_set_bluetoothpower(value);
3958 static int sony_pic_set_fanspeed(unsigned long value)
3960 return ec_write(SONY_PIC_FAN0_STATUS, value);
3963 static int sony_pic_get_fanspeed(u8 *value)
3965 return ec_read(SONY_PIC_FAN0_STATUS, value);
3972 unsigned long value;
3976 if (kstrtoul(buffer, 10, &value))
3979 if (sony_pic_set_fanspeed(value))
3988 u8 value = 0;
3989 if (sony_pic_get_fanspeed(&value))
3992 return sysfs_emit(buffer, "%d\n", value);
4109 static int ec_read16(u8 addr, u16 *value)
4116 *value = val_lb | (val_hb << 8);
4127 int value;
4137 &value)) {
4141 val8 = ((value & 0xff) - 1) << 5;
4154 value = (val8 >> 5) + 1;
4155 if (sony_nc_int_call(sony_nc_acpi_handle, "SBRT", &value,