* drivers/platform/arm64/lenovo-thinkpad-x13s.c:270:6: error: call to undeclared function 'irq_get_trigger_type'; ISO C99 and later do not support implicit function declarations
@ 2026-10-03 14:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-03 14:33 UTC (permalink / raw)
To: Alex Robinson; +Cc: llvm, oe-kbuild-all, 0day robot
tree: https://github.com/intel-lab-lkp/linux/commits/Alex-Robinson/dt-bindings-embedded-controller-Add-Lenovo-ThinkPad-X13s-EC/20261002-154256
head: 31d99095c99452ff8bd0dc3779fe4bff05f1ca41
commit: f38ab266d6f88b87e52532298f9a17a54bfb1f5b platform: arm64: Add Lenovo ThinkPad X13s EC driver
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20261003/202610031348.b9RoGfPS-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5f609f950d2e80addf5566623013db68394334db)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261003/202610031348.b9RoGfPS-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202610031348.b9RoGfPS-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/platform/arm64/lenovo-thinkpad-x13s.c:270:6: error: call to undeclared function 'irq_get_trigger_type'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
270 | if (irq_get_trigger_type(client->irq) != IRQ_TYPE_EDGE_FALLING)
| ^
>> drivers/platform/arm64/lenovo-thinkpad-x13s.c:270:43: error: use of undeclared identifier 'IRQ_TYPE_EDGE_FALLING'
270 | if (irq_get_trigger_type(client->irq) != IRQ_TYPE_EDGE_FALLING)
| ^~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/irq_get_trigger_type +270 drivers/platform/arm64/lenovo-thinkpad-x13s.c
f38ab266d6f88b Alex Robinson 2026-10-02 259
f38ab266d6f88b Alex Robinson 2026-10-02 260 static int x13s_probe(struct i2c_client *client)
f38ab266d6f88b Alex Robinson 2026-10-02 261 {
f38ab266d6f88b Alex Robinson 2026-10-02 262 struct device *dev = &client->dev;
f38ab266d6f88b Alex Robinson 2026-10-02 263 struct x13s_ec *ec;
f38ab266d6f88b Alex Robinson 2026-10-02 264 int ret;
f38ab266d6f88b Alex Robinson 2026-10-02 265
f38ab266d6f88b Alex Robinson 2026-10-02 266 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
f38ab266d6f88b Alex Robinson 2026-10-02 267 return -EOPNOTSUPP;
f38ab266d6f88b Alex Robinson 2026-10-02 268 if (client->irq <= 0)
f38ab266d6f88b Alex Robinson 2026-10-02 269 return dev_err_probe(dev, -EINVAL, "Missing event IRQ\n");
f38ab266d6f88b Alex Robinson 2026-10-02 @270 if (irq_get_trigger_type(client->irq) != IRQ_TYPE_EDGE_FALLING)
f38ab266d6f88b Alex Robinson 2026-10-02 271 return dev_err_probe(dev, -EINVAL, "Expected falling-edge IRQ\n");
f38ab266d6f88b Alex Robinson 2026-10-02 272
f38ab266d6f88b Alex Robinson 2026-10-02 273 ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL);
f38ab266d6f88b Alex Robinson 2026-10-02 274 if (!ec)
f38ab266d6f88b Alex Robinson 2026-10-02 275 return -ENOMEM;
f38ab266d6f88b Alex Robinson 2026-10-02 276 ec->client = client;
f38ab266d6f88b Alex Robinson 2026-10-02 277 ret = devm_mutex_init(dev, &ec->lock);
f38ab266d6f88b Alex Robinson 2026-10-02 278 if (ret)
f38ab266d6f88b Alex Robinson 2026-10-02 279 return ret;
f38ab266d6f88b Alex Robinson 2026-10-02 280 i2c_set_clientdata(client, ec);
f38ab266d6f88b Alex Robinson 2026-10-02 281
f38ab266d6f88b Alex Robinson 2026-10-02 282 ec->power_state = devm_gpiod_get(dev, "power-state", GPIOD_OUT_HIGH);
f38ab266d6f88b Alex Robinson 2026-10-02 283 if (IS_ERR(ec->power_state)) {
f38ab266d6f88b Alex Robinson 2026-10-02 284 return dev_err_probe(dev, PTR_ERR(ec->power_state),
f38ab266d6f88b Alex Robinson 2026-10-02 285 "Failed to acquire power-state GPIO high\n");
f38ab266d6f88b Alex Robinson 2026-10-02 286 }
f38ab266d6f88b Alex Robinson 2026-10-02 287
f38ab266d6f88b Alex Robinson 2026-10-02 288 ec->led.name = "platform::kbd_backlight";
f38ab266d6f88b Alex Robinson 2026-10-02 289 ec->led.max_brightness = 2;
f38ab266d6f88b Alex Robinson 2026-10-02 290 ec->led.flags = LED_BRIGHT_HW_CHANGED | LED_RETAIN_AT_SHUTDOWN;
f38ab266d6f88b Alex Robinson 2026-10-02 291 ec->led.brightness_get = x13s_brightness_get;
f38ab266d6f88b Alex Robinson 2026-10-02 292 ec->led.brightness_set_blocking = x13s_brightness_set;
f38ab266d6f88b Alex Robinson 2026-10-02 293 ret = devm_led_classdev_register(dev, &ec->led);
f38ab266d6f88b Alex Robinson 2026-10-02 294 if (ret)
f38ab266d6f88b Alex Robinson 2026-10-02 295 return dev_err_probe(dev, ret, "Failed to register keyboard backlight\n");
f38ab266d6f88b Alex Robinson 2026-10-02 296
f38ab266d6f88b Alex Robinson 2026-10-02 297 /* Devres synchronizes the IRQ before unregistering the LED. */
f38ab266d6f88b Alex Robinson 2026-10-02 298 ret = devm_request_threaded_irq(dev, client->irq, NULL, x13s_irq,
f38ab266d6f88b Alex Robinson 2026-10-02 299 IRQF_ONESHOT, dev_name(dev), ec);
f38ab266d6f88b Alex Robinson 2026-10-02 300 if (ret)
f38ab266d6f88b Alex Robinson 2026-10-02 301 return dev_err_probe(dev, ret, "Failed to request event IRQ\n");
f38ab266d6f88b Alex Robinson 2026-10-02 302
f38ab266d6f88b Alex Robinson 2026-10-02 303 /*
f38ab266d6f88b Alex Robinson 2026-10-02 304 * As on the T14s, disable wakeup by default since selective EC event
f38ab266d6f88b Alex Robinson 2026-10-02 305 * masking is not known. Keep runtime IRQ handling enabled.
f38ab266d6f88b Alex Robinson 2026-10-02 306 */
f38ab266d6f88b Alex Robinson 2026-10-02 307 device_wakeup_disable(dev);
f38ab266d6f88b Alex Robinson 2026-10-02 308
f38ab266d6f88b Alex Robinson 2026-10-02 309 return 0;
f38ab266d6f88b Alex Robinson 2026-10-02 310 }
f38ab266d6f88b Alex Robinson 2026-10-02 311
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-03 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03 14:33 drivers/platform/arm64/lenovo-thinkpad-x13s.c:270:6: error: call to undeclared function 'irq_get_trigger_type'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox