linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] fbdev: Make CONFIG_FB_DEVICE optional for drivers
@ 2026-01-07  4:42 Chintan Patel
  2026-01-07  4:42 ` [PATCH v4 1/4] fb: Add dev_of_fbinfo() helper for optional sysfs support Chintan Patel
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Chintan Patel @ 2026-01-07  4:42 UTC (permalink / raw)
  To: linux-fbdev, linux-staging, linux-omap
  Cc: linux-kernel, dri-devel, tzimmermann, andy, deller, gregkh,
	Chintan Patel

This series makes CONFIG_FB_DEVICE optional for fbdev drivers that use
it only for sysfs interfaces, addressing Thomas Zimmermann’s TODO to
remove hard FB_DEVICE dependencies.

The series introduces a small helper, dev_of_fbinfo(), which returns
NULL when CONFIG_FB_DEVICE=n. This allows sysfs code paths to be skipped
via runtime checks, avoids #ifdef CONFIG_FB_DEVICE clutter, and keeps
full compile-time syntax checking.

Signed-off-by: Chintan Patel <chintanlike@gmail.com>
---
Changes in v4:
- PTR_IF() was removed and overlay sysfs is now optional via __maybe_unused 
  and #ifdef CONFIG_FB_DEVICE (suggested by Helge Deller)
- Decouple variable definition and assignment in 
  omapfb_remove/create_sysfs (suggested by Andy Shevchenko)
- Added Reviewed-by tags:
  - fb: Add dev_of_fbinfo(): Helge Deller, Andy Shevchenko
  - staging: fbtft: Helge Deller

Changes in v3:
- Use PTR_IF() to conditionally include overlay_sysfs_group in 
  overlay_sysfs_groups(suggested by Andy Shevchenko)
- Decouple variable definition and assignment in 
  fbtft_sysfs_init/exit(suggested by Andy Shevchenko)

Changes in v2:
- Add dev_of_fbinfo() helper (suggested by Helge Deller)
- Replace #ifdef CONFIG_FB_DEVICE blocks with runtime NULL checks
- Switch to fb_dbg() / fb_info() logging (suggested by Thomas Zimmermann)

---

Chintan Patel (4):
  fb: Add dev_of_fbinfo() helper for optional sysfs support
  staging: fbtft: Make FB_DEVICE dependency optional
  fbdev: omapfb: Make FB_DEVICE dependency optional
  fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional

 drivers/staging/fbtft/Kconfig                 |  5 ++++-
 drivers/staging/fbtft/fbtft-sysfs.c           | 20 +++++++++++++++----
 drivers/video/fbdev/omap2/omapfb/Kconfig      |  3 ++-
 .../video/fbdev/omap2/omapfb/omapfb-sysfs.c   | 18 +++++++++++++----
 drivers/video/fbdev/sh_mobile_lcdcfb.c        |  5 ++++-
 include/linux/fb.h                            |  9 +++++++++
 6 files changed, 49 insertions(+), 11 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-07 15:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07  4:42 [PATCH v4 0/4] fbdev: Make CONFIG_FB_DEVICE optional for drivers Chintan Patel
2026-01-07  4:42 ` [PATCH v4 1/4] fb: Add dev_of_fbinfo() helper for optional sysfs support Chintan Patel
2026-01-07  7:32   ` Thomas Zimmermann
2026-01-07  4:42 ` [PATCH v4 2/4] staging: fbtft: Make FB_DEVICE dependency optional Chintan Patel
2026-01-07  7:33   ` Thomas Zimmermann
2026-01-07 15:16   ` Andy Shevchenko
2026-01-07  4:42 ` [PATCH v4 3/4] fbdev: omapfb: " Chintan Patel
2026-01-07  7:33   ` Thomas Zimmermann
2026-01-07  4:42 ` [PATCH v4 4/4] fbdev: sh_mobile_lcdc: " Chintan Patel
2026-01-07  7:33   ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).