hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/input/rmi4/rmi_f30.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2012-2016 Synaptics Incorporated
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License version 2 as published by
6
- * the Free Software Foundation.
74 */
85
96 #include <linux/kernel.h>
....@@ -171,17 +168,17 @@
171168 rmi_get_platform_data(fn->rmi_dev);
172169 int error;
173170
174
- /* can happen if f30_data.disable is set */
171
+ /* can happen if gpio_data.disable is set */
175172 if (!f30)
176173 return 0;
177174
178
- if (pdata->f30_data.trackstick_buttons) {
175
+ if (pdata->gpio_data.trackstick_buttons) {
179176 /* Try [re-]establish link to F03. */
180177 f30->f03 = rmi_find_function(fn->rmi_dev, 0x03);
181178 f30->trackstick_buttons = f30->f03 != NULL;
182179 }
183180
184
- if (pdata->f30_data.disable) {
181
+ if (pdata->gpio_data.disable) {
185182 drv->clear_irq_bits(fn->rmi_dev, fn->irq_mask);
186183 } else {
187184 /* Write Control Register values back to device */
....@@ -248,10 +245,10 @@
248245 if (!rmi_f30_is_valid_button(i, f30->ctrl))
249246 continue;
250247
251
- if (pdata->f30_data.trackstick_buttons &&
248
+ if (pdata->gpio_data.trackstick_buttons &&
252249 i >= TRACKSTICK_RANGE_START && i < TRACKSTICK_RANGE_END) {
253250 f30->gpioled_key_map[i] = trackstick_button++;
254
- } else if (!pdata->f30_data.buttonpad || !button_mapped) {
251
+ } else if (!pdata->gpio_data.buttonpad || !button_mapped) {
255252 f30->gpioled_key_map[i] = button;
256253 input_set_capability(input, EV_KEY, button++);
257254 button_mapped = true;
....@@ -267,7 +264,7 @@
267264 * but I am not sure, so use only the pdata info and the number of
268265 * mapped buttons.
269266 */
270
- if (pdata->f30_data.buttonpad || (button - BTN_LEFT == 1))
267
+ if (pdata->gpio_data.buttonpad || (button - BTN_LEFT == 1))
271268 __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
272269
273270 return 0;
....@@ -375,7 +372,7 @@
375372 struct f30_data *f30;
376373 int error;
377374
378
- if (pdata->f30_data.disable)
375
+ if (pdata->gpio_data.disable)
379376 return 0;
380377
381378 if (!drv_data->input) {