diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-08-29 06:19:32 +0800 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-23 22:04:32 +0100 |
commit | f16177c20c42e1bd780b35259a995f7718986dd4 (patch) | |
tree | 9da7910f1d41178ad0d4d112d5389253d8622201 /drivers/hwmon | |
parent | 55b951e7e6b9f983286c40925e340124d79bb0f7 (diff) | |
download | kernel_samsung_crespo-f16177c20c42e1bd780b35259a995f7718986dd4.zip kernel_samsung_crespo-f16177c20c42e1bd780b35259a995f7718986dd4.tar.gz kernel_samsung_crespo-f16177c20c42e1bd780b35259a995f7718986dd4.tar.bz2 |
hwmon: add max1111_read_channel() for use by sharpsl_pm
This is not generic, and is added here for backward compatibility.
It is made an individual commit here to make it easier for revert
once the sharpsl_pm gets generic enough.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/max1111.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 12c0577..bfaa665 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c @@ -66,6 +66,16 @@ static int max1111_read(struct device *dev, int channel) return (v1 << 2) | (v2 >> 6); } +#ifdef CONFIG_SHARPSL_PM +static struct max1111_data *the_max1111; + +int max1111_read_channel(int channel) +{ + return max1111_read(&the_max1111->spi->dev, channel); +} +EXPORT_SYMBOL(max1111_read_channel); +#endif + /* * NOTE: SPI devices do not have a default 'name' attribute, which is * likely to be used by hwmon applications to distinguish between @@ -181,6 +191,9 @@ static int __devinit max1111_probe(struct spi_device *spi) goto err_remove; } +#ifdef CONFIG_SHARPSL_PM + the_max1111 = data; +#endif return 0; err_remove: |