Skip to content

Commit 631598c

Browse files
Bartosz Golaszewskijic23
authored andcommitted
iio: dac: ad5449: drop support for platform data
There are no longer any users of the platform data struct. Remove support for it from the driver. Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 31c022a commit 631598c

File tree

2 files changed

+2
-52
lines changed

2 files changed

+2
-52
lines changed

drivers/iio/dac/ad5449.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include <linux/iio/iio.h>
2121
#include <linux/iio/sysfs.h>
2222

23-
#include <linux/platform_data/ad5449.h>
24-
2523
#define AD5449_MAX_CHANNELS 2
2624
#define AD5449_MAX_VREFS 2
2725

@@ -268,7 +266,6 @@ static const char *ad5449_vref_name(struct ad5449 *st, int n)
268266

269267
static int ad5449_spi_probe(struct spi_device *spi)
270268
{
271-
struct ad5449_platform_data *pdata = spi->dev.platform_data;
272269
const struct spi_device_id *id = spi_get_device_id(spi);
273270
struct iio_dev *indio_dev;
274271
struct ad5449 *st;
@@ -306,16 +303,8 @@ static int ad5449_spi_probe(struct spi_device *spi)
306303
mutex_init(&st->lock);
307304

308305
if (st->chip_info->has_ctrl) {
309-
unsigned int ctrl = 0x00;
310-
if (pdata) {
311-
if (pdata->hardware_clear_to_midscale)
312-
ctrl |= AD5449_CTRL_HCLR_TO_MIDSCALE;
313-
ctrl |= pdata->sdo_mode << AD5449_CTRL_SDO_OFFSET;
314-
st->has_sdo = pdata->sdo_mode != AD5449_SDO_DISABLED;
315-
} else {
316-
st->has_sdo = true;
317-
}
318-
ad5449_write(indio_dev, AD5449_CMD_CTRL, ctrl);
306+
st->has_sdo = true;
307+
ad5449_write(indio_dev, AD5449_CMD_CTRL, 0x0);
319308
}
320309

321310
ret = iio_device_register(indio_dev);

include/linux/platform_data/ad5449.h

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)