.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * OnKey device driver for DA9063, DA9062 and DA9061 PMICs |
---|
3 | 4 | * Copyright (C) 2015 Dialog Semiconductor Ltd. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License |
---|
7 | | - * as published by the Free Software Foundation; either version 2 |
---|
8 | | - * of the License, or (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | 5 | */ |
---|
15 | 6 | |
---|
16 | 7 | #include <linux/module.h> |
---|
.. | .. |
---|
22 | 13 | #include <linux/regmap.h> |
---|
23 | 14 | #include <linux/of.h> |
---|
24 | 15 | #include <linux/mfd/da9063/core.h> |
---|
25 | | -#include <linux/mfd/da9063/pdata.h> |
---|
26 | 16 | #include <linux/mfd/da9063/registers.h> |
---|
27 | 17 | #include <linux/mfd/da9062/core.h> |
---|
28 | 18 | #include <linux/mfd/da9062/registers.h> |
---|
.. | .. |
---|
201 | 191 | |
---|
202 | 192 | static int da9063_onkey_probe(struct platform_device *pdev) |
---|
203 | 193 | { |
---|
204 | | - struct da9063 *da9063 = dev_get_drvdata(pdev->dev.parent); |
---|
205 | | - struct da9063_pdata *pdata = dev_get_platdata(da9063->dev); |
---|
206 | 194 | struct da9063_onkey *onkey; |
---|
207 | 195 | const struct of_device_id *match; |
---|
208 | 196 | int irq; |
---|
.. | .. |
---|
229 | 217 | return -ENXIO; |
---|
230 | 218 | } |
---|
231 | 219 | |
---|
232 | | - if (pdata) |
---|
233 | | - onkey->key_power = pdata->key_power; |
---|
234 | | - else |
---|
235 | | - onkey->key_power = |
---|
236 | | - !of_property_read_bool(pdev->dev.of_node, |
---|
237 | | - "dlg,disable-key-power"); |
---|
| 220 | + onkey->key_power = !of_property_read_bool(pdev->dev.of_node, |
---|
| 221 | + "dlg,disable-key-power"); |
---|
238 | 222 | |
---|
239 | 223 | onkey->input = devm_input_allocate_device(&pdev->dev); |
---|
240 | 224 | if (!onkey->input) { |
---|
.. | .. |
---|
261 | 245 | } |
---|
262 | 246 | |
---|
263 | 247 | irq = platform_get_irq_byname(pdev, "ONKEY"); |
---|
264 | | - if (irq < 0) { |
---|
265 | | - error = irq; |
---|
266 | | - dev_err(&pdev->dev, "Failed to get platform IRQ: %d\n", error); |
---|
267 | | - return error; |
---|
268 | | - } |
---|
| 248 | + if (irq < 0) |
---|
| 249 | + return irq; |
---|
269 | 250 | |
---|
270 | 251 | error = devm_request_threaded_irq(&pdev->dev, irq, |
---|
271 | 252 | NULL, da9063_onkey_irq_handler, |
---|