hwmon.c (b2a4cc3a060da0de17ab1e854cef89f5e74e2064) hwmon.c (848ba0a2f20dc121a3ef5272a24641d2bd963d8b)
1/*
2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
3 *
4 * This file defines the sysfs class "hwmon", for use by sensors drivers.
5 *
6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 645 unchanged lines hidden (view full) ---

654}
655EXPORT_SYMBOL_GPL(hwmon_device_register_with_groups);
656
657/**
658 * hwmon_device_register_with_info - register w/ hwmon
659 * @dev: the parent device
660 * @name: hwmon name attribute
661 * @drvdata: driver data to attach to created device
1/*
2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
3 *
4 * This file defines the sysfs class "hwmon", for use by sensors drivers.
5 *
6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 645 unchanged lines hidden (view full) ---

654}
655EXPORT_SYMBOL_GPL(hwmon_device_register_with_groups);
656
657/**
658 * hwmon_device_register_with_info - register w/ hwmon
659 * @dev: the parent device
660 * @name: hwmon name attribute
661 * @drvdata: driver data to attach to created device
662 * @info: Pointer to hwmon chip information
663 * @groups - pointer to list of driver specific attribute groups
662 * @info: pointer to hwmon chip information
663 * @extra_groups: pointer to list of additional non-standard attribute groups
664 *
665 * hwmon_device_unregister() must be called when the device is no
666 * longer needed.
667 *
668 * Returns the pointer to the new device.
669 */
670struct device *
671hwmon_device_register_with_info(struct device *dev, const char *name,
672 void *drvdata,
673 const struct hwmon_chip_info *chip,
664 *
665 * hwmon_device_unregister() must be called when the device is no
666 * longer needed.
667 *
668 * Returns the pointer to the new device.
669 */
670struct device *
671hwmon_device_register_with_info(struct device *dev, const char *name,
672 void *drvdata,
673 const struct hwmon_chip_info *chip,
674 const struct attribute_group **groups)
674 const struct attribute_group **extra_groups)
675{
676 if (chip && (!chip->ops || !chip->ops->is_visible || !chip->info))
677 return ERR_PTR(-EINVAL);
678
675{
676 if (chip && (!chip->ops || !chip->ops->is_visible || !chip->info))
677 return ERR_PTR(-EINVAL);
678
679 return __hwmon_device_register(dev, name, drvdata, chip, groups);
679 return __hwmon_device_register(dev, name, drvdata, chip, extra_groups);
680}
681EXPORT_SYMBOL_GPL(hwmon_device_register_with_info);
682
683/**
684 * hwmon_device_register - register w/ hwmon
685 * @dev: the device to register
686 *
687 * hwmon_device_unregister() must be called when the device is no

--- 190 unchanged lines hidden ---
680}
681EXPORT_SYMBOL_GPL(hwmon_device_register_with_info);
682
683/**
684 * hwmon_device_register - register w/ hwmon
685 * @dev: the device to register
686 *
687 * hwmon_device_unregister() must be called when the device is no

--- 190 unchanged lines hidden ---