Lines Matching refs:kbdbl_ctl
1780 static struct kbd_backlight *kbdbl_ctl; variable
1789 if (sony_call_snc_handle(kbdbl_ctl->handle, in __sony_nc_kbd_backlight_mode_set()
1790 (value << 0x10) | (kbdbl_ctl->base), &result)) in __sony_nc_kbd_backlight_mode_set()
1795 sony_call_snc_handle(kbdbl_ctl->handle, in __sony_nc_kbd_backlight_mode_set()
1796 (value << 0x0f) | (kbdbl_ctl->base + 0x100), in __sony_nc_kbd_backlight_mode_set()
1799 kbdbl_ctl->mode = value; in __sony_nc_kbd_backlight_mode_set()
1828 count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_ctl->mode); in sony_nc_kbd_backlight_mode_show()
1839 if (sony_call_snc_handle(kbdbl_ctl->handle, (value << 0x10) | in __sony_nc_kbd_backlight_timeout_set()
1840 (kbdbl_ctl->base + 0x200), &result)) in __sony_nc_kbd_backlight_timeout_set()
1843 kbdbl_ctl->timeout = value; in __sony_nc_kbd_backlight_timeout_set()
1872 count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_ctl->timeout); in sony_nc_kbd_backlight_timeout_show()
1882 if (kbdbl_ctl) { in sony_nc_kbd_backlight_setup()
1884 handle, kbdbl_ctl->handle); in sony_nc_kbd_backlight_setup()
1902 kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL); in sony_nc_kbd_backlight_setup()
1903 if (!kbdbl_ctl) in sony_nc_kbd_backlight_setup()
1906 kbdbl_ctl->mode = kbd_backlight; in sony_nc_kbd_backlight_setup()
1907 kbdbl_ctl->timeout = kbd_backlight_timeout; in sony_nc_kbd_backlight_setup()
1908 kbdbl_ctl->handle = handle; in sony_nc_kbd_backlight_setup()
1910 kbdbl_ctl->base = 0x0C00; in sony_nc_kbd_backlight_setup()
1912 kbdbl_ctl->base = 0x4000; in sony_nc_kbd_backlight_setup()
1914 sysfs_attr_init(&kbdbl_ctl->mode_attr.attr); in sony_nc_kbd_backlight_setup()
1915 kbdbl_ctl->mode_attr.attr.name = "kbd_backlight"; in sony_nc_kbd_backlight_setup()
1916 kbdbl_ctl->mode_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_kbd_backlight_setup()
1917 kbdbl_ctl->mode_attr.show = sony_nc_kbd_backlight_mode_show; in sony_nc_kbd_backlight_setup()
1918 kbdbl_ctl->mode_attr.store = sony_nc_kbd_backlight_mode_store; in sony_nc_kbd_backlight_setup()
1920 sysfs_attr_init(&kbdbl_ctl->timeout_attr.attr); in sony_nc_kbd_backlight_setup()
1921 kbdbl_ctl->timeout_attr.attr.name = "kbd_backlight_timeout"; in sony_nc_kbd_backlight_setup()
1922 kbdbl_ctl->timeout_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_kbd_backlight_setup()
1923 kbdbl_ctl->timeout_attr.show = sony_nc_kbd_backlight_timeout_show; in sony_nc_kbd_backlight_setup()
1924 kbdbl_ctl->timeout_attr.store = sony_nc_kbd_backlight_timeout_store; in sony_nc_kbd_backlight_setup()
1926 ret = device_create_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_setup()
1930 ret = device_create_file(&pd->dev, &kbdbl_ctl->timeout_attr); in sony_nc_kbd_backlight_setup()
1934 __sony_nc_kbd_backlight_mode_set(kbdbl_ctl->mode); in sony_nc_kbd_backlight_setup()
1935 __sony_nc_kbd_backlight_timeout_set(kbdbl_ctl->timeout); in sony_nc_kbd_backlight_setup()
1940 device_remove_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_setup()
1942 kfree(kbdbl_ctl); in sony_nc_kbd_backlight_setup()
1943 kbdbl_ctl = NULL; in sony_nc_kbd_backlight_setup()
1950 if (kbdbl_ctl && handle == kbdbl_ctl->handle) { in sony_nc_kbd_backlight_cleanup()
1951 device_remove_file(&pd->dev, &kbdbl_ctl->mode_attr); in sony_nc_kbd_backlight_cleanup()
1952 device_remove_file(&pd->dev, &kbdbl_ctl->timeout_attr); in sony_nc_kbd_backlight_cleanup()
1953 kfree(kbdbl_ctl); in sony_nc_kbd_backlight_cleanup()
1954 kbdbl_ctl = NULL; in sony_nc_kbd_backlight_cleanup()