diff mbox series

[RFC] Buildfailure due to mising "select REGMAP_I2C"

Message ID CAA85sZu_5=mP2zn2h_8aY+n=UM+fXOKgym9yNAvwxcc+6R_-jA@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series [RFC] Buildfailure due to mising "select REGMAP_I2C" | expand

Commit Message

Ian Kumlien Feb. 24, 2020, 10:35 p.m. UTC
Hi,

I got surprised by:
ld: drivers/media/i2c/tvp5150.o: in function `tvp5150_probe':
tvp5150.c:(.text+0x11ac): undefined reference to `__devm_regmap_init_i2c'
make: *** [Makefile:1078: vmlinux] Error 1

When going from 5.5.2 -> 5.5.6

A quick git grep shows that something like this might be needed, but
it should be verified.
I'm really uncertain about the ones that say REGMAP_SCCB...

Comments

Sakari Ailus Feb. 25, 2020, 7:51 a.m. UTC | #1
Hi Ian,

Thank you for the patch.

On Mon, Feb 24, 2020 at 11:35:54PM +0100, Ian Kumlien wrote:
> Hi,
> 
> I got surprised by:
> ld: drivers/media/i2c/tvp5150.o: in function `tvp5150_probe':
> tvp5150.c:(.text+0x11ac): undefined reference to `__devm_regmap_init_i2c'
> make: *** [Makefile:1078: vmlinux] Error 1
> 
> When going from 5.5.2 -> 5.5.6
> 
> A quick git grep shows that something like this might be needed, but
> it should be verified.
> I'm really uncertain about the ones that say REGMAP_SCCB...

Those don't need REGMAP_I2C for they use SCCB.

Please also do not send attachments; your mail is likely consumed by some
list servers that way.

> 
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index c68e002d26ea..fc40c111f461 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -238,6 +238,7 @@ config VIDEO_ADV7604
>         tristate "Analog Devices ADV7604 decoder"
>         depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
>         depends on GPIOLIB || COMPILE_TEST
> +       select REGMAP_I2C
>         select HDMI
>         select V4L2_FWNODE
>         help
> @@ -379,6 +380,7 @@ config VIDEO_TVP5150
>         tristate "Texas Instruments TVP5150 video decoder"
>         depends on VIDEO_V4L2 && I2C
>         select V4L2_FWNODE
> +       select REGMAP_I2C
>         help
>           Support for the Texas Instruments TVP5150 video decoder.
> 
> @@ -584,6 +586,7 @@ config VIDEO_IMX214
>         tristate "Sony IMX214 sensor support"
>         depends on GPIOLIB && I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
>         depends on V4L2_FWNODE
> +       select REGMAP_I2C
>         help
>           This is a Video4Linux2 sensor driver for the Sony
>           IMX214 camera.
> @@ -612,6 +615,7 @@ config VIDEO_IMX274
>  config VIDEO_IMX290
>         tristate "Sony IMX290 sensor support"
>         depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> +       select REGMAP_I2C
>         select V4L2_FWNODE
>         help
>           This is a Video4Linux2 sensor driver for the Sony
> @@ -774,6 +778,7 @@ config VIDEO_OV7251
>  config VIDEO_OV772X
>         tristate "OmniVision OV772x sensor support"
>         depends on I2C && VIDEO_V4L2
> +       select REGMAP_I2C

So this isn't needed.

>         select REGMAP_SCCB
>         help
>           This is a Video4Linux2 sensor driver for the OmniVision
> @@ -804,6 +809,7 @@ config VIDEO_OV7670
>  config VIDEO_OV7740
>         tristate "OmniVision OV7740 sensor support"
>         depends on I2C && VIDEO_V4L2
> +       select REGMAP_I2C
>         help
>           This is a Video4Linux2 sensor driver for the OmniVision
>           OV7740 VGA camera sensor.
> @@ -829,6 +835,7 @@ config VIDEO_OV9640
>  config VIDEO_OV9650
>         tristate "OmniVision OV9650/OV9652 sensor support"
>         depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> +       select REGMAP_I2C

Nor this one.

>         select REGMAP_SCCB
>         help
>           This is a V4L2 sensor driver for the Omnivision

Could you send v2, please, removing those two?
Ian Kumlien Feb. 25, 2020, 7:56 a.m. UTC | #2
On Tue, Feb 25, 2020 at 8:51 AM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> Hi Ian,
>
> Thank you for the patch.
>
> On Mon, Feb 24, 2020 at 11:35:54PM +0100, Ian Kumlien wrote:
> > Hi,
> >
> > I got surprised by:
> > ld: drivers/media/i2c/tvp5150.o: in function `tvp5150_probe':
> > tvp5150.c:(.text+0x11ac): undefined reference to `__devm_regmap_init_i2c'
> > make: *** [Makefile:1078: vmlinux] Error 1
> >
> > When going from 5.5.2 -> 5.5.6
> >
> > A quick git grep shows that something like this might be needed, but
> > it should be verified.
> > I'm really uncertain about the ones that say REGMAP_SCCB...
>
> Those don't need REGMAP_I2C for they use SCCB.

I would have to read up, =)

> Please also do not send attachments; your mail is likely consumed by some
> list servers that way.

Ok

[..8<..]
> >           This is a Video4Linux2 sensor driver for the Sony
> > @@ -774,6 +778,7 @@ config VIDEO_OV7251
> >  config VIDEO_OV772X
> >         tristate "OmniVision OV772x sensor support"
> >         depends on I2C && VIDEO_V4L2
> > +       select REGMAP_I2C
>
> So this isn't needed.

Ok

> >         select REGMAP_SCCB
> >         help
> >           This is a Video4Linux2 sensor driver for the OmniVision
> > @@ -804,6 +809,7 @@ config VIDEO_OV7670
> >  config VIDEO_OV7740
> >         tristate "OmniVision OV7740 sensor support"
> >         depends on I2C && VIDEO_V4L2
> > +       select REGMAP_I2C
> >         help
> >           This is a Video4Linux2 sensor driver for the OmniVision
> >           OV7740 VGA camera sensor.
> > @@ -829,6 +835,7 @@ config VIDEO_OV9640
> >  config VIDEO_OV9650
> >         tristate "OmniVision OV9650/OV9652 sensor support"
> >         depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> > +       select REGMAP_I2C
>
> Nor this one.

Ok

> >         select REGMAP_SCCB
> >         help
> >           This is a V4L2 sensor driver for the Omnivision
>
> Could you send v2, please, removing those two?

Yep, like this one:

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index c68e002d26ea..1d1170de8c98 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -238,6 +238,7 @@ config VIDEO_ADV7604
        tristate "Analog Devices ADV7604 decoder"
        depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
        depends on GPIOLIB || COMPILE_TEST
+       select REGMAP_I2C
        select HDMI
        select V4L2_FWNODE
        help
@@ -379,6 +380,7 @@ config VIDEO_TVP5150
        tristate "Texas Instruments TVP5150 video decoder"
        depends on VIDEO_V4L2 && I2C
        select V4L2_FWNODE
+       select REGMAP_I2C
        help
          Support for the Texas Instruments TVP5150 video decoder.

@@ -584,6 +586,7 @@ config VIDEO_IMX214
        tristate "Sony IMX214 sensor support"
        depends on GPIOLIB && I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
        depends on V4L2_FWNODE
+       select REGMAP_I2C
        help
          This is a Video4Linux2 sensor driver for the Sony
          IMX214 camera.
@@ -612,6 +615,7 @@ config VIDEO_IMX274
 config VIDEO_IMX290
        tristate "Sony IMX290 sensor support"
        depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+       select REGMAP_I2C
        select V4L2_FWNODE
        help
          This is a Video4Linux2 sensor driver for the Sony
@@ -804,6 +808,7 @@ config VIDEO_OV7670
 config VIDEO_OV7740
        tristate "OmniVision OV7740 sensor support"
        depends on I2C && VIDEO_V4L2
+       select REGMAP_I2C
        help
          This is a Video4Linux2 sensor driver for the OmniVision
          OV7740 VGA camera sensor.
Sakari Ailus Feb. 25, 2020, 10:08 a.m. UTC | #3
On Tue, Feb 25, 2020 at 08:56:34AM +0100, Ian Kumlien wrote:
> On Tue, Feb 25, 2020 at 8:51 AM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> >
> > Hi Ian,
> >
> > Thank you for the patch.
> >
> > On Mon, Feb 24, 2020 at 11:35:54PM +0100, Ian Kumlien wrote:
> > > Hi,
> > >
> > > I got surprised by:
> > > ld: drivers/media/i2c/tvp5150.o: in function `tvp5150_probe':
> > > tvp5150.c:(.text+0x11ac): undefined reference to `__devm_regmap_init_i2c'
> > > make: *** [Makefile:1078: vmlinux] Error 1
> > >
> > > When going from 5.5.2 -> 5.5.6
> > >
> > > A quick git grep shows that something like this might be needed, but
> > > it should be verified.
> > > I'm really uncertain about the ones that say REGMAP_SCCB...
> >
> > Those don't need REGMAP_I2C for they use SCCB.
> 
> I would have to read up, =)
> 
> > Please also do not send attachments; your mail is likely consumed by some
> > list servers that way.
> 
> Ok
> 
> [..8<..]
> > >           This is a Video4Linux2 sensor driver for the Sony
> > > @@ -774,6 +778,7 @@ config VIDEO_OV7251
> > >  config VIDEO_OV772X
> > >         tristate "OmniVision OV772x sensor support"
> > >         depends on I2C && VIDEO_V4L2
> > > +       select REGMAP_I2C
> >
> > So this isn't needed.
> 
> Ok
> 
> > >         select REGMAP_SCCB
> > >         help
> > >           This is a Video4Linux2 sensor driver for the OmniVision
> > > @@ -804,6 +809,7 @@ config VIDEO_OV7670
> > >  config VIDEO_OV7740
> > >         tristate "OmniVision OV7740 sensor support"
> > >         depends on I2C && VIDEO_V4L2
> > > +       select REGMAP_I2C
> > >         help
> > >           This is a Video4Linux2 sensor driver for the OmniVision
> > >           OV7740 VGA camera sensor.
> > > @@ -829,6 +835,7 @@ config VIDEO_OV9640
> > >  config VIDEO_OV9650
> > >         tristate "OmniVision OV9650/OV9652 sensor support"
> > >         depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> > > +       select REGMAP_I2C
> >
> > Nor this one.
> 
> Ok
> 
> > >         select REGMAP_SCCB
> > >         help
> > >           This is a V4L2 sensor driver for the Omnivision
> >
> > Could you send v2, please, removing those two?
> 
> Yep, like this one:

Yes, like that one.

> 
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index c68e002d26ea..1d1170de8c98 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -238,6 +238,7 @@ config VIDEO_ADV7604
>         tristate "Analog Devices ADV7604 decoder"
>         depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
>         depends on GPIOLIB || COMPILE_TEST
> +       select REGMAP_I2C
>         select HDMI
>         select V4L2_FWNODE
>         help
> @@ -379,6 +380,7 @@ config VIDEO_TVP5150
>         tristate "Texas Instruments TVP5150 video decoder"
>         depends on VIDEO_V4L2 && I2C
>         select V4L2_FWNODE
> +       select REGMAP_I2C
>         help
>           Support for the Texas Instruments TVP5150 video decoder.
> 
> @@ -584,6 +586,7 @@ config VIDEO_IMX214
>         tristate "Sony IMX214 sensor support"
>         depends on GPIOLIB && I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
>         depends on V4L2_FWNODE
> +       select REGMAP_I2C
>         help
>           This is a Video4Linux2 sensor driver for the Sony
>           IMX214 camera.
> @@ -612,6 +615,7 @@ config VIDEO_IMX274
>  config VIDEO_IMX290
>         tristate "Sony IMX290 sensor support"
>         depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> +       select REGMAP_I2C
>         select V4L2_FWNODE
>         help
>           This is a Video4Linux2 sensor driver for the Sony
> @@ -804,6 +808,7 @@ config VIDEO_OV7670
>  config VIDEO_OV7740
>         tristate "OmniVision OV7740 sensor support"
>         depends on I2C && VIDEO_V4L2
> +       select REGMAP_I2C
>         help
>           This is a Video4Linux2 sensor driver for the OmniVision
>           OV7740 VGA camera sensor.
Ian Kumlien Feb. 25, 2020, 10:31 p.m. UTC | #4
On Tue, Feb 25, 2020 at 11:08 AM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> On Tue, Feb 25, 2020 at 08:56:34AM +0100, Ian Kumlien wrote:
> > On Tue, Feb 25, 2020 at 8:51 AM Sakari Ailus

[... 8< ..]

> > Yep, like this one:
>
> Yes, like that one.

Anything more you need from me? or is this it? ;)

> > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> > index c68e002d26ea..1d1170de8c98 100644
> > --- a/drivers/media/i2c/Kconfig
> > +++ b/drivers/media/i2c/Kconfig
> > @@ -238,6 +238,7 @@ config VIDEO_ADV7604
> >         tristate "Analog Devices ADV7604 decoder"
> >         depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
> >         depends on GPIOLIB || COMPILE_TEST
> > +       select REGMAP_I2C
> >         select HDMI
> >         select V4L2_FWNODE
> >         help
> > @@ -379,6 +380,7 @@ config VIDEO_TVP5150
> >         tristate "Texas Instruments TVP5150 video decoder"
> >         depends on VIDEO_V4L2 && I2C
> >         select V4L2_FWNODE
> > +       select REGMAP_I2C
> >         help
> >           Support for the Texas Instruments TVP5150 video decoder.
> >
> > @@ -584,6 +586,7 @@ config VIDEO_IMX214
> >         tristate "Sony IMX214 sensor support"
> >         depends on GPIOLIB && I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> >         depends on V4L2_FWNODE
> > +       select REGMAP_I2C
> >         help
> >           This is a Video4Linux2 sensor driver for the Sony
> >           IMX214 camera.
> > @@ -612,6 +615,7 @@ config VIDEO_IMX274
> >  config VIDEO_IMX290
> >         tristate "Sony IMX290 sensor support"
> >         depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> > +       select REGMAP_I2C
> >         select V4L2_FWNODE
> >         help
> >           This is a Video4Linux2 sensor driver for the Sony
> > @@ -804,6 +808,7 @@ config VIDEO_OV7670
> >  config VIDEO_OV7740
> >         tristate "OmniVision OV7740 sensor support"
> >         depends on I2C && VIDEO_V4L2
> > +       select REGMAP_I2C
> >         help
> >           This is a Video4Linux2 sensor driver for the OmniVision
> >           OV7740 VGA camera sensor.
>
> --
> Sakari Ailus
Sakari Ailus Feb. 26, 2020, 9:01 a.m. UTC | #5
Ian,

On Tue, Feb 25, 2020 at 11:31:01PM +0100, Ian Kumlien wrote:
> On Tue, Feb 25, 2020 at 11:08 AM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> >
> > On Tue, Feb 25, 2020 at 08:56:34AM +0100, Ian Kumlien wrote:
> > > On Tue, Feb 25, 2020 at 8:51 AM Sakari Ailus
> 
> [... 8< ..]
> 
> > > Yep, like this one:
> >
> > Yes, like that one.
> 
> Anything more you need from me? or is this it? ;)

Ah, I now notice you've perhaps sent the mail using a mail client that has
converted tabs to spaces, for instance. That makes the patch rather
difficult to apply. Some e-mail clients do that right, some do not. Often
copying and pasting the text from a terminal also does the unwanted
conversion.

Patches are best sent using git send-email; it's made for that purpose. If
you were already using git, you're quite close.

So in this case, I'd like to ask you to take the diff you sent in the
earlier e-mail, and send the resulting patch using git send-email so it can
be merged.

And, now that this is not really an RFC anymore, the subject prefix should
be "PATCH" instead of "RFC".

There's more documentation in Documentation/process/submitting-patches.rst
.
diff mbox series

Patch

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index c68e002d26ea..fc40c111f461 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -238,6 +238,7 @@  config VIDEO_ADV7604
 	tristate "Analog Devices ADV7604 decoder"
 	depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
 	depends on GPIOLIB || COMPILE_TEST
+	select REGMAP_I2C
 	select HDMI
 	select V4L2_FWNODE
 	help
@@ -379,6 +380,7 @@  config VIDEO_TVP5150
 	tristate "Texas Instruments TVP5150 video decoder"
 	depends on VIDEO_V4L2 && I2C
 	select V4L2_FWNODE
+	select REGMAP_I2C
 	help
 	  Support for the Texas Instruments TVP5150 video decoder.
 
@@ -584,6 +586,7 @@  config VIDEO_IMX214
 	tristate "Sony IMX214 sensor support"
 	depends on GPIOLIB && I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
 	depends on V4L2_FWNODE
+	select REGMAP_I2C
 	help
 	  This is a Video4Linux2 sensor driver for the Sony
 	  IMX214 camera.
@@ -612,6 +615,7 @@  config VIDEO_IMX274
 config VIDEO_IMX290
 	tristate "Sony IMX290 sensor support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	select REGMAP_I2C
 	select V4L2_FWNODE
 	help
 	  This is a Video4Linux2 sensor driver for the Sony
@@ -774,6 +778,7 @@  config VIDEO_OV7251
 config VIDEO_OV772X
 	tristate "OmniVision OV772x sensor support"
 	depends on I2C && VIDEO_V4L2
+	select REGMAP_I2C
 	select REGMAP_SCCB
 	help
 	  This is a Video4Linux2 sensor driver for the OmniVision
@@ -804,6 +809,7 @@  config VIDEO_OV7670
 config VIDEO_OV7740
 	tristate "OmniVision OV7740 sensor support"
 	depends on I2C && VIDEO_V4L2
+	select REGMAP_I2C
 	help
 	  This is a Video4Linux2 sensor driver for the OmniVision
 	  OV7740 VGA camera sensor.
@@ -829,6 +835,7 @@  config VIDEO_OV9640
 config VIDEO_OV9650
 	tristate "OmniVision OV9650/OV9652 sensor support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	select REGMAP_I2C
 	select REGMAP_SCCB
 	help
 	  This is a V4L2 sensor driver for the Omnivision