| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | |
|---|
| 9 | 6 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 171 | 168 | rmi_get_platform_data(fn->rmi_dev); |
|---|
| 172 | 169 | int error; |
|---|
| 173 | 170 | |
|---|
| 174 | | - /* can happen if f30_data.disable is set */ |
|---|
| 171 | + /* can happen if gpio_data.disable is set */ |
|---|
| 175 | 172 | if (!f30) |
|---|
| 176 | 173 | return 0; |
|---|
| 177 | 174 | |
|---|
| 178 | | - if (pdata->f30_data.trackstick_buttons) { |
|---|
| 175 | + if (pdata->gpio_data.trackstick_buttons) { |
|---|
| 179 | 176 | /* Try [re-]establish link to F03. */ |
|---|
| 180 | 177 | f30->f03 = rmi_find_function(fn->rmi_dev, 0x03); |
|---|
| 181 | 178 | f30->trackstick_buttons = f30->f03 != NULL; |
|---|
| 182 | 179 | } |
|---|
| 183 | 180 | |
|---|
| 184 | | - if (pdata->f30_data.disable) { |
|---|
| 181 | + if (pdata->gpio_data.disable) { |
|---|
| 185 | 182 | drv->clear_irq_bits(fn->rmi_dev, fn->irq_mask); |
|---|
| 186 | 183 | } else { |
|---|
| 187 | 184 | /* Write Control Register values back to device */ |
|---|
| .. | .. |
|---|
| 248 | 245 | if (!rmi_f30_is_valid_button(i, f30->ctrl)) |
|---|
| 249 | 246 | continue; |
|---|
| 250 | 247 | |
|---|
| 251 | | - if (pdata->f30_data.trackstick_buttons && |
|---|
| 248 | + if (pdata->gpio_data.trackstick_buttons && |
|---|
| 252 | 249 | i >= TRACKSTICK_RANGE_START && i < TRACKSTICK_RANGE_END) { |
|---|
| 253 | 250 | 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) { |
|---|
| 255 | 252 | f30->gpioled_key_map[i] = button; |
|---|
| 256 | 253 | input_set_capability(input, EV_KEY, button++); |
|---|
| 257 | 254 | button_mapped = true; |
|---|
| .. | .. |
|---|
| 267 | 264 | * but I am not sure, so use only the pdata info and the number of |
|---|
| 268 | 265 | * mapped buttons. |
|---|
| 269 | 266 | */ |
|---|
| 270 | | - if (pdata->f30_data.buttonpad || (button - BTN_LEFT == 1)) |
|---|
| 267 | + if (pdata->gpio_data.buttonpad || (button - BTN_LEFT == 1)) |
|---|
| 271 | 268 | __set_bit(INPUT_PROP_BUTTONPAD, input->propbit); |
|---|
| 272 | 269 | |
|---|
| 273 | 270 | return 0; |
|---|
| .. | .. |
|---|
| 375 | 372 | struct f30_data *f30; |
|---|
| 376 | 373 | int error; |
|---|
| 377 | 374 | |
|---|
| 378 | | - if (pdata->f30_data.disable) |
|---|
| 375 | + if (pdata->gpio_data.disable) |
|---|
| 379 | 376 | return 0; |
|---|
| 380 | 377 | |
|---|
| 381 | 378 | if (!drv_data->input) { |
|---|