--- zzzz-none-000/linux-3.10.107/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c 2021-02-04 17:41:59.000000000 +0000 @@ -276,51 +276,3 @@ { write_memory_start(sohandle, so); } - -#define CTRL_CKSW 0x10 -#define CTRL_C10 0x20 -#define CTRL_CPSW 0x80 -#define MAIN_MLED4 0x40 -#define MAIN_MSW 0x80 - -int kfr2r09_lcd_set_brightness(int brightness) -{ - struct i2c_adapter *a; - struct i2c_msg msg; - unsigned char buf[2]; - int ret; - - a = i2c_get_adapter(0); - if (!a) - return -ENODEV; - - buf[0] = 0x00; - if (brightness) - buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW; - else - buf[1] = 0; - - msg.addr = 0x75; - msg.buf = buf; - msg.len = 2; - msg.flags = 0; - ret = i2c_transfer(a, &msg, 1); - if (ret != 1) - return -ENODEV; - - buf[0] = 0x01; - if (brightness) - buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c; - else - buf[1] = 0; - - msg.addr = 0x75; - msg.buf = buf; - msg.len = 2; - msg.flags = 0; - ret = i2c_transfer(a, &msg, 1); - if (ret != 1) - return -ENODEV; - - return 0; -}