Re: [PATCH] driver: input :touchscreen : add Raydium I2C touch driver

From: Dmitry Torokhov
Date: Wed Jan 13 2016 - 03:31:17 EST


Jeffrey,

On Tue, Jan 12, 2016 at 11:49 PM, Jeffrey Lin <yajohn@xxxxxxxxx> wrote:
> This patch is porting Raydium I2C touch driver. Developer can enable raydium touch driver by modifying define
> "CONFIG_TOUCHSCREEN_RM_TS".
>
> Signed-off-by: jeffrey.lin<jeffrey.lin@xxxxxxxxxx>
> ---
> drivers/input/touchscreen/Kconfig | 12 +
> drivers/input/touchscreen/Makefile | 1 +
> drivers/input/touchscreen/rm31100_ts.c | 772 +++++++++++++++++++++++++++++++++
> 3 files changed, 785 insertions(+)
> create mode 100644 drivers/input/touchscreen/rm31100_ts.c

Thank you for sending the full patch. Unfortunately it does not even compile:

dtor@dtor-ws:~/kernel/work$ make drivers/input/touchscreen/rm31100_ts.o
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC [M] drivers/input/touchscreen/rm31100_ts.o
drivers/input/touchscreen/rm31100_ts.c: In function ârm_fw_version_showâ:
drivers/input/touchscreen/rm31100_ts.c:190:7: error: request for
member âu8_versionâ in something not a structure or union
info.u8_version,
^
drivers/input/touchscreen/rm31100_ts.c:191:7: error: request for
member âu8_sub_versionâ in something not a structure or union
info.u8_sub_version);
^
drivers/input/touchscreen/rm31100_ts.c: In function ârm_ts_power_onâ:
drivers/input/touchscreen/rm31100_ts.c:304:2: error: implicit
declaration of function âregulator_enableâ
[-Werror=implicit-function-declaration]
error = regulator_enable(ts->avdd);
^
drivers/input/touchscreen/rm31100_ts.c:317:3: error: implicit
declaration of function âregulator_disableâ
[-Werror=implicit-function-declaration]
regulator_disable(ts->dvdd);
^
drivers/input/touchscreen/rm31100_ts.c: In function ârm31100_ts_suspendâ:
drivers/input/touchscreen/rm31100_ts.c:392:6: warning: unused variable
ârcâ [-Wunused-variable]
int rc = 0;
^
drivers/input/touchscreen/rm31100_ts.c: In function ârm31100_ts_probeâ:
drivers/input/touchscreen/rm31100_ts.c:581:2: error: implicit
declaration of function âdevm_regulator_getâ
[-Werror=implicit-function-declaration]
ts->avdd = devm_regulator_get(&client->dev, "avdd");
^
drivers/input/touchscreen/rm31100_ts.c:581:11: warning: assignment
makes pointer from integer without a cast [enabled by default]
ts->avdd = devm_regulator_get(&client->dev, "avdd");
^
drivers/input/touchscreen/rm31100_ts.c:591:11: warning: assignment
makes pointer from integer without a cast [enabled by default]
ts->dvdd = devm_regulator_get(&client->dev, "dvdd");
^
drivers/input/touchscreen/rm31100_ts.c:601:2: error: too few arguments
to function âdevm_gpiod_getâ
ts->resout_gpio = devm_gpiod_get(&client->dev, "rm31100_resout_gpio");
^
In file included from drivers/input/touchscreen/rm31100_ts.c:31:0:
include/linux/gpio/consumer.h:73:32: note: declared here
struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
^
drivers/input/touchscreen/rm31100_ts.c:664:61: error: âerrâ undeclared
(first use in this function)
dev_err(&client->dev, "%s crated failed, %d\n", __func__, err);
^
drivers/input/touchscreen/rm31100_ts.c:664:61: note: each undeclared
identifier is reported only once for each function it appears in
drivers/input/touchscreen/rm31100_ts.c: In function ârm31100_ts_initâ:
drivers/input/touchscreen/rm31100_ts.c:754:4: error:
âdriver_attr_myAttrâ undeclared (first use in this function)
&driver_attr_myAttr);
^
drivers/input/touchscreen/rm31100_ts.c: At top level:
drivers/input/touchscreen/rm31100_ts.c:172:12: warning:
ârm31100_ts_writeâ defined but not used [-Wunused-function]
static int rm31100_ts_write(struct i2c_client *client, u8 *buf, int num)
^
drivers/input/touchscreen/rm31100_ts.c: In function ârm_fw_version_showâ:
drivers/input/touchscreen/rm31100_ts.c:192:1: warning: control reaches
end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
make[1]: *** [drivers/input/touchscreen/rm31100_ts.o] Error 1
make: *** [drivers/input/touchscreen/rm31100_ts.o] Error 2
dtor@dtor-ws:~/kernel/work$

Please next time submit version that you actually tested.

Thank you.

--
Dmitry