Hi Frank, On Wed, 10 Jul 2024 at 14:43, Frank Wunderlich <fran...@public-files.de> wrote: > > Hi, > > i'm working on OF_UPSTREAM for mediatek boards and noticed missing > syscon-fallback on some (mt7988) devicetree nodes. > > i know that u-boot uses this fallback to get the regmap shared across > drivers, but only initializing once with the syscon_uclass. > > i tried adding the syscon-fallback to linux device tree and got pointed [1] > back to uboot to solve the issue there... > > are there any ways to avoid syscon in device tree and get the regmap of > different node? > > i guess i could use [2], but then it is possible to aquire same regmap > multiple times which may result in issues (e.g. race-conditions). > I also want to avoid creating multiple drivers doing the exactily same thing > like syscon. > > one easy (but maybe unwanted way) is to add all compatibles for affected > syscons to the syscon driver...but then it is no more generic (baed on > compatibles then vendor-specific).
One option is to create a new driver in a new file and have its ops use the syscon ops. See for example arch/arm/mach-rockchip/rk3399/syscon_rk3399.c Regards, Simon