Age | Commit message (Collapse) | Author | Files | Lines |
|
Add support for the new samples attributes to the hwmon core.
Cc: Krzysztof Adamski <[email protected]>
Cc: Nicolin Chen <[email protected]>
Acked-by: Nicolin Chen <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
It takes a fair amount of boiler plate code to add new sensors, add a
macro that can be used to specify simple static sensors.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
According to hwmon ABI, in%d_enable is a sysfs interface that
allows user space to enable and disable the input sensor. So
this patch just simply adds the attribute to the list.
Signed-off-by: Nicolin Chen <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
HWMON device names are not allowed to contain "-* \t\n". Add a helper
which will return true if passed an invalid character. It can be used
to massage a string into a hwmon compatible name by replacing invalid
characters with '_'.
Signed-off-by: Andrew Lunn <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Some sensors support reporting minimal and lower critical power, as
well as alarms when these thresholds are reached. Add support for
these attributes to the hwmon core.
Signed-off-by: Andrew Lunn <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
The enum hwmon_temp_lcrit_alarm exists, but the BIT definition is
missing.
Signed-off-by: Andrew Lunn <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
It's useful to know the maximum types of sensor supported by hwmon
framework. It can be used to allocate some data structures when sorting
the monitors based on their type.
This will be used by scmi hwmon support.
Cc: [email protected]
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
|
|
The read_string callback is supposed to retrieve a pointer to a
constant string.
Signed-off-by: Jean Delvare <[email protected]>
Reviewed-by: Peter Huewe <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Unfortunately the HWMON_T_ALARM define was missing,
although the associated entry was present in hwmon_temp_attributes.
This is needed to convert drivers to the new interface which use channel
based alarms.
Signed-off-by: Peter Huewe <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The 'groups' parameter of hwmon_device_register_with_info() and
devm_hwmon_device_register_with_info() is only necessary if extra
non-standard attributes need to be provided. Rename the parameter
to extra_groups and clarify the documentation.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Inform the user that hwmon_device_register() is deprecated,
and suggest conversion to the newest API. Also remove
hwmon_device_register() from the kernel API documentation.
Note that hwmon_device_register() is not marked as __deprecated()
since doing so might result in build errors.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The new API is so far only suited for data attributes and does not work
well for string attributes, specifically for the 'label' attributes.
Provide a separate callback function for those.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The callback descrption in hwmon.h was misleading and stated that read and
write callbacks would be optional. More accurate is is that the callbacks
are mandatory if readable / writeable attributes are present.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Add basic pwm attribute support (no auto attributes) to new API.
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Acked-by: Punit Agrawal <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Acked-by: Punit Agrawal <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Acked-by: Punit Agrawal <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Acked-by: Punit Agrawal <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Acked-by: Punit Agrawal <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Up to now, each hwmon driver has to implement its own sysfs attributes.
This requires a lot of template code, and distracts from the driver's core
function to read and write chip registers.
To be able to reduce driver complexity, move sensor attribute handling
and thermal zone registration into hwmon core. By using the new API,
driver code and data size is typically reduced by 20-70%, depending
on driver complexity and the number of sysfs attributes supported.
With this patch, the new API only supports thermal sensors. Support for
other sensor types will be added with subsequent patches.
Acked-by: Punit Agrawal <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Drivers using the new hwmon_device_register_with_groups API often have a
remove function which consists solely of a call hwmon_device_unregister().
Provide support for devm_hwmon_device_register_with_groups and
devm_hwmon_device_unregister to allow this repeated code to be removed
and help eliminate error handling code.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
hwmon_device_register_with_groups() lets callers register a hwmon device
together with all sysfs attributes in a single call.
When using hwmon_device_register_with_groups(), hwmon attributes are attached
to the hwmon device directly and no longer with its parent device.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
SENSORS_LIMIT and clamp_val have the same functionality, so retire SENSORS_LIMIT
as it is no longer needed.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
The <linux/device.h> header includes a lot of stuff, and
it in turn gets a lot of use just for the basic "struct device"
which appears so often.
Clean up the users as follows:
1) For those headers only needing "struct device" as a pointer
in fcn args, replace the include with exactly that.
2) For headers not really using anything from device.h, simply
delete the include altogether.
3) For headers relying on getting device.h implicitly before
being included themselves, now explicitly include device.h
4) For files in which doing #1 or #2 uncovers an implicit
dependency on some other header, fix by explicitly adding
the required header(s).
Any C files that were implicitly relying on device.h to be
present have already been dealt with in advance.
Total removals from #1 and #2: 51. Total additions coming
from #3: 9. Total other implicit dependencies from #4: 7.
As of 3.3-rc1, there were 110, so a net removal of 42 gives
about a 38% reduction in device.h presence in include/*
Signed-off-by: Paul Gortmaker <[email protected]>
|
|
Convert from class_device to device for hwmon_device_register/unregister
Signed-off-by: Tony Jones <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Move SENSORS_LIMIT from i2c-sensor.h to hwmon.h, as it is in no way
related to i2c.
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch adds the sysfs class "hwmon" for use by hardware monitoring
(sensors) chip drivers. It also fixes up the related Kconfig/Makefile
bits.
Signed-off-by: Mark M. Hoffman <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|