Re: drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer'
From: Linus Walleij
Date: Thu Oct 03 2024 - 10:21:18 EST
On Thu, Oct 3, 2024 at 1:49 PM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> On Wed, Oct 02, 2024 at 03:37:56PM +0200, Linus Walleij wrote:
> > On Wed, Oct 2, 2024 at 11:31 AM Dmitry Torokhov
> > <dmitry.torokhov@xxxxxxxxx> wrote:
> >
> > > > drivers/input/touchscreen/cyttsp_i2c.c:118:26: warning: 'cyttsp_i2c_driver' defined but not used [-Wunused-variable]
> > > > 118 | static struct i2c_driver cyttsp_i2c_driver = {
> > > > | ^~~~~~~~~~~~~~~~~
> > > > cc1: some warnings being treated as errors
> > > >
> > >
> > > This is really weird: cyttsp_i2c.h includes linux/i2c.h, it has
> > > dependency in Kconfig on I2C and CONFIG_I2C is present in the .config
> > > referenced above, so all the declarations should be there.
> >
> > I usually ask Arnd about all kind of Kconfig business when
> > things get weird.
> >
> > But could it be one of these awful things:
> >
> > config TOUCHSCREEN_CYTTSP_I2C
> > tristate "support I2C bus connection"
> > - depends on TOUCHSCREEN_CYTTSP_CORE && I2C
> > + depends on TOUCHSCREEN_CYTTSP_CORE && (I2C=y ||
> > I2C=TOUCHSCREEN_CYTTSP_CORE)
> >
> > Since I2C is tristate it could be a module and then this touchscreen
> > has to be a module too.
>
> "depends" should handle this and force touchscreen be a module if I2C is
> a module. Also in the provided config I2C is built-in...
Hm yeah I'm lost too :/
Linus