Lines Matching +full:default +full:- +full:brightness
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * the Linux dell-uart-backlight driver.
22 int brightness = 50; variable
28 while (len-- > 0) in dell_uart_checksum()
34 /* read() will return -1 on SIGINT / SIGTERM causing the mainloop to cleanly exit */
43 const char *version_str = "PHI23-V321"; in main()
49 fprintf(stderr, "Usage: %s <serial-port>\n", argv[0]); in main()
54 if (serial_fd == -1) { in main()
60 if (ret == -1) { in main()
73 if (ret == -1) { in main()
85 /* 3 MSB bits: cmd-len + 01010 SOF marker */ in main()
88 default: in main()
95 if (idx != (len - 1)) { in main()
103 csum = dell_uart_checksum(buf, len - 1); in main()
104 if (buf[len - 1] != csum) { in main()
106 buf[len - 1], csum); in main()
116 case 0x8a0b: /* cmd = 0x0b, set brightness */ in main()
118 fprintf(stderr, "Error invalid brightness param: %d\n", buf[2]); in main()
123 brightness = buf[2]; in main()
124 printf("Set brightness %d\n", brightness); in main()
126 case 0x6a0c: /* cmd = 0x0c, get brightness */ in main()
128 response[2] = brightness; in main()
129 printf("Get brightness, reply: %d\n", brightness); in main()
140 default: in main()
146 /* Respond with <total-len> <cmd> <data...> <csum> */ in main()