All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
@ 2021-11-02 10:04 Robert Marko
  2021-11-02 11:17 ` Lee Jones
  2021-11-24 15:49 ` Lee Jones
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Marko @ 2021-11-02 10:04 UTC (permalink / raw)
  To: lee.jones, michael, linux-kernel; +Cc: Robert Marko

MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:

aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'

Fixes: 3abee4579484 ("mfd: Add simple regmap based I2C driver")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 61992edf6a4d..2de69892b631 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1204,6 +1204,7 @@ config MFD_SI476X_CORE
 config MFD_SIMPLE_MFD_I2C
 	tristate
 	depends on I2C
+	select MFD_CORE
 	select REGMAP_I2C
 	help
 	  This driver creates a single register map with the intention for it
-- 
2.33.1


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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 10:04 [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error Robert Marko
@ 2021-11-02 11:17 ` Lee Jones
  2021-11-02 11:20   ` Robert Marko
  2021-11-02 12:28   ` Michael Walle
  2021-11-24 15:49 ` Lee Jones
  1 sibling, 2 replies; 10+ messages in thread
From: Lee Jones @ 2021-11-02 11:17 UTC (permalink / raw)
  To: Robert Marko; +Cc: michael, linux-kernel

On Tue, 02 Nov 2021, Robert Marko wrote:

> MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:
> 
> aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
> drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'

What is your use-case?

How are you enabling this symbol?

> Fixes: 3abee4579484 ("mfd: Add simple regmap based I2C driver")
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> ---
>  drivers/mfd/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 61992edf6a4d..2de69892b631 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1204,6 +1204,7 @@ config MFD_SI476X_CORE
>  config MFD_SIMPLE_MFD_I2C
>  	tristate
>  	depends on I2C
> +	select MFD_CORE
>  	select REGMAP_I2C
>  	help
>  	  This driver creates a single register map with the intention for it

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 11:17 ` Lee Jones
@ 2021-11-02 11:20   ` Robert Marko
  2021-11-02 11:35     ` Lee Jones
  2021-11-02 12:28   ` Michael Walle
  1 sibling, 1 reply; 10+ messages in thread
From: Robert Marko @ 2021-11-02 11:20 UTC (permalink / raw)
  To: Lee Jones; +Cc: Michael Walle, Linux Kernel Mailing List

On Tue, Nov 2, 2021 at 12:17 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Tue, 02 Nov 2021, Robert Marko wrote:
>
> > MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:
> >
> > aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
> > drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'
>
> What is your use-case?
>
> How are you enabling this symbol?

Hi Lee,
I am adding a symbol like MFD_SL28CPLD does that you can depend on and
that simply
selects the MFD_SIMPLE_MFD_I2C and I have hit this issue since the
MFD_CORE is not selected.

Regards,
Robert
>
> > Fixes: 3abee4579484 ("mfd: Add simple regmap based I2C driver")
> > Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> > ---
> >  drivers/mfd/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 61992edf6a4d..2de69892b631 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -1204,6 +1204,7 @@ config MFD_SI476X_CORE
> >  config MFD_SIMPLE_MFD_I2C
> >       tristate
> >       depends on I2C
> > +     select MFD_CORE
> >       select REGMAP_I2C
> >       help
> >         This driver creates a single register map with the intention for it
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 11:20   ` Robert Marko
@ 2021-11-02 11:35     ` Lee Jones
  2021-11-02 11:37       ` Robert Marko
  0 siblings, 1 reply; 10+ messages in thread
From: Lee Jones @ 2021-11-02 11:35 UTC (permalink / raw)
  To: Robert Marko; +Cc: Michael Walle, Linux Kernel Mailing List

On Tue, 02 Nov 2021, Robert Marko wrote:

> On Tue, Nov 2, 2021 at 12:17 PM Lee Jones <lee.jones@linaro.org> wrote:
> >
> > On Tue, 02 Nov 2021, Robert Marko wrote:
> >
> > > MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:
> > >
> > > aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
> > > drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'
> >
> > What is your use-case?
> >
> > How are you enabling this symbol?
> 
> Hi Lee,
> I am adding a symbol like MFD_SL28CPLD does that you can depend on and
> that simply
> selects the MFD_SIMPLE_MFD_I2C and I have hit this issue since the
> MFD_CORE is not selected.

That's interesting.

I wonder how MFD_SL28CPLD selects it?

> > > Fixes: 3abee4579484 ("mfd: Add simple regmap based I2C driver")
> > > Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> > > ---
> > >  drivers/mfd/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > > index 61992edf6a4d..2de69892b631 100644
> > > --- a/drivers/mfd/Kconfig
> > > +++ b/drivers/mfd/Kconfig
> > > @@ -1204,6 +1204,7 @@ config MFD_SI476X_CORE
> > >  config MFD_SIMPLE_MFD_I2C
> > >       tristate
> > >       depends on I2C
> > > +     select MFD_CORE
> > >       select REGMAP_I2C
> > >       help
> > >         This driver creates a single register map with the intention for it
> >
> 
> 
> 

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 11:35     ` Lee Jones
@ 2021-11-02 11:37       ` Robert Marko
  2021-11-03  7:33         ` Lee Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Marko @ 2021-11-02 11:37 UTC (permalink / raw)
  To: Lee Jones; +Cc: Michael Walle, Linux Kernel Mailing List

On Tue, Nov 2, 2021 at 12:35 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Tue, 02 Nov 2021, Robert Marko wrote:
>
> > On Tue, Nov 2, 2021 at 12:17 PM Lee Jones <lee.jones@linaro.org> wrote:
> > >
> > > On Tue, 02 Nov 2021, Robert Marko wrote:
> > >
> > > > MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:
> > > >
> > > > aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
> > > > drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'
> > >
> > > What is your use-case?
> > >
> > > How are you enabling this symbol?
> >
> > Hi Lee,
> > I am adding a symbol like MFD_SL28CPLD does that you can depend on and
> > that simply
> > selects the MFD_SIMPLE_MFD_I2C and I have hit this issue since the
> > MFD_CORE is not selected.
>
> That's interesting.
>
> I wonder how MFD_SL28CPLD selects it?

It doesn't, it just selects MFD_SIMPLE_MFD_I2C

MFD_CORE is probably selected by something else masking this issue.

Regards,
Robert
>
> > > > Fixes: 3abee4579484 ("mfd: Add simple regmap based I2C driver")
> > > > Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> > > > ---
> > > >  drivers/mfd/Kconfig | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > > > index 61992edf6a4d..2de69892b631 100644
> > > > --- a/drivers/mfd/Kconfig
> > > > +++ b/drivers/mfd/Kconfig
> > > > @@ -1204,6 +1204,7 @@ config MFD_SI476X_CORE
> > > >  config MFD_SIMPLE_MFD_I2C
> > > >       tristate
> > > >       depends on I2C
> > > > +     select MFD_CORE
> > > >       select REGMAP_I2C
> > > >       help
> > > >         This driver creates a single register map with the intention for it
> > >
> >
> >
> >
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 11:17 ` Lee Jones
  2021-11-02 11:20   ` Robert Marko
@ 2021-11-02 12:28   ` Michael Walle
  2021-11-03  7:32     ` Lee Jones
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Walle @ 2021-11-02 12:28 UTC (permalink / raw)
  To: Lee Jones; +Cc: Robert Marko, linux-kernel

Am 2021-11-02 12:17, schrieb Lee Jones:
> On Tue, 02 Nov 2021, Robert Marko wrote:
> 
>> MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build 
>> error:
>> 
>> aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function 
>> `simple_mfd_i2c_probe':
>> drivers/mfd/simple-mfd-i2c.c:55: undefined reference to 
>> `devm_mfd_add_devices'
> 
> What is your use-case?
> 
> How are you enabling this symbol?

Mh? drivers/mfd/simple-mfd-i2c.c is using devm_mfd_add_devices which
is provided by drivers/mfd/core.c. So select MFD_CORE is clearly
missing here, no? I mean most of the MFD drivers do a "select MFD_CORE".

-michael

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 12:28   ` Michael Walle
@ 2021-11-03  7:32     ` Lee Jones
  2021-11-03  7:36       ` Michael Walle
  0 siblings, 1 reply; 10+ messages in thread
From: Lee Jones @ 2021-11-03  7:32 UTC (permalink / raw)
  To: Michael Walle; +Cc: Robert Marko, linux-kernel

On Tue, 02 Nov 2021, Michael Walle wrote:

> Am 2021-11-02 12:17, schrieb Lee Jones:
> > On Tue, 02 Nov 2021, Robert Marko wrote:
> > 
> > > MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build
> > > error:
> > > 
> > > aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function
> > > `simple_mfd_i2c_probe':
> > > drivers/mfd/simple-mfd-i2c.c:55: undefined reference to
> > > `devm_mfd_add_devices'
> > 
> > What is your use-case?
> > 
> > How are you enabling this symbol?
> 
> Mh? drivers/mfd/simple-mfd-i2c.c is using devm_mfd_add_devices which
> is provided by drivers/mfd/core.c. So select MFD_CORE is clearly
> missing here, no? I mean most of the MFD drivers do a "select MFD_CORE".

I'm not debating that.  The patch is fine.

I am however, interested in how MFD_CORE is enabled for MFD_SL28CPLD.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 11:37       ` Robert Marko
@ 2021-11-03  7:33         ` Lee Jones
  0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2021-11-03  7:33 UTC (permalink / raw)
  To: Robert Marko; +Cc: Michael Walle, Linux Kernel Mailing List

On Tue, 02 Nov 2021, Robert Marko wrote:

> On Tue, Nov 2, 2021 at 12:35 PM Lee Jones <lee.jones@linaro.org> wrote:
> >
> > On Tue, 02 Nov 2021, Robert Marko wrote:
> >
> > > On Tue, Nov 2, 2021 at 12:17 PM Lee Jones <lee.jones@linaro.org> wrote:
> > > >
> > > > On Tue, 02 Nov 2021, Robert Marko wrote:
> > > >
> > > > > MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:
> > > > >
> > > > > aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
> > > > > drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'
> > > >
> > > > What is your use-case?
> > > >
> > > > How are you enabling this symbol?
> > >
> > > Hi Lee,
> > > I am adding a symbol like MFD_SL28CPLD does that you can depend on and
> > > that simply
> > > selects the MFD_SIMPLE_MFD_I2C and I have hit this issue since the
> > > MFD_CORE is not selected.
> >
> > That's interesting.
> >
> > I wonder how MFD_SL28CPLD selects it?
> 
> It doesn't, it just selects MFD_SIMPLE_MFD_I2C
> 
> MFD_CORE is probably selected by something else masking this issue.

Right.  That's what I'm trying to get to the bottom of.

Don't worry, the patch will be accepted.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-03  7:32     ` Lee Jones
@ 2021-11-03  7:36       ` Michael Walle
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Walle @ 2021-11-03  7:36 UTC (permalink / raw)
  To: Lee Jones; +Cc: Robert Marko, linux-kernel

Am 3. November 2021 08:32:28 MEZ schrieb Lee Jones <lee.jones@linaro.org>:
>On Tue, 02 Nov 2021, Michael Walle wrote:
>
>> Am 2021-11-02 12:17, schrieb Lee Jones:
>> > On Tue, 02 Nov 2021, Robert Marko wrote:
>> > 
>> > > MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build
>> > > error:
>> > > 
>> > > aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function
>> > > `simple_mfd_i2c_probe':
>> > > drivers/mfd/simple-mfd-i2c.c:55: undefined reference to
>> > > `devm_mfd_add_devices'
>> > 
>> > What is your use-case?
>> > 
>> > How are you enabling this symbol?
>> 
>> Mh? drivers/mfd/simple-mfd-i2c.c is using devm_mfd_add_devices which
>> is provided by drivers/mfd/core.c. So select MFD_CORE is clearly
>> missing here, no? I mean most of the MFD drivers do a "select MFD_CORE".
>
>I'm not debating that.  The patch is fine.
>
>I am however, interested in how MFD_CORE is enabled for MFD_SL28CPLD.

Because I'm mostly using the arch defconfig (arm64) it
must have missed it because it was probably already 
enabled by another mfd driver. 

-michael



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

* Re: [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  2021-11-02 10:04 [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error Robert Marko
  2021-11-02 11:17 ` Lee Jones
@ 2021-11-24 15:49 ` Lee Jones
  1 sibling, 0 replies; 10+ messages in thread
From: Lee Jones @ 2021-11-24 15:49 UTC (permalink / raw)
  To: Robert Marko; +Cc: michael, linux-kernel

On Tue, 02 Nov 2021, Robert Marko wrote:

> MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error:
> 
> aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
> drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices'
> 
> Fixes: 3abee4579484 ("mfd: Add simple regmap based I2C driver")
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> ---
>  drivers/mfd/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

In case you missed it, this patch was merged in v5.16-rc1.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2021-11-24 15:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 10:04 [PATCH] mfd: simple-mfd-i2c: Select MFD_CORE to fix build error Robert Marko
2021-11-02 11:17 ` Lee Jones
2021-11-02 11:20   ` Robert Marko
2021-11-02 11:35     ` Lee Jones
2021-11-02 11:37       ` Robert Marko
2021-11-03  7:33         ` Lee Jones
2021-11-02 12:28   ` Michael Walle
2021-11-03  7:32     ` Lee Jones
2021-11-03  7:36       ` Michael Walle
2021-11-24 15:49 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.