diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-02-24 04:54:46 -0500 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-02-25 15:45:46 -0500 |
commit | 52fa74ee690e6491295ac221c83c56563257f294 (patch) | |
tree | 9ddf81cf0e83decf3b252672cfe599d1d05dceaf /drivers/power | |
parent | dd18a6634606cbaa19ae1e85f5bcb65b9f7dfce4 (diff) |
power_supply: max17040: Use system efficient workqueues
The scheduled work in max17040_battery driver reads device parameters
and stores them in memory. Any CPU could do that so use system efficient
workqueues to limit unnecessary CPU wake ups.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/max17040_battery.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c index 14d44706327b..63ff3f705154 100644 --- a/drivers/power/max17040_battery.c +++ b/drivers/power/max17040_battery.c | |||
@@ -188,7 +188,8 @@ static void max17040_work(struct work_struct *work) | |||
188 | max17040_get_online(chip->client); | 188 | max17040_get_online(chip->client); |
189 | max17040_get_status(chip->client); | 189 | max17040_get_status(chip->client); |
190 | 190 | ||
191 | schedule_delayed_work(&chip->work, MAX17040_DELAY); | 191 | queue_delayed_work(system_power_efficient_wq, &chip->work, |
192 | MAX17040_DELAY); | ||
192 | } | 193 | } |
193 | 194 | ||
194 | static enum power_supply_property max17040_battery_props[] = { | 195 | static enum power_supply_property max17040_battery_props[] = { |
@@ -233,7 +234,8 @@ static int max17040_probe(struct i2c_client *client, | |||
233 | max17040_get_version(client); | 234 | max17040_get_version(client); |
234 | 235 | ||
235 | INIT_DEFERRABLE_WORK(&chip->work, max17040_work); | 236 | INIT_DEFERRABLE_WORK(&chip->work, max17040_work); |
236 | schedule_delayed_work(&chip->work, MAX17040_DELAY); | 237 | queue_delayed_work(system_power_efficient_wq, &chip->work, |
238 | MAX17040_DELAY); | ||
237 | 239 | ||
238 | return 0; | 240 | return 0; |
239 | } | 241 | } |
@@ -263,7 +265,8 @@ static int max17040_resume(struct device *dev) | |||
263 | struct i2c_client *client = to_i2c_client(dev); | 265 | struct i2c_client *client = to_i2c_client(dev); |
264 | struct max17040_chip *chip = i2c_get_clientdata(client); | 266 | struct max17040_chip *chip = i2c_get_clientdata(client); |
265 | 267 | ||
266 | schedule_delayed_work(&chip->work, MAX17040_DELAY); | 268 | queue_delayed_work(system_power_efficient_wq, &chip->work, |
269 | MAX17040_DELAY); | ||
267 | return 0; | 270 | return 0; |
268 | } | 271 | } |
269 | 272 | ||