From: kernel test robot <lkp@intel.com>
To: Werner Sembach <wse@tuxedocomputers.com>,
Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Werner Sembach <wse@tuxedocomputers.com>,
linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: rgb: Implement per-key keyboard backlight for several TUXEDO devices
Date: Mon, 16 Oct 2023 19:21:11 +0800 [thread overview]
Message-ID: <202310161944.966gHsq4-lkp@intel.com> (raw)
In-Reply-To: <20231011190017.1230898-1-wse@tuxedocomputers.com>
Hi Werner,
kernel test robot noticed the following build errors:
[auto build test ERROR on lee-leds/for-leds-next]
[also build test ERROR on linus/master v6.6-rc6 next-20231016]
[cannot apply to pavel-leds/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Werner-Sembach/leds-rgb-Implement-per-key-keyboard-backlight-for-several-TUXEDO-devices/20231012-030206
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
patch link: https://lore.kernel.org/r/20231011190017.1230898-1-wse%40tuxedocomputers.com
patch subject: [PATCH] leds: rgb: Implement per-key keyboard backlight for several TUXEDO devices
config: x86_64-randconfig-122-20231016 (https://download.01.org/0day-ci/archive/20231016/202310161944.966gHsq4-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231016/202310161944.966gHsq4-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/oe-kbuild-all/202310161944.966gHsq4-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: vmlinux.o: in function `leds_tuxedo_ite8291_hid_feature_report_set':
>> drivers/leds/rgb/leds-tuxedo-ite8291.c:89: undefined reference to `hid_hw_raw_request'
ld: vmlinux.o: in function `leds_tuxedo_ite8291_write_row':
>> drivers/leds/rgb/leds-tuxedo-ite8291.c:130: undefined reference to `hid_hw_output_report'
ld: vmlinux.o: in function `hid_parse':
>> include/linux/hid.h:1091: undefined reference to `hid_open_report'
ld: vmlinux.o: in function `leds_tuxedo_ite8291_start_hw':
>> drivers/leds/rgb/leds-tuxedo-ite8291.c:186: undefined reference to `hid_hw_start'
>> ld: drivers/leds/rgb/leds-tuxedo-ite8291.c:194: undefined reference to `hid_hw_open'
>> ld: drivers/leds/rgb/leds-tuxedo-ite8291.c:203: undefined reference to `hid_hw_stop'
>> ld: drivers/leds/rgb/leds-tuxedo-ite8291.c:203: undefined reference to `hid_hw_stop'
ld: vmlinux.o: in function `leds_tuxedo_ite8291_stop_hw':
>> drivers/leds/rgb/leds-tuxedo-ite8291.c:210: undefined reference to `hid_hw_close'
ld: drivers/leds/rgb/leds-tuxedo-ite8291.c:212: undefined reference to `hid_hw_stop'
ld: vmlinux.o: in function `leds_tuxedo_ite8291_init':
>> drivers/leds/rgb/leds-tuxedo-ite8291.c:447: undefined reference to `__hid_register_driver'
ld: vmlinux.o: in function `leds_tuxedo_ite8291_exit':
>> drivers/leds/rgb/leds-tuxedo-ite8291.c:447: undefined reference to `hid_unregister_driver'
vim +89 drivers/leds/rgb/leds-tuxedo-ite8291.c
77
78 /**
79 * Just a generic helper function to reduce boilerplate code
80 */
81 static int leds_tuxedo_ite8291_hid_feature_report_set(struct hid_device *hdev, u8 *data, size_t len)
82 {
83 int result;
84 u8 *buf;
85
86 buf = kmemdup(data, len, GFP_KERNEL);
87 if (!buf)
88 return -ENOMEM;
> 89 result = hid_hw_raw_request(hdev, buf[0], buf, len, HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
90 kfree(buf);
91
92 return result;
93 }
94
95 /**
96 * Update brightness of the whole keyboard. Only used for initialization as this doesn't allow per
97 * key brightness control. That is implemented with RGB value scaling.
98 */
99 static int leds_tuxedo_ite8291_write_brightness(struct hid_device *hdev, u8 brightness)
100 {
101 int result;
102 u8 brightness_capped = brightness > LEDS_TUXEDO_ITE8291_GLOBAL_BRIGHTNESS_MAX ?
103 LEDS_TUXEDO_ITE8291_GLOBAL_BRIGHTNESS_MAX : brightness;
104 u8 ctrl_set_brightness[8] = {0x08, 0x02, LEDS_TUXEDO_ITE8291_PARAM_MODE_USER, 0x00,
105 brightness_capped, 0x00, 0x00, 0x00};
106
107 result = leds_tuxedo_ite8291_hid_feature_report_set(hdev, ctrl_set_brightness,
108 sizeof(ctrl_set_brightness));
109 if (result < 0)
110 return result;
111
112 return 0;
113 }
114
115 /**
116 * Update color of a singular row from row_data. This is the smallest unit this device allows to
117 * write. Changes are applied when the last row (row_index == 5) is written.
118 */
119 static int leds_tuxedo_ite8291_write_row(struct hid_device *hdev, row_data_t row_data,
120 int row_index)
121 {
122 int result;
123 u8 ctrl_announce_row_data[8] = {0x16, 0x00, row_index, 0x00, 0x00, 0x00, 0x00, 0x00};
124
125 result = leds_tuxedo_ite8291_hid_feature_report_set(hdev, ctrl_announce_row_data,
126 sizeof(ctrl_announce_row_data));
127 if (result < 0)
128 return result;
129
> 130 result = hid_hw_output_report(hdev, row_data[row_index], sizeof(row_data[row_index]));
131 if (result < 0)
132 return result;
133
134 return 0;
135 }
136
137 /**
138 * Write color and brightness to the whole keyboard from row data. Note that per key brightness is
139 * encoded in the RGB values of the row_data and the gobal brightness is a fixed value.
140 */
141 static int leds_tuxedo_ite8291_write_all(struct hid_device *hdev, row_data_t row_data)
142 {
143 int result, row_index;
144
145 if (hdev == NULL)
146 return -ENODEV;
147
148 result = leds_tuxedo_ite8291_write_brightness(hdev,
149 LEDS_TUXEDO_ITE8291_GLOBAL_BRIGHTNESS_DEFAULT);
150 if (result < 0)
151 return result;
152
153 for (row_index = 0; row_index < LEDS_TUXEDO_ITE8291_ROWS; ++row_index) {
154 result = leds_tuxedo_ite8291_write_row(hdev, row_data, row_index);
155 if (result < 0)
156 return result;
157 }
158
159 return 0;
160 }
161
162 static int leds_tuxedo_ite8291_write_state(struct hid_device *hdev)
163 {
164 struct leds_tuxedo_ite8291_driver_data_t *driver_data = hid_get_drvdata(hdev);
165
166 return leds_tuxedo_ite8291_write_all(hdev, driver_data->row_data);
167 }
168
169 static int leds_tuxedo_ite8291_write_off(struct hid_device *hdev)
170 {
171 int result;
172 u8 ctrl_write_off[8] = {0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
173
174 result = leds_tuxedo_ite8291_hid_feature_report_set(hdev, ctrl_write_off,
175 sizeof(ctrl_write_off));
176 if (result < 0)
177 return result;
178
179 return 0;
180 }
181
182 static int leds_tuxedo_ite8291_start_hw(struct hid_device *hdev)
183 {
184 int result;
185
> 186 result = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
187 if (result < 0)
188 goto err_start;
189
190 result = hid_hw_power(hdev, PM_HINT_FULLON);
191 if (result < 0)
192 goto err_power;
193
> 194 result = hid_hw_open(hdev);
195 if (result)
196 goto err_open;
197
198 return 0;
199
200 err_open:
201 hid_hw_power(hdev, PM_HINT_NORMAL);
202 err_power:
> 203 hid_hw_stop(hdev);
204 err_start:
205 return result;
206 }
207
208 static void leds_tuxedo_ite8291_stop_hw(struct hid_device *hdev)
209 {
> 210 hid_hw_close(hdev);
211 hid_hw_power(hdev, PM_HINT_NORMAL);
212 hid_hw_stop(hdev);
213 }
214
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2023-10-16 11:21 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 19:00 [PATCH] leds: rgb: Implement per-key keyboard backlight for several TUXEDO devices Werner Sembach
2023-10-11 19:21 ` Werner Sembach
2023-10-12 8:58 ` Pavel Machek
2023-10-12 10:02 ` Werner Sembach
2023-10-12 14:05 ` Pavel Machek
2023-10-12 16:35 ` Werner Sembach
2023-10-13 12:19 ` Pavel Machek
2023-10-13 14:38 ` Werner Sembach
2023-10-13 14:54 ` Implement per-key keyboard backlight as auxdisplay? Werner Sembach
2023-10-13 19:56 ` Pavel Machek
2023-10-13 20:03 ` Pavel Machek
2023-10-16 10:57 ` Miguel Ojeda
2023-10-23 11:40 ` Jani Nikula
2023-10-23 11:44 ` Miguel Ojeda
2023-11-20 20:53 ` Pavel Machek
2023-11-20 20:52 ` Pavel Machek
2023-11-21 11:33 ` Werner Sembach
2023-11-21 12:20 ` Hans de Goede
2023-11-21 13:29 ` Werner Sembach
2023-11-22 18:34 ` Hans de Goede
2023-11-27 10:59 ` Werner Sembach
2023-12-29 19:13 ` Werner Sembach
2024-01-17 15:26 ` Hans de Goede
2024-01-17 16:50 ` Userspace API for per key backlight for non HID (no hidraw) keyboards Hans de Goede
2024-01-17 19:03 ` Armin Wolf
2024-01-18 0:58 ` Werner Sembach
2024-01-18 17:45 ` Implement per-key keyboard backlight as auxdisplay? Pavel Machek
2024-01-18 22:32 ` Werner Sembach
2024-01-19 8:44 ` Hans de Goede
2024-01-19 10:51 ` Jani Nikula
2024-01-19 16:06 ` Werner Sembach
2024-01-19 18:33 ` Dmitry Torokhov
2024-01-19 22:14 ` Pavel Machek
2024-01-23 16:51 ` Werner Sembach
2024-01-19 16:04 ` Werner Sembach
2024-01-29 13:24 ` Hans de Goede
2024-01-30 11:12 ` Werner Sembach
2024-01-30 17:10 ` Hans de Goede
2024-01-30 18:09 ` Werner Sembach
2024-01-30 18:35 ` Hans de Goede
2024-01-30 19:08 ` Werner Sembach
2024-01-30 19:46 ` Hans de Goede
2024-01-31 11:41 ` Future handling of complex RGB devices on Linux Werner Sembach
2024-01-31 15:52 ` Roderick Colenbrander
2024-02-21 11:12 ` Future handling of complex RGB devices on Linux v2 Werner Sembach
2024-02-21 22:17 ` Pavel Machek
2024-02-22 9:04 ` Pekka Paalanen
2024-02-22 17:38 ` Pavel Machek
2024-02-23 8:53 ` Pekka Paalanen
2024-07-23 20:40 ` Keybaords with arrays of RGB LEDs was " Pavel Machek
2024-02-23 9:21 ` Thomas Zimmermann
2024-02-22 10:46 ` Hans de Goede
2024-02-22 11:38 ` Gregor Riepl
2024-02-22 12:39 ` Hans de Goede
2024-02-22 13:14 ` Future handling of complex RGB devices on Linux v3 Werner Sembach
2024-03-18 11:11 ` Hans de Goede
2024-03-19 15:18 ` Werner Sembach
2024-03-25 14:18 ` Hans de Goede
2024-03-25 17:01 ` Werner Sembach
2024-03-20 11:16 ` Werner Sembach
2024-03-20 11:33 ` Werner Sembach
2024-03-20 18:45 ` Werner Sembach
2024-03-25 14:25 ` In kernel virtual HID devices (was Future handling of complex RGB devices on Linux v3) Hans de Goede
2024-03-25 15:56 ` Benjamin Tissoires
2024-03-25 16:48 ` Werner Sembach
2024-03-25 18:30 ` Hans de Goede
2024-03-26 7:57 ` Werner Sembach
2024-03-26 15:39 ` Benjamin Tissoires
2024-03-26 16:57 ` Werner Sembach
2024-03-27 11:03 ` Benjamin Tissoires
2024-03-28 23:52 ` Werner Sembach
2024-03-27 11:01 ` Hans de Goede
2024-07-24 17:36 ` Pavel Machek
2024-07-24 21:08 ` Werner Sembach
2024-03-25 18:38 ` Miguel Ojeda
2024-04-09 13:33 ` Andy Shevchenko
2024-02-22 17:42 ` Future handling of complex RGB devices on Linux v2 Pavel Machek
2024-02-22 17:52 ` Pavel Machek
2024-02-22 17:23 ` Pavel Machek
2024-02-23 8:33 ` Werner Sembach
2024-01-19 20:15 ` Implement per-key keyboard backlight as auxdisplay? Pavel Machek
2024-01-19 20:22 ` Werner Sembach
2024-01-19 20:32 ` Pavel Machek
2024-01-29 13:24 ` Hans de Goede
2023-10-12 13:00 ` [PATCH] leds: rgb: Implement per-key keyboard backlight for several TUXEDO devices kernel test robot
2023-10-16 11:21 ` kernel test robot [this message]
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=202310161944.966gHsq4-lkp@intel.com \
--to=lkp@intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pavel@ucw.cz \
--cc=wse@tuxedocomputers.com \
/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;
as well as URLs for NNTP newsgroup(s).