From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH v4 2/2] input: sun4i-ts: Add support for temperature sensor Date: Wed, 14 May 2014 11:41:42 -0700 Message-ID: <20140514184142.GG30089@core.coreip.homeip.net> References: <1399795586-18919-1-git-send-email-hdegoede@redhat.com> <1399795586-18919-3-git-send-email-hdegoede@redhat.com> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: List-Post: , List-Help: , List-Archive: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline To: Chen-Yu Tsai Cc: linux-sunxi , Maxime Ripard , linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LM Sensors , linux-arm-kernel , devicetree , Hans de Goede List-Id: devicetree@vger.kernel.org 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 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