Lines Matching +full:bl +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0-only
26 static int ep93xxbl_set(struct backlight_device *bl, int brightness) in ep93xxbl_set() argument
28 struct ep93xxbl *ep93xxbl = bl_get_data(bl); in ep93xxbl_set()
30 writel((brightness << 8) | EP93XX_MAX_COUNT, ep93xxbl->mmio); in ep93xxbl_set()
32 ep93xxbl->brightness = brightness; in ep93xxbl_set()
37 static int ep93xxbl_update_status(struct backlight_device *bl) in ep93xxbl_update_status() argument
39 return ep93xxbl_set(bl, backlight_get_brightness(bl)); in ep93xxbl_update_status()
42 static int ep93xxbl_get_brightness(struct backlight_device *bl) in ep93xxbl_get_brightness() argument
44 struct ep93xxbl *ep93xxbl = bl_get_data(bl); in ep93xxbl_get_brightness()
46 return ep93xxbl->brightness; in ep93xxbl_get_brightness()
57 struct backlight_device *bl; in ep93xxbl_probe() local
61 ep93xxbl = devm_kzalloc(&dev->dev, sizeof(*ep93xxbl), GFP_KERNEL); in ep93xxbl_probe()
63 return -ENOMEM; in ep93xxbl_probe()
67 return -ENXIO; in ep93xxbl_probe()
70 * FIXME - We don't do a request_mem_region here because we are in ep93xxbl_probe()
72 * drivers/video/ep93xx-fb.c) and doing so will cause the second in ep93xxbl_probe()
73 * loaded driver to return -EBUSY. in ep93xxbl_probe()
78 ep93xxbl->mmio = devm_ioremap(&dev->dev, res->start, in ep93xxbl_probe()
80 if (!ep93xxbl->mmio) in ep93xxbl_probe()
81 return -ENXIO; in ep93xxbl_probe()
86 bl = devm_backlight_device_register(&dev->dev, dev->name, &dev->dev, in ep93xxbl_probe()
88 if (IS_ERR(bl)) in ep93xxbl_probe()
89 return PTR_ERR(bl); in ep93xxbl_probe()
91 bl->props.brightness = EP93XX_DEF_BRIGHT; in ep93xxbl_probe()
93 platform_set_drvdata(dev, bl); in ep93xxbl_probe()
95 ep93xxbl_update_status(bl); in ep93xxbl_probe()
103 struct backlight_device *bl = dev_get_drvdata(dev); in ep93xxbl_suspend() local
105 return ep93xxbl_set(bl, 0); in ep93xxbl_suspend()
110 struct backlight_device *bl = dev_get_drvdata(dev); in ep93xxbl_resume() local
112 backlight_update_status(bl); in ep93xxbl_resume()
121 .name = "ep93xx-bl",
132 MODULE_ALIAS("platform:ep93xx-bl");