Lines Matching +full:current +full:- +full:ramp +full:- +full:delay +full:- +full:ms
1 // SPDX-License-Identifier: GPL-2.0-only
62 return regmap_write(ktz->regmap, reg, val); in ktz8866_write()
68 return regmap_update_bits(ktz->regmap, reg, mask, val); in ktz8866_update_bits()
76 if (!ktz->led_on && brightness > 0) { in ktz8866_backlight_update_status()
78 ktz->led_on = true; in ktz8866_backlight_update_status()
81 ktz->led_on = false; in ktz8866_backlight_update_status()
100 if (!of_property_read_u32(ktz->client->dev.of_node, "current-num-sinks", &val)) in ktz8866_init()
101 ktz8866_write(ktz, BL_EN, BIT(val) - 1); in ktz8866_init()
103 /* Enable all 6 current sinks if the number of current sinks isn't specified. */ in ktz8866_init()
104 ktz8866_write(ktz, BL_EN, BIT(6) - 1); in ktz8866_init()
106 if (!of_property_read_u32(ktz->client->dev.of_node, "kinetic,current-ramp-delay-ms", &val)) { in ktz8866_init()
113 if (!of_property_read_u32(ktz->client->dev.of_node, "kinetic,led-enable-ramp-delay-ms", &val)) { in ktz8866_init()
123 if (of_property_read_bool(ktz->client->dev.of_node, "kinetic,enable-lcd-bias")) in ktz8866_init()
134 ktz = devm_kzalloc(&client->dev, sizeof(*ktz), GFP_KERNEL); in ktz8866_probe()
136 return -ENOMEM; in ktz8866_probe()
138 ktz->client = client; in ktz8866_probe()
139 ktz->regmap = devm_regmap_init_i2c(client, &ktz8866_regmap_config); in ktz8866_probe()
140 if (IS_ERR(ktz->regmap)) in ktz8866_probe()
141 return dev_err_probe(&client->dev, PTR_ERR(ktz->regmap), "failed to init regmap\n"); in ktz8866_probe()
143 ret = devm_regulator_get_enable(&client->dev, "vddpos"); in ktz8866_probe()
145 return dev_err_probe(&client->dev, ret, "get regulator vddpos failed\n"); in ktz8866_probe()
146 ret = devm_regulator_get_enable(&client->dev, "vddneg"); in ktz8866_probe()
148 return dev_err_probe(&client->dev, ret, "get regulator vddneg failed\n"); in ktz8866_probe()
150 ktz->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH); in ktz8866_probe()
151 if (IS_ERR(ktz->enable_gpio)) in ktz8866_probe()
152 return PTR_ERR(ktz->enable_gpio); in ktz8866_probe()
160 backlight_dev = devm_backlight_device_register(&client->dev, "ktz8866-backlight", in ktz8866_probe()
161 &client->dev, ktz, &ktz8866_backlight_ops, &props); in ktz8866_probe()
163 return dev_err_probe(&client->dev, PTR_ERR(backlight_dev), in ktz8866_probe()
177 backlight_dev->props.brightness = 0; in ktz8866_remove()