.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2014 Intel Corporation |
---|
3 | 4 | * |
---|
4 | 5 | * Driver for Semtech's SX9500 capacitive proximity/button solution. |
---|
5 | 6 | * Datasheet available at |
---|
6 | 7 | * <http://www.semtech.com/images/datasheet/sx9500.pdf>. |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify it |
---|
9 | | - * under the terms of the GNU General Public License version 2 as published by |
---|
10 | | - * the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/kernel.h> |
---|
.. | .. |
---|
678 | 675 | return IRQ_HANDLED; |
---|
679 | 676 | } |
---|
680 | 677 | |
---|
681 | | -static int sx9500_buffer_preenable(struct iio_dev *indio_dev) |
---|
| 678 | +static int sx9500_buffer_postenable(struct iio_dev *indio_dev) |
---|
682 | 679 | { |
---|
683 | 680 | struct sx9500_data *data = iio_priv(indio_dev); |
---|
684 | 681 | int ret = 0, i; |
---|
.. | .. |
---|
707 | 704 | struct sx9500_data *data = iio_priv(indio_dev); |
---|
708 | 705 | int ret = 0, i; |
---|
709 | 706 | |
---|
710 | | - iio_triggered_buffer_predisable(indio_dev); |
---|
711 | | - |
---|
712 | 707 | mutex_lock(&data->mutex); |
---|
713 | 708 | |
---|
714 | 709 | for (i = 0; i < SX9500_NUM_CHANNELS; i++) |
---|
.. | .. |
---|
729 | 724 | } |
---|
730 | 725 | |
---|
731 | 726 | static const struct iio_buffer_setup_ops sx9500_buffer_setup_ops = { |
---|
732 | | - .preenable = sx9500_buffer_preenable, |
---|
733 | | - .postenable = iio_triggered_buffer_postenable, |
---|
| 727 | + .postenable = sx9500_buffer_postenable, |
---|
734 | 728 | .predisable = sx9500_buffer_predisable, |
---|
735 | 729 | }; |
---|
736 | 730 | |
---|
.. | .. |
---|
928 | 922 | if (IS_ERR(data->regmap)) |
---|
929 | 923 | return PTR_ERR(data->regmap); |
---|
930 | 924 | |
---|
931 | | - indio_dev->dev.parent = &client->dev; |
---|
932 | 925 | indio_dev->name = SX9500_DRIVER_NAME; |
---|
933 | 926 | indio_dev->channels = sx9500_channels; |
---|
934 | 927 | indio_dev->num_channels = ARRAY_SIZE(sx9500_channels); |
---|