diff options
author | David S. Miller <davem@davemloft.net> | 2015-01-27 19:59:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-27 19:59:56 -0500 |
commit | 95f873f2fff96c592c5d863e2a39825bd8bf0500 (patch) | |
tree | 0d2dd664964ba2c701aefea5b4d1e85b481045e1 /drivers/thermal | |
parent | 8ea65f4a2dfaaf494ef42a16cbf2fea39b07450f (diff) | |
parent | 59343cd7c4809cf7598789e1cd14563780ae4239 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
arch/arm/boot/dts/imx6sx-sdb.dts
net/sched/cls_bpf.c
Two simple sets of overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 2 | ||||
-rw-r--r-- | drivers/thermal/of-thermal.c | 2 | ||||
-rw-r--r-- | drivers/thermal/rcar_thermal.c | 17 | ||||
-rw-r--r-- | drivers/thermal/thermal_core.h | 4 |
4 files changed, 16 insertions, 9 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index c1188ac053c9..2ccbc0788353 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c | |||
@@ -608,6 +608,7 @@ static int imx_thermal_suspend(struct device *dev) | |||
608 | regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_MEASURE_TEMP); | 608 | regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_MEASURE_TEMP); |
609 | regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_POWER_DOWN); | 609 | regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_POWER_DOWN); |
610 | data->mode = THERMAL_DEVICE_DISABLED; | 610 | data->mode = THERMAL_DEVICE_DISABLED; |
611 | clk_disable_unprepare(data->thermal_clk); | ||
611 | 612 | ||
612 | return 0; | 613 | return 0; |
613 | } | 614 | } |
@@ -617,6 +618,7 @@ static int imx_thermal_resume(struct device *dev) | |||
617 | struct imx_thermal_data *data = dev_get_drvdata(dev); | 618 | struct imx_thermal_data *data = dev_get_drvdata(dev); |
618 | struct regmap *map = data->tempmon; | 619 | struct regmap *map = data->tempmon; |
619 | 620 | ||
621 | clk_prepare_enable(data->thermal_clk); | ||
620 | /* Enabled thermal sensor after resume */ | 622 | /* Enabled thermal sensor after resume */ |
621 | regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_POWER_DOWN); | 623 | regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_POWER_DOWN); |
622 | regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_MEASURE_TEMP); | 624 | regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_MEASURE_TEMP); |
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index e145b66df444..d717f3dab6f1 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c | |||
@@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(of_thermal_is_trip_valid); | |||
149 | * | 149 | * |
150 | * Return: pointer to trip points table, NULL otherwise | 150 | * Return: pointer to trip points table, NULL otherwise |
151 | */ | 151 | */ |
152 | const struct thermal_trip * const | 152 | const struct thermal_trip * |
153 | of_thermal_get_trip_points(struct thermal_zone_device *tz) | 153 | of_thermal_get_trip_points(struct thermal_zone_device *tz) |
154 | { | 154 | { |
155 | struct __thermal_zone *data = tz->devdata; | 155 | struct __thermal_zone *data = tz->devdata; |
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 8803e693fe68..2580a4872f90 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c | |||
@@ -63,7 +63,7 @@ struct rcar_thermal_priv { | |||
63 | struct mutex lock; | 63 | struct mutex lock; |
64 | struct list_head list; | 64 | struct list_head list; |
65 | int id; | 65 | int id; |
66 | int ctemp; | 66 | u32 ctemp; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | #define rcar_thermal_for_each_priv(pos, common) \ | 69 | #define rcar_thermal_for_each_priv(pos, common) \ |
@@ -145,7 +145,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) | |||
145 | { | 145 | { |
146 | struct device *dev = rcar_priv_to_dev(priv); | 146 | struct device *dev = rcar_priv_to_dev(priv); |
147 | int i; | 147 | int i; |
148 | int ctemp, old, new; | 148 | u32 ctemp, old, new; |
149 | int ret = -EINVAL; | 149 | int ret = -EINVAL; |
150 | 150 | ||
151 | mutex_lock(&priv->lock); | 151 | mutex_lock(&priv->lock); |
@@ -372,6 +372,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
372 | int i; | 372 | int i; |
373 | int ret = -ENODEV; | 373 | int ret = -ENODEV; |
374 | int idle = IDLE_INTERVAL; | 374 | int idle = IDLE_INTERVAL; |
375 | u32 enr_bits = 0; | ||
375 | 376 | ||
376 | common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); | 377 | common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); |
377 | if (!common) | 378 | if (!common) |
@@ -390,7 +391,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
390 | 391 | ||
391 | /* | 392 | /* |
392 | * platform has IRQ support. | 393 | * platform has IRQ support. |
393 | * Then, drier use common register | 394 | * Then, driver uses common registers |
394 | */ | 395 | */ |
395 | 396 | ||
396 | ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0, | 397 | ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0, |
@@ -408,9 +409,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
408 | if (IS_ERR(common->base)) | 409 | if (IS_ERR(common->base)) |
409 | return PTR_ERR(common->base); | 410 | return PTR_ERR(common->base); |
410 | 411 | ||
411 | /* enable temperature comparation */ | ||
412 | rcar_thermal_common_write(common, ENR, 0x00030303); | ||
413 | |||
414 | idle = 0; /* polling delay is not needed */ | 412 | idle = 0; /* polling delay is not needed */ |
415 | } | 413 | } |
416 | 414 | ||
@@ -452,8 +450,15 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
452 | rcar_thermal_irq_enable(priv); | 450 | rcar_thermal_irq_enable(priv); |
453 | 451 | ||
454 | list_move_tail(&priv->list, &common->head); | 452 | list_move_tail(&priv->list, &common->head); |
453 | |||
454 | /* update ENR bits */ | ||
455 | enr_bits |= 3 << (i * 8); | ||
455 | } | 456 | } |
456 | 457 | ||
458 | /* enable temperature comparation */ | ||
459 | if (irq) | ||
460 | rcar_thermal_common_write(common, ENR, enr_bits); | ||
461 | |||
457 | platform_set_drvdata(pdev, common); | 462 | platform_set_drvdata(pdev, common); |
458 | 463 | ||
459 | dev_info(dev, "%d sensor probed\n", i); | 464 | dev_info(dev, "%d sensor probed\n", i); |
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 9083e7520623..0531c752fbbb 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h | |||
@@ -91,7 +91,7 @@ int of_parse_thermal_zones(void); | |||
91 | void of_thermal_destroy_zones(void); | 91 | void of_thermal_destroy_zones(void); |
92 | int of_thermal_get_ntrips(struct thermal_zone_device *); | 92 | int of_thermal_get_ntrips(struct thermal_zone_device *); |
93 | bool of_thermal_is_trip_valid(struct thermal_zone_device *, int); | 93 | bool of_thermal_is_trip_valid(struct thermal_zone_device *, int); |
94 | const struct thermal_trip * const | 94 | const struct thermal_trip * |
95 | of_thermal_get_trip_points(struct thermal_zone_device *); | 95 | of_thermal_get_trip_points(struct thermal_zone_device *); |
96 | #else | 96 | #else |
97 | static inline int of_parse_thermal_zones(void) { return 0; } | 97 | static inline int of_parse_thermal_zones(void) { return 0; } |
@@ -105,7 +105,7 @@ static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, | |||
105 | { | 105 | { |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | static inline const struct thermal_trip * const | 108 | static inline const struct thermal_trip * |
109 | of_thermal_get_trip_points(struct thermal_zone_device *tz) | 109 | of_thermal_get_trip_points(struct thermal_zone_device *tz) |
110 | { | 110 | { |
111 | return NULL; | 111 | return NULL; |