13 #include <linux/module.h>
22 static const u8 dim_table[101] = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
23 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
24 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9,
25 10, 10, 11, 11, 12, 12, 13, 14, 15, 15, 16,
26 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28,
27 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 50,
28 53, 55, 58, 61, 65, 68, 72, 75, 79, 84, 88,
29 93, 97, 103, 108, 114, 120, 126, 133, 140,
40 #define PWM_SETUP (SCALE | CMP1MODE << 6 | MFGPT_SETUP_CNTEN)
75 .update_status = ot200_backlight_update_status,
76 .get_brightness = ot200_backlight_get_brightness,
88 "ot200 backlight dimmer") < 0) {
96 dev_err(&pdev->
dev,
"MFGPT 7 not available\n");
103 goto error_devm_kzalloc;
116 props.max_brightness = 100;
117 props.brightness = 100;
121 &ot200_backlight_ops, &props);
123 dev_err(&pdev->
dev,
"failed to register backlight\n");
124 retval = PTR_ERR(bl);
125 goto error_devm_kzalloc;
128 platform_set_drvdata(pdev, bl);
156 .name =
"ot200-backlight",
159 .probe = ot200_backlight_probe,
160 .remove = ot200_backlight_remove,