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
2121 #include <linux/mutex.h>
2222 #include <linux/delay.h>
2323
24−#include <linux/platform_data/ads1015.h>
25−
2624 #include <linux/iio/iio.h>
2725 #include <linux/iio/types.h>
2826 #include <linux/iio/sysfs.h>
@@ -33,6 +31,8 @@ · 4 unmodified lines
3331
3432 #define ADS1015_DRV_NAME "ads1015"
3533
34+#define ADS1015_CHANNELS 8
35+
3636 #define ADS1015_CONV_REG 0x00
3737 #define ADS1015_CFG_REG 0x01
3838 #define ADS1015_LO_THRESH_REG 0x02
@@ -219,6 +219,12 @@ static const struct iio_event_spec ads1015_events[] = { · 180 unmodified lines
219219 .datasheet_name = "AIN"#_chan"-AIN"#_chan2, \
220220 }
221221
222+struct ads1015_channel_data {
223+ bool enabled;
224+ unsigned int pga;
225+ unsigned int data_rate;
226+};
227+
222228 struct ads1015_thresh_data {
223229 unsigned int comp_queue;
224230 int high_thresh;
@@ -903,14 +909,6 @@ static void ads1015_get_channels_config(struct i2c_client *client) · 678 unmodified lines
903909
904910 struct iio_dev *indio_dev = i2c_get_clientdata(client);
905911 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− }
914912
915913 #ifdef CONFIG_OF
916914 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
443443 header-test- += linux/platform_data/ad7887.h
444444 header-test- += linux/platform_data/adau17x1.h
445445 header-test- += linux/platform_data/adp8870.h
446−header-test- += linux/platform_data/ads1015.h
447446 header-test- += linux/platform_data/ads7828.h
448447 header-test- += linux/platform_data/apds990x.h
449448 header-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−
13−struct ads1015_channel_data {
14− bool enabled;
15− unsigned int pga;
16− unsigned int data_rate;
17−};
18−
19−struct 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