mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Stefan Agner <stefan@agner.ch>
Cc: kbuild-all@01.org, dmitry.torokhov@gmail.com,
	michael.hennerich@analog.com, robh+dt@kernel.org,
	mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, realmz6@gmail.com, broonie@kernel.org,
	jic23@kernel.org, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stefan Agner <stefan@agner.ch>
Subject: Re: [PATCH 3/3] input: touchscreen: ad7879: add device tree support
Date: Tue, 26 Jan 2016 11:57:18 +0800	[thread overview]
Message-ID: <201601261103.85YAbd2z%fengguang.wu@intel.com> (raw)
In-Reply-To: <1453777477-29706-3-git-send-email-stefan@agner.ch>

[-- Attachment #1: Type: text/plain, Size: 6282 bytes --]

Hi Stefan,

[auto build test ERROR on input/next]
[also build test ERROR on v4.5-rc1 next-20160125]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Stefan-Agner/input-touchscreen-ad7879-move-header-to-input-subdirectory/20160126-110813
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: x86_64-randconfig-s4-01261112 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   In file included from drivers/input/touchscreen/ad7879-i2c.c:11:0:
>> drivers/input/touchscreen/ad7879-i2c.c:151:25: error: 'st1232_ts_dt_ids' undeclared here (not in a function)
    MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
                            ^
   include/linux/module.h:223:21: note: in definition of macro 'MODULE_DEVICE_TABLE'
    extern const typeof(name) __mod_##type##__##name##_device_table  \
                        ^
>> include/linux/module.h:223:27: error: '__mod_of__st1232_ts_dt_ids_device_table' aliased to undefined symbol 'st1232_ts_dt_ids'
    extern const typeof(name) __mod_##type##__##name##_device_table  \
                              ^
>> drivers/input/touchscreen/ad7879-i2c.c:151:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
    MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
    ^

vim +/st1232_ts_dt_ids +151 drivers/input/touchscreen/ad7879-i2c.c

     5	 *
     6	 * Licensed under the GPL-2 or later.
     7	 */
     8	
     9	#include <linux/input.h>	/* BUS_I2C */
    10	#include <linux/i2c.h>
  > 11	#include <linux/module.h>
    12	#include <linux/types.h>
    13	#include <linux/pm.h>
    14	#include <linux/input/ad7879.h>
    15	
    16	#include "ad7879.h"
    17	
    18	#define AD7879_DEVID		0x79	/* AD7879-1/AD7889-1 */
    19	
    20	/* All registers are word-sized.
    21	 * AD7879 uses a high-byte first convention.
    22	 */
    23	static int ad7879_i2c_read(struct device *dev, u8 reg)
    24	{
    25		struct i2c_client *client = to_i2c_client(dev);
    26	
    27		return i2c_smbus_read_word_swapped(client, reg);
    28	}
    29	
    30	static int ad7879_i2c_multi_read(struct device *dev,
    31					 u8 first_reg, u8 count, u16 *buf)
    32	{
    33		struct i2c_client *client = to_i2c_client(dev);
    34		u8 idx;
    35	
    36		i2c_smbus_read_i2c_block_data(client, first_reg, count * 2, (u8 *)buf);
    37	
    38		for (idx = 0; idx < count; ++idx)
    39			buf[idx] = swab16(buf[idx]);
    40	
    41		return 0;
    42	}
    43	
    44	static int ad7879_i2c_write(struct device *dev, u8 reg, u16 val)
    45	{
    46		struct i2c_client *client = to_i2c_client(dev);
    47	
    48		return i2c_smbus_write_word_swapped(client, reg, val);
    49	}
    50	
    51	static const struct ad7879_bus_ops ad7879_i2c_bus_ops = {
    52		.bustype	= BUS_I2C,
    53		.read		= ad7879_i2c_read,
    54		.multi_read	= ad7879_i2c_multi_read,
    55		.write		= ad7879_i2c_write,
    56	};
    57	
    58	static struct ad7879_platform_data *ad7879_parse_dt(struct device *dev)
    59	{
    60		struct ad7879_platform_data *pdata;
    61		struct device_node *np = dev->of_node;
    62		int err;
    63		u32 tmp;
    64	
    65		if (!np)
    66			return NULL;
    67	
    68		pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
    69	
    70		if (!pdata)
    71			return ERR_PTR(-ENOMEM);
    72	
    73		err = of_property_read_u32(np, "resistance-plate-x", &tmp);
    74		if (err) {
    75			dev_err(dev, "failed to get resistance-plate-x property\n");
    76			return ERR_PTR(err);
    77		}
    78		pdata->x_plate_ohms = (u16)tmp;
    79	
    80		err = of_property_read_u32(np, "touchscreen-max-pressure", &tmp);
    81		if (err) {
    82			dev_err(dev, "failed to get touchscreen-max-pressure property\n");
    83			return ERR_PTR(err);
    84		}
    85		pdata->pressure_min = (u16)tmp;
    86	
    87		of_property_read_u8(np, "first-conversion-delay", &pdata->first_conversion_delay);
    88		of_property_read_u8(np, "acquisition-time", &pdata->acquisition_time);
    89		of_property_read_u8(np, "median-filter-size", &pdata->median);
    90		of_property_read_u8(np, "averaging", &pdata->averaging);
    91		of_property_read_u8(np, "conversion-interval", &pdata->pen_down_acc_interval);
    92	
    93		pdata->swap_xy = of_property_read_bool(np, "touchscreen-swapped-x-y");
    94	
    95		return pdata;
    96	}
    97	
    98	static int ad7879_i2c_probe(struct i2c_client *client,
    99					      const struct i2c_device_id *id)
   100	{
   101		struct ad7879_platform_data *pdata;
   102		struct ad7879 *ts;
   103	
   104		if (!i2c_check_functionality(client->adapter,
   105					     I2C_FUNC_SMBUS_WORD_DATA)) {
   106			dev_err(&client->dev, "SMBUS Word Data not Supported\n");
   107			return -EIO;
   108		}
   109	
   110		pdata = dev_get_platdata(&client->dev);
   111	
   112		if (!pdata && IS_ENABLED(CONFIG_OF))
   113			pdata = ad7879_parse_dt(&client->dev);
   114	
   115		if (IS_ERR_OR_NULL(pdata)) {
   116			dev_err(&client->dev, "Need platform data\n");
   117			return PTR_ERR(pdata);
   118		}
   119	
   120		ts = ad7879_probe(&client->dev, AD7879_DEVID, client->irq, pdata,
   121				  &ad7879_i2c_bus_ops);
   122		if (IS_ERR(ts))
   123			return PTR_ERR(ts);
   124	
   125		i2c_set_clientdata(client, ts);
   126	
   127		return 0;
   128	}
   129	
   130	static int ad7879_i2c_remove(struct i2c_client *client)
   131	{
   132		struct ad7879 *ts = i2c_get_clientdata(client);
   133	
   134		ad7879_remove(ts);
   135	
   136		return 0;
   137	}
   138	
   139	static const struct i2c_device_id ad7879_id[] = {
   140		{ "ad7879", 0 },
   141		{ "ad7889", 0 },
   142		{ }
   143	};
   144	MODULE_DEVICE_TABLE(i2c, ad7879_id);
   145	
   146	#ifdef CONFIG_OF
   147	static const struct of_device_id ad7879_dt_ids[] = {
   148		{ .compatible = "adi,ad7879-1", },
   149		{ }
   150	};
 > 151	MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
   152	#endif
   153	
   154	static struct i2c_driver ad7879_i2c_driver = {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 23964 bytes --]

  parent reply	other threads:[~2016-01-26  3:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26  3:04 [PATCH 1/3] input: touchscreen: ad7879: move header to input subdirectory Stefan Agner
2016-01-26  3:04 ` [PATCH 2/3] input: touchscreen: ad7879: fix default x/y axis assignment Stefan Agner
2016-01-26  7:58   ` Michael Hennerich
2016-01-26 17:04     ` Stefan Agner
2016-01-27 23:40       ` Dmitry Torokhov
2016-01-26  3:04 ` [PATCH 3/3] input: touchscreen: ad7879: add device tree support Stefan Agner
2016-01-26  3:28   ` kbuild test robot
2016-01-26  3:57   ` kbuild test robot [this message]
2016-01-26  4:50   ` kbuild test robot
2016-01-26  8:14   ` Michael Hennerich
2016-01-26 17:10     ` Stefan Agner
2016-01-27 23:38   ` Dmitry Torokhov
2016-01-29  3:00   ` Rob Herring
2016-01-27 23:35 ` [PATCH 1/3] input: touchscreen: ad7879: move header to input subdirectory Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201601261103.85YAbd2z%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michael.hennerich@analog.com \
    --cc=realmz6@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®