Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull hwmon subsystem fixes from Jean Delvare. * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (ntc_thermistor) Fix OF device ID mapping hwmon: (ntc_thermistor) Fix dependencies hwmon: Document temp[1-*]_min_hyst sysfs attribute
This commit is contained in:
commit
f016a6441a
3 changed files with 24 additions and 7 deletions
|
@ -327,6 +327,13 @@ temp[1-*]_max_hyst
|
||||||
from the max value.
|
from the max value.
|
||||||
RW
|
RW
|
||||||
|
|
||||||
|
temp[1-*]_min_hyst
|
||||||
|
Temperature hysteresis value for min limit.
|
||||||
|
Unit: millidegree Celsius
|
||||||
|
Must be reported as an absolute temperature, NOT a delta
|
||||||
|
from the min value.
|
||||||
|
RW
|
||||||
|
|
||||||
temp[1-*]_input Temperature input value.
|
temp[1-*]_input Temperature input value.
|
||||||
Unit: millidegree Celsius
|
Unit: millidegree Celsius
|
||||||
RO
|
RO
|
||||||
|
@ -362,6 +369,13 @@ temp[1-*]_lcrit Temperature critical min value, typically lower than
|
||||||
Unit: millidegree Celsius
|
Unit: millidegree Celsius
|
||||||
RW
|
RW
|
||||||
|
|
||||||
|
temp[1-*]_lcrit_hyst
|
||||||
|
Temperature hysteresis value for critical min limit.
|
||||||
|
Unit: millidegree Celsius
|
||||||
|
Must be reported as an absolute temperature, NOT a delta
|
||||||
|
from the critical min value.
|
||||||
|
RW
|
||||||
|
|
||||||
temp[1-*]_offset
|
temp[1-*]_offset
|
||||||
Temperature offset which is added to the temperature reading
|
Temperature offset which is added to the temperature reading
|
||||||
by the chip.
|
by the chip.
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ config SENSORS_PC87427
|
||||||
|
|
||||||
config SENSORS_NTC_THERMISTOR
|
config SENSORS_NTC_THERMISTOR
|
||||||
tristate "NTC thermistor support"
|
tristate "NTC thermistor support"
|
||||||
depends on (!OF && !IIO) || (OF && IIO)
|
depends on !OF || IIO=n || IIO
|
||||||
help
|
help
|
||||||
This driver supports NTC thermistors sensor reading and its
|
This driver supports NTC thermistors sensor reading and its
|
||||||
interpretation. The driver can also monitor the temperature and
|
interpretation. The driver can also monitor the temperature and
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct ntc_compensation {
|
||||||
unsigned int ohm;
|
unsigned int ohm;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Order matters, ntc_match references the entries by index */
|
||||||
static const struct platform_device_id ntc_thermistor_id[] = {
|
static const struct platform_device_id ntc_thermistor_id[] = {
|
||||||
{ "ncp15wb473", TYPE_NCPXXWB473 },
|
{ "ncp15wb473", TYPE_NCPXXWB473 },
|
||||||
{ "ncp18wb473", TYPE_NCPXXWB473 },
|
{ "ncp18wb473", TYPE_NCPXXWB473 },
|
||||||
|
@ -141,7 +142,7 @@ struct ntc_data {
|
||||||
char name[PLATFORM_NAME_SIZE];
|
char name[PLATFORM_NAME_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#if defined(CONFIG_OF) && IS_ENABLED(CONFIG_IIO)
|
||||||
static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata)
|
static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata)
|
||||||
{
|
{
|
||||||
struct iio_channel *channel = pdata->chan;
|
struct iio_channel *channel = pdata->chan;
|
||||||
|
@ -163,15 +164,15 @@ static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata)
|
||||||
|
|
||||||
static const struct of_device_id ntc_match[] = {
|
static const struct of_device_id ntc_match[] = {
|
||||||
{ .compatible = "ntc,ncp15wb473",
|
{ .compatible = "ntc,ncp15wb473",
|
||||||
.data = &ntc_thermistor_id[TYPE_NCPXXWB473] },
|
.data = &ntc_thermistor_id[0] },
|
||||||
{ .compatible = "ntc,ncp18wb473",
|
{ .compatible = "ntc,ncp18wb473",
|
||||||
.data = &ntc_thermistor_id[TYPE_NCPXXWB473] },
|
.data = &ntc_thermistor_id[1] },
|
||||||
{ .compatible = "ntc,ncp21wb473",
|
{ .compatible = "ntc,ncp21wb473",
|
||||||
.data = &ntc_thermistor_id[TYPE_NCPXXWB473] },
|
.data = &ntc_thermistor_id[2] },
|
||||||
{ .compatible = "ntc,ncp03wb473",
|
{ .compatible = "ntc,ncp03wb473",
|
||||||
.data = &ntc_thermistor_id[TYPE_NCPXXWB473] },
|
.data = &ntc_thermistor_id[3] },
|
||||||
{ .compatible = "ntc,ncp15wl333",
|
{ .compatible = "ntc,ncp15wl333",
|
||||||
.data = &ntc_thermistor_id[TYPE_NCPXXWL333] },
|
.data = &ntc_thermistor_id[4] },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, ntc_match);
|
MODULE_DEVICE_TABLE(of, ntc_match);
|
||||||
|
@ -223,6 +224,8 @@ ntc_thermistor_parse_dt(struct platform_device *pdev)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define ntc_match NULL
|
||||||
|
|
||||||
static void ntc_iio_channel_release(struct ntc_thermistor_platform_data *pdata)
|
static void ntc_iio_channel_release(struct ntc_thermistor_platform_data *pdata)
|
||||||
{ }
|
{ }
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue