summaryrefslogtreecommitdiff
path: root/include/linux/w1.h
diff options
context:
space:
mode:
authorJaghathiswari Rankappagounder Natarajan <jaghu@google.com>2017-08-31 02:34:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-31 19:50:14 +0300
commit2eb7954809bf26de27bc3a2fea4eef606bbf4482 (patch)
tree7558e99f62aaedec768c2bf4138c08bbe01df78f /include/linux/w1.h
parentdb15d73e5f0ea8e9b2c2be31dea45205257eb5fd (diff)
downloadlinux-2eb7954809bf26de27bc3a2fea4eef606bbf4482.tar.xz
drivers: w1: add hwmon support structures
This patch has changes to w1.h/w1.c generic files to add (optional) hwmon support structures. Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/w1.h')
-rw-r--r--include/linux/w1.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/w1.h b/include/linux/w1.h
index 90cbe7e65059..5b2972946dda 100644
--- a/include/linux/w1.h
+++ b/include/linux/w1.h
@@ -68,6 +68,7 @@ struct w1_reg_num {
* @family: module for device family type
* @family_data: pointer for use by the family module
* @dev: kernel device identifier
+ * @hwmon: pointer to hwmon device
*
*/
struct w1_slave {
@@ -83,6 +84,7 @@ struct w1_slave {
struct w1_family *family;
void *family_data;
struct device dev;
+ struct device *hwmon;
};
typedef void (*w1_slave_found_callback)(struct w1_master *, u64);
@@ -250,11 +252,13 @@ void w1_remove_master_device(struct w1_bus_master *master);
* @add_slave: add_slave
* @remove_slave: remove_slave
* @groups: sysfs group
+ * @chip_info: pointer to struct hwmon_chip_info
*/
struct w1_family_ops {
int (*add_slave)(struct w1_slave *sl);
void (*remove_slave)(struct w1_slave *sl);
const struct attribute_group **groups;
+ const struct hwmon_chip_info *chip_info;
};
/**