|
@@ -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:
|