[linux-sunxi] [PATCH v4 2/2] input: sun4i-ts: Add support for temperature sensor

Dmitry Torokhov dmitry.torokhov at gmail.com
Wed May 14 11:41:42 PDT 2014


On Mon, May 12, 2014 at 04:44:51PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Sun, May 11, 2014 at 4:06 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> > @@ -232,14 +284,39 @@ static int sun4i_ts_probe(struct platform_device *pdev)
> >         writel(STYLUS_UP_DEBOUN(5) | STYLUS_UP_DEBOUN_EN(1) | TP_MODE_EN(1),
> >                ts->base + TP_CTRL1);
> >
> > -       ret = input_register_device(ts->input);
> > -       if (ret)
> > -               return ret;
> > +       hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
> > +                                                      ts, sun4i_ts_groups);
> 
> This fails to compile when HWMON is not selected:
> 
> drivers/built-in.o: In function `sun4i_ts_probe':
> /home/wens/cubieboard/linux/drivers/input/touchscreen/sun4i-ts.c:287:
> undefined reference to `devm_hwmon_device_register_with_groups'
> 
> Best do a wrapper around the hwmon related code.
> drivers/input/touchscreen/ads7846.c has something similar, albeit for voltage.

I added dependency on HWMON and applied, thank you.

-- 
Dmitry



More information about the linux-arm-kernel mailing list