Lines Matching +full:pd +full:- +full:disable

1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (c) 2012-2013 David Herrmann <dh.herrmann@gmail.com>
8 * Simple-Framebuffer support
9 * Create a platform-device for any available boot framebuffer. The
10 * simple-framebuffer platform device is already available on DT systems, so
12 * platform device compatible with the "simple-framebuffer" DT object. If
14 * "vesa-framebuffer", "efi-framebuffer" or "platform-framebuffer" device and
16 * to pick these devices up without messing with simple-framebuffer drivers.
19 * If CONFIG_SYSFB_SIMPLEFB is not selected, never register "simple-framebuffer"
23 * TODO: We set the dev_id field of all platform-devices to 0. This allows
37 static struct platform_device *pd; variable
43 if (IS_ERR_OR_NULL(pd)) in sysfb_unregister()
46 platform_device_unregister(pd); in sysfb_unregister()
47 pd = NULL; in sysfb_unregister()
53 * sysfb_disable() - disable the Generic System Framebuffers support
88 /* try to create a simple-framebuffer device */ in sysfb_init()
91 pd = sysfb_create_simplefb(si, &mode); in sysfb_init()
92 if (!IS_ERR(pd)) in sysfb_init()
97 if (si->orig_video_isVGA == VIDEO_TYPE_EFI) in sysfb_init()
98 name = "efi-framebuffer"; in sysfb_init()
99 else if (si->orig_video_isVGA == VIDEO_TYPE_VLFB) in sysfb_init()
100 name = "vesa-framebuffer"; in sysfb_init()
101 else if (si->orig_video_isVGA == VIDEO_TYPE_VGAC) in sysfb_init()
102 name = "vga-framebuffer"; in sysfb_init()
103 else if (si->orig_video_isVGA == VIDEO_TYPE_EGAC) in sysfb_init()
104 name = "ega-framebuffer"; in sysfb_init()
106 name = "platform-framebuffer"; in sysfb_init()
108 pd = platform_device_alloc(name, 0); in sysfb_init()
109 if (!pd) { in sysfb_init()
110 ret = -ENOMEM; in sysfb_init()
114 sysfb_set_efifb_fwnode(pd); in sysfb_init()
116 ret = platform_device_add_data(pd, si, sizeof(*si)); in sysfb_init()
120 ret = platform_device_add(pd); in sysfb_init()
126 platform_device_put(pd); in sysfb_init()