Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: Remove redundant pm_runtime_mark_last_busy() calls

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://patch.msgid.link/20250825135401.1765847-3-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Sakari Ailus and committed by
Jonathan Cameron
d5b9423b 358db735

+6 -40
-1
drivers/iio/adc/ab8500-gpadc.c
··· 607 607 } 608 608 609 609 /* This eventually drops the regulator */ 610 - pm_runtime_mark_last_busy(gpadc->dev); 611 610 pm_runtime_put_autosuspend(gpadc->dev); 612 611 613 612 return (high_data << 8) | low_data;
+1 -12
drivers/iio/adc/at91-sama5d2_adc.c
··· 896 896 emr |= osr | AT91_SAMA5D2_TRACKX(trackx); 897 897 at91_adc_writel(st, EMR, emr); 898 898 899 - pm_runtime_mark_last_busy(st->dev); 900 899 pm_runtime_put_autosuspend(st->dev); 901 900 902 901 st->oversampling_ratio = oversampling_ratio; ··· 970 971 AT91_SAMA5D2_IER_PEN | AT91_SAMA5D2_IER_NOPEN); 971 972 at91_adc_writel(st, TSMR, 0); 972 973 973 - pm_runtime_mark_last_busy(st->dev); 974 974 pm_runtime_put_autosuspend(st->dev); 975 975 return 0; 976 976 } ··· 1140 1142 1141 1143 at91_adc_configure_trigger_registers(st, state); 1142 1144 1143 - if (!state) { 1144 - pm_runtime_mark_last_busy(st->dev); 1145 + if (!state) 1145 1146 pm_runtime_put_autosuspend(st->dev); 1146 - } 1147 1147 1148 1148 return 0; 1149 1149 } ··· 1332 1336 at91_adc_writel(st, IER, AT91_SAMA5D2_IER_DRDY); 1333 1337 1334 1338 pm_runtime_put: 1335 - pm_runtime_mark_last_busy(st->dev); 1336 1339 pm_runtime_put_autosuspend(st->dev); 1337 1340 return ret; 1338 1341 } ··· 1389 1394 if (st->dma_st.dma_chan) 1390 1395 dmaengine_terminate_sync(st->dma_st.dma_chan); 1391 1396 1392 - pm_runtime_mark_last_busy(st->dev); 1393 1397 pm_runtime_put_autosuspend(st->dev); 1394 1398 1395 1399 return 0; ··· 1597 1603 mr |= AT91_SAMA5D2_MR_TRACKTIM(tracktim); 1598 1604 at91_adc_writel(st, MR, mr); 1599 1605 1600 - pm_runtime_mark_last_busy(st->dev); 1601 1606 pm_runtime_put_autosuspend(st->dev); 1602 1607 1603 1608 dev_dbg(&indio_dev->dev, "freq: %u, startup: %u, prescal: %u, tracktim=%u\n", ··· 1802 1809 at91_adc_readl(st, LCDR); 1803 1810 1804 1811 pm_runtime_put: 1805 - pm_runtime_mark_last_busy(st->dev); 1806 1812 pm_runtime_put_autosuspend(st->dev); 1807 1813 return ret; 1808 1814 } ··· 1882 1890 restore_config: 1883 1891 /* Revert previous settings. */ 1884 1892 at91_adc_temp_sensor_configure(st, false); 1885 - pm_runtime_mark_last_busy(st->dev); 1886 1893 pm_runtime_put_autosuspend(st->dev); 1887 1894 if (ret < 0) 1888 1895 return ret; ··· 2456 2465 dev_info(&pdev->dev, "version: %x\n", 2457 2466 readl_relaxed(st->base + st->soc_info.platform->layout->VERSION)); 2458 2467 2459 - pm_runtime_mark_last_busy(st->dev); 2460 2468 pm_runtime_put_autosuspend(st->dev); 2461 2469 2462 2470 return 0; ··· 2557 2567 at91_adc_configure_trigger_registers(st, true); 2558 2568 } 2559 2569 2560 - pm_runtime_mark_last_busy(st->dev); 2561 2570 pm_runtime_put_autosuspend(st->dev); 2562 2571 2563 2572 return 0;
-2
drivers/iio/adc/imx8qxp-adc.c
··· 229 229 ret = wait_for_completion_interruptible_timeout(&adc->completion, 230 230 IMX8QXP_ADC_TIMEOUT); 231 231 232 - pm_runtime_mark_last_busy(dev); 233 232 pm_runtime_put_sync_autosuspend(dev); 234 233 235 234 if (ret == 0) { ··· 294 295 295 296 *readval = readl(adc->regs + reg); 296 297 297 - pm_runtime_mark_last_busy(dev); 298 298 pm_runtime_put_sync_autosuspend(dev); 299 299 300 300 return 0;
-1
drivers/iio/adc/imx93_adc.c
··· 260 260 mutex_lock(&adc->lock); 261 261 ret = imx93_adc_read_channel_conversion(adc, chan->channel, val); 262 262 mutex_unlock(&adc->lock); 263 - pm_runtime_mark_last_busy(dev); 264 263 pm_runtime_put_sync_autosuspend(dev); 265 264 if (ret < 0) 266 265 return ret;
+3 -5
drivers/iio/adc/rcar-gyroadc.c
··· 163 163 { 164 164 struct device *dev = priv->dev; 165 165 166 - if (on) { 166 + if (on) 167 167 return pm_runtime_resume_and_get(dev); 168 - } else { 169 - pm_runtime_mark_last_busy(dev); 170 - return pm_runtime_put_autosuspend(dev); 171 - } 168 + 169 + return pm_runtime_put_autosuspend(dev); 172 170 } 173 171 174 172 static int rcar_gyroadc_read_raw(struct iio_dev *indio_dev,
-2
drivers/iio/adc/rzg2l_adc.c
··· 249 249 rzg2l_adc_start_stop(adc, false); 250 250 251 251 rpm_put: 252 - pm_runtime_mark_last_busy(dev); 253 252 pm_runtime_put_autosuspend(dev); 254 253 return ret; 255 254 } ··· 410 411 rzg2l_adc_writel(adc, RZG2L_ADM(3), reg); 411 412 412 413 exit_hw_init: 413 - pm_runtime_mark_last_busy(dev); 414 414 pm_runtime_put_autosuspend(dev); 415 415 return ret; 416 416 }
-1
drivers/iio/adc/stm32-adc-core.c
··· 794 794 goto err_irq_remove; 795 795 } 796 796 797 - pm_runtime_mark_last_busy(dev); 798 797 pm_runtime_put_autosuspend(dev); 799 798 800 799 return 0;
-7
drivers/iio/adc/stm32-adc.c
··· 1528 1528 1529 1529 stm32_adc_conv_irq_disable(adc); 1530 1530 1531 - pm_runtime_mark_last_busy(dev); 1532 1531 pm_runtime_put_autosuspend(dev); 1533 1532 1534 1533 return ret; ··· 1563 1564 1564 1565 adc->cfg->set_ovs(indio_dev, idx); 1565 1566 1566 - pm_runtime_mark_last_busy(dev); 1567 1567 pm_runtime_put_autosuspend(dev); 1568 1568 1569 1569 adc->ovs_idx = idx; ··· 1757 1759 adc->num_conv = bitmap_weight(scan_mask, iio_get_masklength(indio_dev)); 1758 1760 1759 1761 ret = stm32_adc_conf_scan_seq(indio_dev, scan_mask); 1760 - pm_runtime_mark_last_busy(dev); 1761 1762 pm_runtime_put_autosuspend(dev); 1762 1763 1763 1764 return ret; ··· 1805 1808 else 1806 1809 *readval = stm32_adc_readl(adc, reg); 1807 1810 1808 - pm_runtime_mark_last_busy(dev); 1809 1811 pm_runtime_put_autosuspend(dev); 1810 1812 1811 1813 return 0; ··· 1950 1954 err_clr_trig: 1951 1955 stm32_adc_set_trig(indio_dev, NULL); 1952 1956 err_pm_put: 1953 - pm_runtime_mark_last_busy(dev); 1954 1957 pm_runtime_put_autosuspend(dev); 1955 1958 1956 1959 return ret; ··· 1972 1977 if (stm32_adc_set_trig(indio_dev, NULL)) 1973 1978 dev_err(&indio_dev->dev, "Can't clear trigger\n"); 1974 1979 1975 - pm_runtime_mark_last_busy(dev); 1976 1980 pm_runtime_put_autosuspend(dev); 1977 1981 1978 1982 return 0; ··· 2608 2614 goto err_hw_stop; 2609 2615 } 2610 2616 2611 - pm_runtime_mark_last_busy(dev); 2612 2617 pm_runtime_put_autosuspend(dev); 2613 2618 2614 2619 if (IS_ENABLED(CONFIG_DEBUG_FS))
-2
drivers/iio/adc/sun4i-gpadc-iio.c
··· 244 244 *val = info->temp_data; 245 245 246 246 ret = 0; 247 - pm_runtime_mark_last_busy(indio_dev->dev.parent); 248 247 249 248 err: 250 249 pm_runtime_put_autosuspend(indio_dev->dev.parent); ··· 270 271 271 272 regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val); 272 273 273 - pm_runtime_mark_last_busy(indio_dev->dev.parent); 274 274 pm_runtime_put_autosuspend(indio_dev->dev.parent); 275 275 276 276 return 0;
+2 -4
drivers/iio/adc/ti-ads1015.c
··· 374 374 int ret; 375 375 struct device *dev = regmap_get_device(data->regmap); 376 376 377 - if (on) { 377 + if (on) 378 378 ret = pm_runtime_resume_and_get(dev); 379 - } else { 380 - pm_runtime_mark_last_busy(dev); 379 + else 381 380 ret = pm_runtime_put_autosuspend(dev); 382 - } 383 381 384 382 return ret < 0 ? ret : 0; 385 383 }
-1
drivers/iio/adc/ti-ads1100.c
··· 105 105 106 106 ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer)); 107 107 108 - pm_runtime_mark_last_busy(&data->client->dev); 109 108 pm_runtime_put_autosuspend(&data->client->dev); 110 109 111 110 if (ret < 0) {
-2
drivers/iio/adc/ti-ads1119.c
··· 291 291 *val = sign_extend32(sample, chan->scan_type.realbits - 1); 292 292 ret = IIO_VAL_INT; 293 293 pdown: 294 - pm_runtime_mark_last_busy(dev); 295 294 pm_runtime_put_autosuspend(dev); 296 295 return ret; 297 296 } ··· 469 470 if (ret) 470 471 return ret; 471 472 472 - pm_runtime_mark_last_busy(dev); 473 473 pm_runtime_put_autosuspend(dev); 474 474 475 475 return 0;