Lines Matching refs:kbdbl_ctl

1774 static struct kbd_backlight *kbdbl_ctl;  variable
1783 if (sony_call_snc_handle(kbdbl_ctl->handle, in __sony_nc_kbd_backlight_mode_set()
1784 (value << 0x10) | (kbdbl_ctl->base), &result)) in __sony_nc_kbd_backlight_mode_set()
1789 sony_call_snc_handle(kbdbl_ctl->handle, in __sony_nc_kbd_backlight_mode_set()
1790 (value << 0x0f) | (kbdbl_ctl->base + 0x100), in __sony_nc_kbd_backlight_mode_set()
1793 kbdbl_ctl->mode = value; in __sony_nc_kbd_backlight_mode_set()
1822 count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_ctl->mode); in sony_nc_kbd_backlight_mode_show()
1833 if (sony_call_snc_handle(kbdbl_ctl->handle, (value << 0x10) | in __sony_nc_kbd_backlight_timeout_set()
1834 (kbdbl_ctl->base + 0x200), &result)) in __sony_nc_kbd_backlight_timeout_set()
1837 kbdbl_ctl->timeout = value; in __sony_nc_kbd_backlight_timeout_set()
1866 count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_ctl->timeout); in sony_nc_kbd_backlight_timeout_show()
1878 if (kbdbl_ctl) { in sony_nc_kbd_backlight_setup()
1880 handle, kbdbl_ctl->handle); in sony_nc_kbd_backlight_setup()
1912 kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL); in sony_nc_kbd_backlight_setup()
1913 if (!kbdbl_ctl) in sony_nc_kbd_backlight_setup()
1916 kbdbl_ctl->mode = kbd_backlight; in sony_nc_kbd_backlight_setup()
1917 kbdbl_ctl->timeout = kbd_backlight_timeout; in sony_nc_kbd_backlight_setup()
1918 kbdbl_ctl->handle = handle; in sony_nc_kbd_backlight_setup()
1919 kbdbl_ctl->base = ctl_base; in sony_nc_kbd_backlight_setup()
1921 kbdbl_ctl->has_timeout = handle != 0x0153; in sony_nc_kbd_backlight_setup()
1923 sysfs_attr_init(&kbdbl_ctl->mode_attr.attr); in sony_nc_kbd_backlight_setup()
1924 kbdbl_ctl->mode_attr.attr.name = "kbd_backlight"; in sony_nc_kbd_backlight_setup()
1925 kbdbl_ctl->mode_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_kbd_backlight_setup()
1926 kbdbl_ctl->mode_attr.show = sony_nc_kbd_backlight_mode_show; in sony_nc_kbd_backlight_setup()
1927 kbdbl_ctl->mode_attr.store = sony_nc_kbd_backlight_mode_store; in sony_nc_kbd_backlight_setup()
1929 ret = device_create_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_setup()
1933 __sony_nc_kbd_backlight_mode_set(kbdbl_ctl->mode); in sony_nc_kbd_backlight_setup()
1935 if (kbdbl_ctl->has_timeout) { in sony_nc_kbd_backlight_setup()
1936 sysfs_attr_init(&kbdbl_ctl->timeout_attr.attr); in sony_nc_kbd_backlight_setup()
1937 kbdbl_ctl->timeout_attr.attr.name = "kbd_backlight_timeout"; in sony_nc_kbd_backlight_setup()
1938 kbdbl_ctl->timeout_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_kbd_backlight_setup()
1939 kbdbl_ctl->timeout_attr.show = in sony_nc_kbd_backlight_setup()
1941 kbdbl_ctl->timeout_attr.store = in sony_nc_kbd_backlight_setup()
1944 ret = device_create_file(&pd->dev, &kbdbl_ctl->timeout_attr); in sony_nc_kbd_backlight_setup()
1948 __sony_nc_kbd_backlight_timeout_set(kbdbl_ctl->timeout); in sony_nc_kbd_backlight_setup()
1955 device_remove_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_setup()
1957 kfree(kbdbl_ctl); in sony_nc_kbd_backlight_setup()
1958 kbdbl_ctl = NULL; in sony_nc_kbd_backlight_setup()
1965 if (kbdbl_ctl && handle == kbdbl_ctl->handle) { in sony_nc_kbd_backlight_cleanup()
1966 device_remove_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_cleanup()
1967 if (kbdbl_ctl->has_timeout) in sony_nc_kbd_backlight_cleanup()
1968 device_remove_file(&pd->dev, &kbdbl_ctl->timeout_attr); in sony_nc_kbd_backlight_cleanup()
1969 kfree(kbdbl_ctl); in sony_nc_kbd_backlight_cleanup()
1970 kbdbl_ctl = NULL; in sony_nc_kbd_backlight_cleanup()