Lines Matching full:ktd253

3  * Backlight driver for the Kinetic KTD253
39 struct ktd253_backlight *ktd253 = bl_get_data(bl); in ktd253_backlight_update_status() local
42 u16 current_ratio = ktd253->ratio; in ktd253_backlight_update_status()
45 dev_dbg(ktd253->dev, "new brightness/ratio: %d/32\n", brightness); in ktd253_backlight_update_status()
54 gpiod_set_value_cansleep(ktd253->gpiod, 0); in ktd253_backlight_update_status()
57 * to actually switch the KTD253 off. in ktd253_backlight_update_status()
60 ktd253->ratio = 0; in ktd253_backlight_update_status()
65 gpiod_set_value_cansleep(ktd253->gpiod, 1); in ktd253_backlight_update_status()
85 gpiod_set_value(ktd253->gpiod, 0); in ktd253_backlight_update_status()
87 gpiod_set_value(ktd253->gpiod, 1); in ktd253_backlight_update_status()
96 ktd253->ratio = current_ratio; in ktd253_backlight_update_status()
98 dev_dbg(ktd253->dev, "new ratio set to %d/32\n", target_ratio); in ktd253_backlight_update_status()
112 struct ktd253_backlight *ktd253; in ktd253_backlight_probe() local
117 ktd253 = devm_kzalloc(dev, sizeof(*ktd253), GFP_KERNEL); in ktd253_backlight_probe()
118 if (!ktd253) in ktd253_backlight_probe()
120 ktd253->dev = dev; in ktd253_backlight_probe()
141 /* This will be the default ratio when the KTD253 is enabled */ in ktd253_backlight_probe()
142 ktd253->ratio = KTD253_MAX_RATIO; in ktd253_backlight_probe()
144 ktd253->ratio = 0; in ktd253_backlight_probe()
146 ktd253->gpiod = devm_gpiod_get(dev, "enable", in ktd253_backlight_probe()
149 if (IS_ERR(ktd253->gpiod)) { in ktd253_backlight_probe()
150 ret = PTR_ERR(ktd253->gpiod); in ktd253_backlight_probe()
155 gpiod_set_consumer_name(ktd253->gpiod, dev_name(dev)); in ktd253_backlight_probe()
157 bl = devm_backlight_device_register(dev, dev_name(dev), dev, ktd253, in ktd253_backlight_probe()
173 ktd253->bl = bl; in ktd253_backlight_probe()
181 { .compatible = "kinetic,ktd253" },
188 .name = "ktd253-backlight",
196 MODULE_DESCRIPTION("Kinetic KTD253 Backlight Driver");
198 MODULE_ALIAS("platform:ktd253-backlight");