Lines Matching refs:kbdbl_ctl
1778 static struct kbd_backlight *kbdbl_ctl; variable
1787 if (sony_call_snc_handle(kbdbl_ctl->handle, in __sony_nc_kbd_backlight_mode_set()
1788 (value << 0x10) | (kbdbl_ctl->base), &result)) in __sony_nc_kbd_backlight_mode_set()
1793 sony_call_snc_handle(kbdbl_ctl->handle, in __sony_nc_kbd_backlight_mode_set()
1794 (value << 0x0f) | (kbdbl_ctl->base + 0x100), in __sony_nc_kbd_backlight_mode_set()
1797 kbdbl_ctl->mode = value; in __sony_nc_kbd_backlight_mode_set()
1826 count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_ctl->mode); in sony_nc_kbd_backlight_mode_show()
1837 if (sony_call_snc_handle(kbdbl_ctl->handle, (value << 0x10) | in __sony_nc_kbd_backlight_timeout_set()
1838 (kbdbl_ctl->base + 0x200), &result)) in __sony_nc_kbd_backlight_timeout_set()
1841 kbdbl_ctl->timeout = value; in __sony_nc_kbd_backlight_timeout_set()
1870 count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_ctl->timeout); in sony_nc_kbd_backlight_timeout_show()
1880 if (kbdbl_ctl) { in sony_nc_kbd_backlight_setup()
1882 handle, kbdbl_ctl->handle); in sony_nc_kbd_backlight_setup()
1900 kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL); in sony_nc_kbd_backlight_setup()
1901 if (!kbdbl_ctl) in sony_nc_kbd_backlight_setup()
1904 kbdbl_ctl->mode = kbd_backlight; in sony_nc_kbd_backlight_setup()
1905 kbdbl_ctl->timeout = kbd_backlight_timeout; in sony_nc_kbd_backlight_setup()
1906 kbdbl_ctl->handle = handle; in sony_nc_kbd_backlight_setup()
1908 kbdbl_ctl->base = 0x0C00; in sony_nc_kbd_backlight_setup()
1910 kbdbl_ctl->base = 0x4000; in sony_nc_kbd_backlight_setup()
1912 sysfs_attr_init(&kbdbl_ctl->mode_attr.attr); in sony_nc_kbd_backlight_setup()
1913 kbdbl_ctl->mode_attr.attr.name = "kbd_backlight"; in sony_nc_kbd_backlight_setup()
1914 kbdbl_ctl->mode_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_kbd_backlight_setup()
1915 kbdbl_ctl->mode_attr.show = sony_nc_kbd_backlight_mode_show; in sony_nc_kbd_backlight_setup()
1916 kbdbl_ctl->mode_attr.store = sony_nc_kbd_backlight_mode_store; in sony_nc_kbd_backlight_setup()
1918 sysfs_attr_init(&kbdbl_ctl->timeout_attr.attr); in sony_nc_kbd_backlight_setup()
1919 kbdbl_ctl->timeout_attr.attr.name = "kbd_backlight_timeout"; in sony_nc_kbd_backlight_setup()
1920 kbdbl_ctl->timeout_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_kbd_backlight_setup()
1921 kbdbl_ctl->timeout_attr.show = sony_nc_kbd_backlight_timeout_show; in sony_nc_kbd_backlight_setup()
1922 kbdbl_ctl->timeout_attr.store = sony_nc_kbd_backlight_timeout_store; in sony_nc_kbd_backlight_setup()
1924 ret = device_create_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_setup()
1928 ret = device_create_file(&pd->dev, &kbdbl_ctl->timeout_attr); in sony_nc_kbd_backlight_setup()
1932 __sony_nc_kbd_backlight_mode_set(kbdbl_ctl->mode); in sony_nc_kbd_backlight_setup()
1933 __sony_nc_kbd_backlight_timeout_set(kbdbl_ctl->timeout); in sony_nc_kbd_backlight_setup()
1938 device_remove_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_setup()
1940 kfree(kbdbl_ctl); in sony_nc_kbd_backlight_setup()
1941 kbdbl_ctl = NULL; in sony_nc_kbd_backlight_setup()
1948 if (kbdbl_ctl && handle == kbdbl_ctl->handle) { in sony_nc_kbd_backlight_cleanup()
1949 device_remove_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_cleanup()
1950 device_remove_file(&pd->dev, &kbdbl_ctl->timeout_attr); in sony_nc_kbd_backlight_cleanup()
1951 kfree(kbdbl_ctl); in sony_nc_kbd_backlight_cleanup()
1952 kbdbl_ctl = NULL; in sony_nc_kbd_backlight_cleanup()