| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * IIO driver for the light sensor ISL29028. |
|---|
| 3 | 4 | * ISL29028 is Concurrent Ambient Light and Proximity Sensor |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. |
|---|
| 6 | 7 | * Copyright (c) 2016-2017 Brian Masney <masneyb@onstation.org> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 10 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 13 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 14 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 15 | | - * more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 19 | 8 | * |
|---|
| 20 | 9 | * Datasheets: |
|---|
| 21 | 10 | * - http://www.intersil.com/content/dam/Intersil/documents/isl2/isl29028.pdf |
|---|
| .. | .. |
|---|
| 631 | 620 | indio_dev->channels = isl29028_channels; |
|---|
| 632 | 621 | indio_dev->num_channels = ARRAY_SIZE(isl29028_channels); |
|---|
| 633 | 622 | indio_dev->name = id->name; |
|---|
| 634 | | - indio_dev->dev.parent = &client->dev; |
|---|
| 635 | 623 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 636 | 624 | |
|---|
| 637 | 625 | pm_runtime_enable(&client->dev); |
|---|
| .. | .. |
|---|
| 639 | 627 | ISL29028_POWER_OFF_DELAY_MS); |
|---|
| 640 | 628 | pm_runtime_use_autosuspend(&client->dev); |
|---|
| 641 | 629 | |
|---|
| 642 | | - ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev); |
|---|
| 630 | + ret = iio_device_register(indio_dev); |
|---|
| 643 | 631 | if (ret < 0) { |
|---|
| 644 | 632 | dev_err(&client->dev, |
|---|
| 645 | 633 | "%s(): iio registration failed with error %d\n", |
|---|