On Mon, 8 Apr 2024 11:16:17 +0200 Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > On Sat, Apr 6, 2024 at 12:27 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > On Fri, 5 Apr 2024 11:36:22 +0100 > > Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> wrote: > > > > > On Thu, 4 Apr 2024 13:36:15 +0200 > > > Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > > > > > > > On Sat, Mar 30, 2024 at 8:09 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > > > > > > > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > > > > > > > > > The dependencies on various ab8500 components prevent this driver > > > > > being useful but they don't seem to prevent it being built. > > > > > Improve build coverage by allowing COMPILE_TEST. > > > > > > > > > > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> > > > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > > > > > > > ...but I think AB8500_CORE is a hard requirement because > > > > <linux/mfd/abx500.h> does not provide register accessor stubs? > > > > > > > hmm. I clearly didn't test enough. Ah well, I'll drop this one. > > > > Yours, > > > > Linus Walleij > > > > Tested again, nope, AB8500_CORE isn't needed as far as I can tell. > > Oh? Weird. > > > What register accessor stubs were you referring to? There are some calls for debug dumps > > in that header, but those aren't used by the ADC driver. > > <linux/mfd/abx500.h> has for example: > (...) > int abx500_get_register_interruptible(struct device *dev, u8 bank, u8 reg, > u8 *value); > (...) > > and the ADC driver has: > > /* Check if ADC is not busy, lock and proceed */ > do { > ret = abx500_get_register_interruptible(gpadc->dev, > AB8500_GPADC, AB8500_GPADC_STAT_REG, &val); > > > $ git grep abx500_get_register_interruptible include/linux/ > include/linux/mfd/abx500.h:int > abx500_get_register_interruptible(struct device *dev, u8 bank, u8 reg, > > No stubs! I think there is just some other Kconfig stuff bringing the > AB8500 MFD core into > the build at any attempt. ah got it. AB8500_CORE isn't needed, but ABX500_CORE is and that's indirectly depended on by AB8500_CORE. How about I change the dependency to depends on ABX500_CORE && (AB8500_REGULATOR || COMPILE_TEST) instead? As ABX500_CORE doesn't have a horrible indirect arch dependency that AB8500_CORE does via db8500-prcmu. I can build it on x86 but obviously would want to hit this with a lot more build tests. DB8500_PRCMU has some stubs but not a complete enough set to allow AB5800_CORE to build. Could fix that but it's a bigger change than relaxing requirements of the ADC driver to the ones needed for building. Jonathan > > Yours, > Linus Walleij