History

iio: adc: ti-ads1015: Get rid of legacy platform data

Platform data is a legacy interface to supply device properties to the driver. In this case we even don't have in-kernel users for it. Just remove it for good.

Andy Shevchenko committed 6 years ago

Commit 0cd9ff11 parent 32bd4323 files · +8 −34Browse files

Unified · Split

3 files
  1. drivers/iio/adc/ti-ads1015.c +8 −10
  2. include/Kbuild +0 −1
  3. include/linux/platform_data/ads1015.h +0 −23
drivers/iio/adc/ti-ads1015.c+8−10
@@ -21,8 +21,6 @@ · 20 unmodified lines
21#include <linux/mutex.h>21#include <linux/mutex.h>
22#include <linux/delay.h>22#include <linux/delay.h>
23 23
24#include <linux/platform_data/ads1015.h>
25
26#include <linux/iio/iio.h>24#include <linux/iio/iio.h>
27#include <linux/iio/types.h>25#include <linux/iio/types.h>
28#include <linux/iio/sysfs.h>26#include <linux/iio/sysfs.h>
@@ -33,6 +31,8 @@ · 4 unmodified lines
33 31
34#define ADS1015_DRV_NAME "ads1015"32#define ADS1015_DRV_NAME "ads1015"
35 33
34#define ADS1015_CHANNELS 8
35
36#define ADS1015_CONV_REG 0x0036#define ADS1015_CONV_REG 0x00
37#define ADS1015_CFG_REG 0x0137#define ADS1015_CFG_REG 0x01
38#define ADS1015_LO_THRESH_REG 0x0238#define ADS1015_LO_THRESH_REG 0x02
@@ -219,6 +219,12 @@ static const struct iio_event_spec ads1015_events[] = { · 180 unmodified lines
219 .datasheet_name = "AIN"#_chan"-AIN"#_chan2, \219 .datasheet_name = "AIN"#_chan"-AIN"#_chan2, \
220}220}
221 221
222struct ads1015_channel_data {
223 bool enabled;
224 unsigned int pga;
225 unsigned int data_rate;
226};
227
222struct ads1015_thresh_data {228struct ads1015_thresh_data {
223 unsigned int comp_queue;229 unsigned int comp_queue;
224 int high_thresh;230 int high_thresh;
@@ -903,14 +909,6 @@ static void ads1015_get_channels_config(struct i2c_client *client) · 678 unmodified lines
903 909
904 struct iio_dev *indio_dev = i2c_get_clientdata(client);910 struct iio_dev *indio_dev = i2c_get_clientdata(client);
905 struct ads1015_data *data = iio_priv(indio_dev);911 struct ads1015_data *data = iio_priv(indio_dev);
906 struct ads1015_platform_data *pdata = dev_get_platdata(&client->dev);
907
908 /* prefer platform data */
909 if (pdata) {
910 memcpy(data->channel_data, pdata->channel_data,
911 sizeof(data->channel_data));
912 return;
913 }
914 912
915#ifdef CONFIG_OF913#ifdef CONFIG_OF
916 if (!ads1015_get_channels_config_of(client))914 if (!ads1015_get_channels_config_of(client))
include/Kbuild+0−1
@@ -443,7 +443,6 @@ header-test- += linux/platform_data/ad7793.h · 442 unmodified lines
443header-test- += linux/platform_data/ad7887.h443header-test- += linux/platform_data/ad7887.h
444header-test- += linux/platform_data/adau17x1.h444header-test- += linux/platform_data/adau17x1.h
445header-test- += linux/platform_data/adp8870.h445header-test- += linux/platform_data/adp8870.h
446header-test- += linux/platform_data/ads1015.h
447header-test- += linux/platform_data/ads7828.h446header-test- += linux/platform_data/ads7828.h
448header-test- += linux/platform_data/apds990x.h447header-test- += linux/platform_data/apds990x.h
449header-test- += linux/platform_data/arm-ux500-pm.h448header-test- += linux/platform_data/arm-ux500-pm.h
include/linux/platform_data/ads1015.h+0−23
@@ -1,23 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Platform Data for ADS1015 12-bit 4-input ADC
4 * (C) Copyright 2010
5 * Dirk Eibach, Guntermann & Drunck GmbH <eibach@gdsys.de>
6 */
7
8#ifndef LINUX_ADS1015_H
9#define LINUX_ADS1015_H
10
11#define ADS1015_CHANNELS 8
12
13struct ads1015_channel_data {
14 bool enabled;
15 unsigned int pga;
16 unsigned int data_rate;
17};
18
19struct ads1015_platform_data {
20 struct ads1015_channel_data channel_data[ADS1015_CHANNELS];
21};
22
23#endif /* LINUX_ADS1015_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t