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;
920 static int brightness_default_validate(const int direction, const int value)
924 return value - 1;
926 if (value >= 0 && value < SONY_MAX_BRIGHTNESS)
927 return value + 1;
935 * received value.
937 static int boolean_validate(const int direction, const int value)
940 if (value != 0 && value != 1)
943 return value;
952 int value, ret = 0;
960 &value);
965 value = item->validate(SNC_VALIDATE_OUT, value);
967 return snprintf(buffer, PAGE_SIZE, "%d\n", value);
974 int value;
985 if (kstrtoint(buffer, 10, &value))
989 value = item->validate(SNC_VALIDATE_IN, value);
991 if (value < 0)
992 return value;
995 &value, NULL);
999 item->value = value;
1025 int value;
1027 if (sony_nc_int_call(sony_nc_acpi_handle, "GBRT", NULL, &value))
1030 return value - 1;
1046 int value, result;
1050 value = bd->props.brightness + sdev->offset;
1051 if (sony_call_snc_handle(sdev->handle, sdev->cmd_base | (value << 0x10),
1055 return value;
1557 &item->value, NULL);
1769 static ssize_t __sony_nc_kbd_backlight_mode_set(u8 value)
1773 if (value > 2)
1777 (value << 0x10) | (kbdbl_ctl->base), &result))
1781 if (value != 1)
1783 (value << 0x0f) | (kbdbl_ctl->base + 0x100),
1786 kbdbl_ctl->mode = value;
1796 unsigned long value;
1801 if (kstrtoul(buffer, 10, &value))
1804 ret = __sony_nc_kbd_backlight_mode_set(value);
1819 static int __sony_nc_kbd_backlight_timeout_set(u8 value)
1823 if (value > 3)
1826 if (sony_call_snc_handle(kbdbl_ctl->handle, (value << 0x10) |
1830 kbdbl_ctl->timeout = value;
1840 unsigned long value;
1845 if (kstrtoul(buffer, 10, &value))
1848 ret = __sony_nc_kbd_backlight_timeout_set(value);
1985 unsigned long value;
1990 if (kstrtoul(buffer, 10, &value))
2007 if (value > 0) {
2008 if (value <= 50)
2011 else if (value <= 80)
2014 else if (value <= 100)
2327 unsigned long value;
2332 if (kstrtoul(buffer, 10, &value) || value > 1)
2335 /* the value we have to write to SNC is a bitmask:
2349 if (value)
2350 value = lid_ctl->status | (1 << pos);
2352 value = lid_ctl->status & ~(1 << pos);
2354 if (sony_call_snc_handle(lid_ctl->handle, value << 0x10 | 0x0100,
2358 lid_ctl->status = value;
2559 unsigned long value;
2564 if (kstrtoul(buffer, 10, &value) || value > 1)
2567 if (sony_call_snc_handle(0x0131, value << 0x10 | 0x0200, &result))
2633 unsigned long value;
2638 if (kstrtoul(buffer, 10, &value) || value > 1)
2641 if (sony_call_snc_handle(0x0121, value << 8, &result))
2699 unsigned long value;
2704 if (kstrtoul(buffer, 10, &value) || value > 1)
2707 if (sony_call_snc_handle(0x0149, value << 0x10 | 0x0200, &result))
2806 unsigned long value;
2811 if (kstrtoul(buffer, 10, &value) || value > 1)
2814 if (sony_call_snc_handle(0x0155, value << 0x10 | 0x0100, &result))
2927 unsigned long value;
2932 if (kstrtoul(buffer, 10, &value) || value > 1)
2935 if (sony_call_snc_handle(0x0168, value << 0x10, &result))
2985 unsigned long value;
2990 if (kstrtoul(buffer, 10, &value) || value > 1)
2997 (!value << 0x10) | 0x100, &result))
3843 int sony_pic_camera_command(int command, u8 value)
3852 if (value)
3858 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_BRIGHTNESS, value),
3862 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_CONTRAST, value),
3866 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_HUE, value),
3870 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_COLOR, value),
3874 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_SHARPNESS, value),
3878 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_PICTURE, value),
3882 wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_AGC, value),
3909 unsigned long value;
3913 if (kstrtoul(buffer, 10, &value))
3917 __sony_pic_set_wwanpower(value);
3948 unsigned long value;
3952 if (kstrtoul(buffer, 10, &value))
3956 __sony_pic_set_bluetoothpower(value);
3975 static int sony_pic_set_fanspeed(unsigned long value)
3977 return ec_write(SONY_PIC_FAN0_STATUS, value);
3980 static int sony_pic_get_fanspeed(u8 *value)
3982 return ec_read(SONY_PIC_FAN0_STATUS, value);
3989 unsigned long value;
3993 if (kstrtoul(buffer, 10, &value))
3996 if (sony_pic_set_fanspeed(value))
4005 u8 value = 0;
4006 if (sony_pic_get_fanspeed(&value))
4009 return snprintf(buffer, PAGE_SIZE, "%d\n", value);
4126 static int ec_read16(u8 addr, u16 *value)
4133 *value = val_lb | (val_hb << 8);
4144 int value;
4154 &value)) {
4158 val8 = ((value & 0xff) - 1) << 5;
4171 value = (val8 >> 5) + 1;
4172 if (sony_nc_int_call(sony_nc_acpi_handle, "SBRT", &value,