Commit a4a21414 authored by Brian Masney's avatar Brian Masney Committed by Jonathan Cameron

staging: iio: tsl2x7x: remove power functions from tsl2X7X_platform_data

The tsl2X7X_platform_data structure contains the platform_power,
power_on, and power_off function pointers. These power management
functions should not be in the platform data. These functions were
likely used before the regulator framework was put in place. There are
no users of these functions in the mainline kernel.
Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 9dd6ec17
...@@ -588,9 +588,6 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev) ...@@ -588,9 +588,6 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
struct tsl2X7X_chip *chip = iio_priv(indio_dev); struct tsl2X7X_chip *chip = iio_priv(indio_dev);
u8 reg_val = 0; u8 reg_val = 0;
if (chip->pdata && chip->pdata->power_on)
chip->pdata->power_on(indio_dev);
/* Non calculated parameters */ /* Non calculated parameters */
chip->tsl2x7x_config[TSL2X7X_PRX_TIME] = chip->settings.prx_time; chip->tsl2x7x_config[TSL2X7X_PRX_TIME] = chip->settings.prx_time;
chip->tsl2x7x_config[TSL2X7X_WAIT_TIME] = chip->settings.wait_time; chip->tsl2x7x_config[TSL2X7X_WAIT_TIME] = chip->settings.wait_time;
...@@ -736,9 +733,6 @@ static int tsl2x7x_chip_off(struct iio_dev *indio_dev) ...@@ -736,9 +733,6 @@ static int tsl2x7x_chip_off(struct iio_dev *indio_dev)
ret = i2c_smbus_write_byte_data(chip->client, ret = i2c_smbus_write_byte_data(chip->client,
TSL2X7X_CMD_REG | TSL2X7X_CNTRL, 0x00); TSL2X7X_CMD_REG | TSL2X7X_CNTRL, 0x00);
if (chip->pdata && chip->pdata->power_off)
chip->pdata->power_off(chip->client);
return ret; return ret;
} }
...@@ -1792,12 +1786,6 @@ static int tsl2x7x_suspend(struct device *dev) ...@@ -1792,12 +1786,6 @@ static int tsl2x7x_suspend(struct device *dev)
chip->tsl2x7x_chip_status = TSL2X7X_CHIP_SUSPENDED; chip->tsl2x7x_chip_status = TSL2X7X_CHIP_SUSPENDED;
} }
if (chip->pdata && chip->pdata->platform_power) {
pm_message_t pmm = {PM_EVENT_SUSPEND};
chip->pdata->platform_power(dev, pmm);
}
return ret; return ret;
} }
...@@ -1807,12 +1795,6 @@ static int tsl2x7x_resume(struct device *dev) ...@@ -1807,12 +1795,6 @@ static int tsl2x7x_resume(struct device *dev)
struct tsl2X7X_chip *chip = iio_priv(indio_dev); struct tsl2X7X_chip *chip = iio_priv(indio_dev);
int ret = 0; int ret = 0;
if (chip->pdata && chip->pdata->platform_power) {
pm_message_t pmm = {PM_EVENT_RESUME};
chip->pdata->platform_power(dev, pmm);
}
if (chip->tsl2x7x_chip_status == TSL2X7X_CHIP_SUSPENDED) if (chip->tsl2x7x_chip_status == TSL2X7X_CHIP_SUSPENDED)
ret = tsl2x7x_chip_on(indio_dev); ret = tsl2x7x_chip_on(indio_dev);
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#ifndef __TSL2X7X_H #ifndef __TSL2X7X_H
#define __TSL2X7X_H #define __TSL2X7X_H
#include <linux/pm.h>
struct tsl2x7x_lux { struct tsl2x7x_lux {
unsigned int ratio; unsigned int ratio;
...@@ -91,9 +90,6 @@ struct tsl2x7x_settings { ...@@ -91,9 +90,6 @@ struct tsl2x7x_settings {
* *
*/ */
struct tsl2X7X_platform_data { struct tsl2X7X_platform_data {
int (*platform_power)(struct device *dev, pm_message_t);
int (*power_on)(struct iio_dev *indio_dev);
int (*power_off)(struct i2c_client *dev);
struct tsl2x7x_lux platform_lux_table[TSL2X7X_MAX_LUX_TABLE_SIZE]; struct tsl2x7x_lux platform_lux_table[TSL2X7X_MAX_LUX_TABLE_SIZE];
struct tsl2x7x_settings *platform_default_settings; struct tsl2x7x_settings *platform_default_settings;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment