Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
Pull thermal SoC management fixes from Eduardo Valentin: - fixes to TI SoC driver, Broadcom, qoriq - small sparse warning fix on thermal core * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: broadcom: ns-thermal: default on iProc SoCs ti-soc-thermal: Fix a typo in a comment line ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build() ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build() thermal: core: make thermal_emergency_poweroff static thermal: qoriq: remove useless call for of_thermal_get_trip_points()
This commit is contained in:
Коммит
d09bc680ca
|
@ -9,8 +9,9 @@ config BCM2835_THERMAL
|
||||||
config BCM_NS_THERMAL
|
config BCM_NS_THERMAL
|
||||||
tristate "Northstar thermal driver"
|
tristate "Northstar thermal driver"
|
||||||
depends on ARCH_BCM_IPROC || COMPILE_TEST
|
depends on ARCH_BCM_IPROC || COMPILE_TEST
|
||||||
|
default y if ARCH_BCM_IPROC
|
||||||
help
|
help
|
||||||
Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
|
Support for the Northstar and Northstar Plus family of SoCs (e.g.
|
||||||
BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
|
BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
|
||||||
with a thermal sensor that allows checking CPU temperature. This
|
Management Unit) block with a thermal sensor that allows checking CPU
|
||||||
driver provides support for it.
|
temperature.
|
||||||
|
|
|
@ -195,7 +195,6 @@ static struct thermal_zone_of_device_ops tmu_tz_ops = {
|
||||||
static int qoriq_tmu_probe(struct platform_device *pdev)
|
static int qoriq_tmu_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
const struct thermal_trip *trip;
|
|
||||||
struct qoriq_tmu_data *data;
|
struct qoriq_tmu_data *data;
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
u32 site = 0;
|
u32 site = 0;
|
||||||
|
@ -243,8 +242,6 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
|
||||||
goto err_tmu;
|
goto err_tmu;
|
||||||
}
|
}
|
||||||
|
|
||||||
trip = of_thermal_get_trip_points(data->tz);
|
|
||||||
|
|
||||||
/* Enable monitoring */
|
/* Enable monitoring */
|
||||||
site |= 0x1 << (15 - data->sensor_id);
|
site |= 0x1 << (15 - data->sensor_id);
|
||||||
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
|
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
|
||||||
|
|
|
@ -359,7 +359,7 @@ static DECLARE_DELAYED_WORK(thermal_emergency_poweroff_work,
|
||||||
* This may be called from any critical situation to trigger a system shutdown
|
* This may be called from any critical situation to trigger a system shutdown
|
||||||
* after a known period of time. By default this is not scheduled.
|
* after a known period of time. By default this is not scheduled.
|
||||||
*/
|
*/
|
||||||
void thermal_emergency_poweroff(void)
|
static void thermal_emergency_poweroff(void)
|
||||||
{
|
{
|
||||||
int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS;
|
int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ti_bandgap_set_continous_mode() - One time enabling of continuous mode
|
* ti_bandgap_set_continuous_mode() - One time enabling of continuous mode
|
||||||
* @bgp: pointer to struct ti_bandgap
|
* @bgp: pointer to struct ti_bandgap
|
||||||
*
|
*
|
||||||
* Call this function only if HAS(MODE_CONFIG) is set. As this driver may
|
* Call this function only if HAS(MODE_CONFIG) is set. As this driver may
|
||||||
|
@ -1214,22 +1214,18 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL);
|
bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL);
|
||||||
if (!bgp) {
|
if (!bgp)
|
||||||
dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
|
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
|
||||||
|
|
||||||
of_id = of_match_device(of_ti_bandgap_match, &pdev->dev);
|
of_id = of_match_device(of_ti_bandgap_match, &pdev->dev);
|
||||||
if (of_id)
|
if (of_id)
|
||||||
bgp->conf = of_id->data;
|
bgp->conf = of_id->data;
|
||||||
|
|
||||||
/* register shadow for context save and restore */
|
/* register shadow for context save and restore */
|
||||||
bgp->regval = devm_kzalloc(&pdev->dev, sizeof(*bgp->regval) *
|
bgp->regval = devm_kcalloc(&pdev->dev, bgp->conf->sensor_count,
|
||||||
bgp->conf->sensor_count, GFP_KERNEL);
|
sizeof(*bgp->regval), GFP_KERNEL);
|
||||||
if (!bgp->regval) {
|
if (!bgp->regval)
|
||||||
dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
|
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
do {
|
do {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче