[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251209042744.7875-1-chintanlike@gmail.com>
Date: Mon, 8 Dec 2025 20:27:41 -0800
From: Chintan Patel <chintanlike@...il.com>
To: linux-fbdev@...r.kernel.org,
linux-staging@...ts.linux.dev,
linux-omap@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
tzimmermann@...e.de,
andy@...nel.org,
deller@....de,
gregkh@...uxfoundation.org,
Chintan Patel <chintanlike@...il.com>
Subject: [PATCH 0/3] fbdev: Guard sysfs interfaces under CONFIG_FB_DEVICE
Hi all,
This small series makes several legacy fbdev drivers buildable with
CONFIG_FB_DEVICE=n. Currently, multiple fbdev drivers rely on fb_info->dev
and sysfs attribute registration unconditionally, which leads to build
failures whenever FB_DEVICE is disabled.
Thomas previously noted that FB_DEVICE should eventually become optional
and that drivers should not depend on sysfs or fb_info->dev being present
unless the Kconfig explicitly selects it. This series pushes in that
direction by tightening the FB_DEVICE dependency boundary without changing
any runtime behaviour when FB_DEVICE=y.
What this series does *not* change
- No functional behaviour changes when FB_DEVICE=y.
- No removal of sysfs interfaces.
- No changes to fbops, memory allocation, or display update paths.
Build & test coverage
Tested with the following combinations:
1. **FB=y, FB_DEVICE=y**
- Baseline configuration; no regressions expected.
2. **FB=y, FB_DEVICE=n**
- Drivers build successfully.
- No sysfs attributes are created.
- fbdev devices operate normally (where applicable).
3. **FB=n**
- Drivers depend on FB, so they properly do not build, unchanged.
Motivation
This moves fbdev closer to supporting FB_DEVICE as truly optional, helps
reduce Kconfig entanglement, and clears several long-standing TODO items
as suggested by Thomas Zimmermann around legacy sysfs usage inside fbdev
drivers.
Feedback is welcome, especially on whether the guard boundaries around
sysfs are placed correctly or whether more logic should be pulled under
CONFIG_FB_DEVICE.
Thanks,
Chintan
Chintan Patel (3):
fbtft: Make sysfs and dev_*() logging conditional on FB_DEVICE
omapfb: Guard sysfs code under CONFIG_FB_DEVICE
sh_mobile_lcdc: Guard overlay sysfs interfaces under CONFIG_FB_DEVICE
drivers/staging/fbtft/fbtft-core.c | 20 +++++++++++++++++--
drivers/staging/fbtft/fbtft-sysfs.c | 8 ++++++++
drivers/video/fbdev/omap2/omapfb/Kconfig | 2 +-
.../video/fbdev/omap2/omapfb/omapfb-sysfs.c | 11 ++++++++++
drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 ++++
5 files changed, 42 insertions(+), 3 deletions(-)
--
2.43.0
Powered by blists - more mailing lists