Lines Matching +full:max77650 +full:- +full:led
1 // SPDX-License-Identifier: GPL-2.0
6 // LED driver for MAXIM 77650/77651 charger/power-supply.
10 #include <linux/mfd/max77650.h>
50 struct max77650_led *led = max77650_to_led(cdev); in max77650_led_brightness_set() local
60 return regmap_update_bits(led->map, led->regA, mask, val); in max77650_led_brightness_set()
66 struct max77650_led *leds, *led; in max77650_led_probe() local
72 dev = &pdev->dev; in max77650_led_probe()
77 return -ENOMEM; in max77650_led_probe()
79 map = dev_get_regmap(dev->parent, NULL); in max77650_led_probe()
81 return -ENODEV; in max77650_led_probe()
85 return -ENODEV; in max77650_led_probe()
92 rv = -EINVAL; in max77650_led_probe()
96 led = &leds[reg]; in max77650_led_probe()
97 led->map = map; in max77650_led_probe()
98 led->regA = MAX77650_LED_A_BASE + reg; in max77650_led_probe()
99 led->regB = MAX77650_LED_B_BASE + reg; in max77650_led_probe()
100 led->cdev.brightness_set_blocking = max77650_led_brightness_set; in max77650_led_probe()
101 led->cdev.max_brightness = MAX77650_LED_MAX_BRIGHTNESS; in max77650_led_probe()
104 init_data.devicename = "max77650"; in max77650_led_probe()
108 rv = devm_led_classdev_register_ext(dev, &led->cdev, in max77650_led_probe()
113 rv = regmap_write(map, led->regA, MAX77650_LED_A_DEFAULT); in max77650_led_probe()
117 rv = regmap_write(map, led->regB, MAX77650_LED_B_DEFAULT); in max77650_led_probe()
131 { .compatible = "maxim,max77650-led" },
138 .name = "max77650-led",
145 MODULE_DESCRIPTION("MAXIM 77650/77651 LED driver");
148 MODULE_ALIAS("platform:max77650-led");