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
38 static struct platform_device *pd; variable
46 if (IS_ERR_OR_NULL(pd)) in sysfb_unregister()
49 platform_device_unregister(pd); in sysfb_unregister()
50 pd = NULL; in sysfb_unregister()
56 * sysfb_disable() - disable the Generic System Framebuffers support
57 * @dev: the device to check if non-NULL
115 return ERR_PTR(-ENODEV); in sysfb_parent_dev()
117 return &pdev->dev; in sysfb_parent_dev()
146 /* try to create a simple-framebuffer device */ in sysfb_init()
149 pd = sysfb_create_simplefb(si, &mode, parent); in sysfb_init()
150 if (!IS_ERR(pd)) in sysfb_init()
155 if (si->orig_video_isVGA == VIDEO_TYPE_EFI) in sysfb_init()
156 name = "efi-framebuffer"; in sysfb_init()
157 else if (si->orig_video_isVGA == VIDEO_TYPE_VLFB) in sysfb_init()
158 name = "vesa-framebuffer"; in sysfb_init()
159 else if (si->orig_video_isVGA == VIDEO_TYPE_VGAC) in sysfb_init()
160 name = "vga-framebuffer"; in sysfb_init()
161 else if (si->orig_video_isVGA == VIDEO_TYPE_EGAC) in sysfb_init()
162 name = "ega-framebuffer"; in sysfb_init()
164 name = "platform-framebuffer"; in sysfb_init()
166 pd = platform_device_alloc(name, 0); in sysfb_init()
167 if (!pd) { in sysfb_init()
168 ret = -ENOMEM; in sysfb_init()
172 pd->dev.parent = parent; in sysfb_init()
174 sysfb_set_efifb_fwnode(pd); in sysfb_init()
176 ret = platform_device_add_data(pd, si, sizeof(*si)); in sysfb_init()
180 ret = platform_device_add(pd); in sysfb_init()
186 platform_device_put(pd); in sysfb_init()