[PATCH 07/31] serial: qcom_geni_serial: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and we don't need to make opp_table glabal. Let's remove opp_table from geni_se later. Signed-off-by: Yangtao Li --- drivers/tty/serial/qcom_geni_serial.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) di

[PATCH 06/31] serial: qcom_geni_serial: fix potential mem leak in qcom_geni_serial_probe()

2021-01-01 Thread Yangtao Li
We should use dev_pm_opp_put_clkname() to free opp table each time dev_pm_opp_of_add_table() got error. Signed-off-by: Yangtao Li --- drivers/tty/serial/qcom_geni_serial.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b

[PATCH 01/31] opp: Add devres wrapper for dev_pm_opp_set_clkname and dev_pm_opp_put_clkname

2021-01-01 Thread Yangtao Li
Add devres wrapper for dev_pm_opp_set_clkname() and dev_pm_opp_put_clkname() to simplify driver code. Signed-off-by: Yangtao Li --- drivers/opp/core.c | 47 ++ include/linux/pm_opp.h | 9 2 files changed, 56 insertions(+) diff --git a

[PATCH 03/31] opp: Add devres wrapper for dev_pm_opp_set_supported_hw

2021-01-01 Thread Yangtao Li
Add devres wrapper for dev_pm_opp_set_supported_hw() to simplify driver code. Signed-off-by: Yangtao Li --- drivers/opp/core.c | 38 ++ include/linux/pm_opp.h | 8 2 files changed, 46 insertions(+) diff --git a/drivers/opp/core.c b/drivers/opp

[PATCH 09/31] spi: spi-qcom-qspi: fix potential mem leak in spi_geni_probe()

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and we don't need to make opp_table glabal. Let's remove opp_table from geni_se later. Signed-off-by: Yangtao Li --- drivers/spi/spi-geni-qcom.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/sp

[PATCH 08/31] spi: spi-qcom-qspi: fix potential mem leak in spi_geni_probe()

2021-01-01 Thread Yangtao Li
We should use dev_pm_opp_put_clkname() to free opp table each time dev_pm_opp_of_add_table() got error. Signed-off-by: Yangtao Li --- drivers/spi/spi-geni-qcom.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni

[PATCH 10/31] qcom-geni-se: remove opp_table

2021-01-01 Thread Yangtao Li
opp_table isn't used anymore, remove it. Signed-off-by: Yangtao Li --- include/linux/qcom-geni-se.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h index ec2ad4b0fe14..cddef864a760 100644 --- a/include/linux/qcom-geni-se.h

[PATCH 11/31] mmc: sdhci-msm: fix potential mem leak in sdhci_msm_probe()

2021-01-01 Thread Yangtao Li
We should use dev_pm_opp_put_clkname() to free opp table each time dev_pm_opp_of_add_table() got error. Signed-off-by: Yangtao Li --- drivers/mmc/host/sdhci-msm.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci

[PATCH 12/31] mmc: sdhci-msm: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and remove opp_table from sdhci_msm_host. Signed-off-by: Yangtao Li --- drivers/mmc/host/sdhci-msm.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index

[PATCH 14/31] spi: spi-qcom-qspi: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and remove opp_table from qcom_qspi. Signed-off-by: Yangtao Li --- drivers/spi/spi-qcom-qspi.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c index

[PATCH 16/31] drm/msm: convert to use devm_pm_opp_* API and remove dp_ctrl_put

2021-01-01 Thread Yangtao Li
1. Use devm_pm_opp_* to simplif code and avoid mem leak. 2. Remove opp_table from dpu_kms, dp_ctrl_private and msm_dsi_host, since it does not need a global scope. 3. Remove dp_ctrl_put. Signed-off-by: Yangtao Li --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno

[PATCH 15/31] drm/msm: fix potential mem leak

2021-01-01 Thread Yangtao Li
We should use dev_pm_opp_put_clkname() to free opp table each time dev_pm_opp_of_add_table() got error. Signed-off-by: Yangtao Li --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 ++ drivers/gpu/drm/msm/dsi/dsi_host.c | 8 +--- 2 files changed, 11 insertions(+), 7 deletions

[PATCH 13/31] spi: spi-qcom-qspi: fix potential mem leak in qcom_qspi_probe()

2021-01-01 Thread Yangtao Li
We should use dev_pm_opp_put_clkname() to free opp table each time dev_pm_opp_of_add_table() got error. Signed-off-by: Yangtao Li --- drivers/spi/spi-qcom-qspi.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom

[PATCH 18/31] drm/lima: remove unneeded devm_devfreq_remove_device()

2021-01-01 Thread Yangtao Li
There is no need to manually release devm related resources. Signed-off-by: Yangtao Li --- drivers/gpu/drm/lima/lima_devfreq.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c index d5937cf86504..7690c5c69f9f

[PATCH 20/31] media: venus: fix error check in core_get_v4()

2021-01-01 Thread Yangtao Li
Don't call dev_pm_opp_put_clkname() when got invalid OPP table in device tree, since we do this in core_put_v4(). Signed-off-by: Yangtao Li --- drivers/media/platform/qcom/venus/pm_helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/

[PATCH 23/31] memory: samsung: exynos5422-dmc: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/samsung/exynos5422-dmc.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c index

[PATCH 21/31] media: venus: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- .../media/platform/qcom/venus/pm_helpers.c| 21 --- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus

[PATCH 22/31] memory: samsung: exynos5422-dmc: fix return error in exynos5_init_freq_table

2021-01-01 Thread Yangtao Li
We can't always return -EINVAL, let's fix it. Signed-off-by: Yangtao Li --- drivers/memory/samsung/exynos5422-dmc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-d

[PATCH 17/31] drm/lima: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and remove opp_table from lima_devfreq. Signed-off-by: Yangtao Li --- drivers/gpu/drm/lima/lima_devfreq.c | 40 - drivers/gpu/drm/lima/lima_devfreq.h | 2 -- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a

[PATCH 24/31] memory: tegra20: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/tegra/tegra20-emc.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 686aaf477d8a

[PATCH 19/31] drm/panfrost: convert to use devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and remove opp_table from panfrost_devfreq. Signed-off-by: Yangtao Li --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 34 ++--- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 1 - 2 files changed, 10 insertions(+), 25 deletions(-) diff

[PATCH 25/31] memory: tegra30: convert to use devm_pm_opp_* API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/tegra/tegra30-emc.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index 44ac155936aa

[PATCH 28/31] PM / devfreq: imx8m-ddrc: convert to use devm_pm_opp_* API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- drivers/devfreq/imx8m-ddrc.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/devfreq/imx8m-ddrc.c b/drivers/devfreq/imx8m-ddrc.c index bc82d3653bff..9383d6e5538b 100644 --- a

[PATCH 27/31] PM / devfreq: rk3399_dmc: convert to use devm_pm_opp_* API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Since devres release can guarantee the order, let's remove devm_devfreq_unregister_opp_notifier(). Signed-off-by: Yangtao Li --- drivers/devfreq/rk3399_dmc.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --

[PATCH 26/31] PM / devfreq: tegra30: convert to use devm_pm_opp_* API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and remove opp_table from tegra_devfreq. Signed-off-by: Yangtao Li --- drivers/devfreq/tegra30-devfreq.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq

[PATCH 31/31] PM / devfreq: convert to devm_pm_opp_register_notifier and remove unused API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- drivers/devfreq/devfreq.c | 66 +-- include/linux/devfreq.h | 23 -- 2 files changed, 1 insertion(+), 88 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers

[PATCH 29/31] PM / devfreq: imx-bus: convert to use devm_pm_opp_* API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code. Signed-off-by: Yangtao Li --- drivers/devfreq/imx-bus.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c index 4f38455ad742..ff26ef049b1b 100644 --- a/drivers/devfreq

[PATCH 30/31] PM / devfreq: exynos: convert to use devm_pm_opp_* API

2021-01-02 Thread Yangtao Li
Use devm_pm_opp_* API to simplify code, and remove opp_table from exynos_bus. Signed-off-by: Yangtao Li --- drivers/devfreq/exynos-bus.c | 42 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq

[PATCH] PM / core: fix kerneldoc comment for dpm_watchdog_handler()

2019-03-15 Thread Yangtao Li
This brings the kernel doc in line with the function signature. Signed-off-by: Yangtao Li --- drivers/base/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index f80d298de3fa..0cff68bd7b4b 100644 --- a/drivers

[PATCH] PM / core: fix kerneldoc comment for device_pm_wait_for_dev

2019-03-15 Thread Yangtao Li
Rearrange comment to make the comment style consistent, the previous function parameters are described first. Signed-off-by: Yangtao Li --- drivers/base/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index

[PATCH 2/4] PM / core: Introduce DEVICE_SUSPEND_FUNC() helper macro

2019-03-15 Thread Yangtao Li
DEVICE_SUSPEND_FUNC() helper macro can decrease code duplication. Signed-off-by: Yangtao Li --- drivers/base/power/main.c | 33 - 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index cb44bb6b2b66

[PATCH 0/4] PM / core: Introduce some helper for better Code reuse

2019-03-15 Thread Yangtao Li
This patch set introduces some functions and macros that help reduce code duplication. Yangtao Li (4): PM / core: Introduce dpm_async_fn() helper PM / core: Introduce DEVICE_SUSPEND_FUNC() helper macro PM / core: Introduce ASYNC_RESUME_FUNC() helper macro PM / core: Introduce

[PATCH 1/4] PM / core: Introduce dpm_async_fn() helper

2019-03-15 Thread Yangtao Li
lot of such repeated operations here, in fact we can avoid this. So introduce dpm_async_fn() to have better code readability and reuse. And use this function to do some cleanup. Signed-off-by: Yangtao Li --- drivers/base/power/main.c | 62 +++ 1 file

[PATCH 3/4] PM / core: Introduce ASYNC_RESUME_FUNC() helper macro

2019-03-15 Thread Yangtao Li
); if (error) pm_dev_err(dev, pm_transition, " async", error); put_device(dev); } The ASYNC_RESUME_FUNC() helper macro can decrease code duplication. Signed-off-by: Yangtao Li --- drivers/base/power/main.c | 46 +-- 1 file c

[PATCH 4/4] PM / core: Introduce ASYNC_SUSPEND_FUNC() helper macro

2019-03-15 Thread Yangtao Li
); if (error) { dpm_save_failed_dev(dev_name(dev)); pm_dev_err(dev, pm_transition, " async", error); } put_device(dev); } The ASYNC_SUSPEND_FUNC() helper macro can decrease code duplication. Signed-off-by: Yangtao Li --- drivers/

[PATCH 3/4] arm64: dts: allwinner: h6: Add clock to CPU cores

2019-02-14 Thread Yangtao Li
The ARM CPU cores are fed by the CPU clock from the CCU. Add a reference to the clock for each CPU core, along with the clock transition latency. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64

[PATCH 2/4] arm64: dts: allwinner: h6: pine: Add CPU supply regulator

2019-02-14 Thread Yangtao Li
The original pine use the dcdca to supply the CPU cores. According to the axp805 spec, the range of dcdca is 0.6 to 1.1v, 1.12 to 1.52v. In order to support more CPU frequency, slightly increase the voltage maximum and minimum. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i

[PATCH 1/4] arm64: dts: allwinner: h6: orangepi: Add CPU supply regulator

2019-02-14 Thread Yangtao Li
The original orangepi use the dcdca to supply the CPU cores. According to the axp805 spec, the range of dcdca is 0.6 to 1.1v, 1.12 to 1.52v. In order to support more CPU frequency, slightly increase the voltage maximum and minimum. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner

[PATCH 4/4] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table

2019-02-14 Thread Yangtao Li
Add an OPP (Operating Performance Points) table for the CPU cores to enable DVFS (Dynamic Voltage & Frequency Scaling) on the H6. This information comes from github. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 61 1 file changed

[PATCH 0/4] arm64: dts: allwinner: h6: Enable CPU DVFS(cpufreq)

2019-02-14 Thread Yangtao Li
on the sunxi source code and has not been tested on an actual board. --- Yangtao Li (4): arm64: dts: allwinner: h6: orangepi: Add CPU supply regulator arm64: dts: allwinner: h6: pine: Add CPU supply regulator arm64: dts: allwinner: h6: Add clock to CPU cores arm64: dts: allwinner: h6: Add

[PATVH v2 2/4] arm64: dts: allwinner: h6: pine: Add CPU supply regulator

2019-02-15 Thread Yangtao Li
ge of the cpu is smaller or larger than the datasheet. For some better quality ic, the minimum voltage can be smaller. For some poor quality ic, the maximum voltage needs to be increased a little. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 8 ++-- 1

[PATVH v2 4/4] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table

2019-02-15 Thread Yangtao Li
ally. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 55 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 723f5d991a74..84fb47062fe6 100644 --- a/arch/a

[PATVH v2 1/4] arm64: dts: allwinner: h6: orangepi: Add CPU supply regulator

2019-02-15 Thread Yangtao Li
ltage of the cpu is smaller or larger than the datasheet. For some better quality ic, the minimum voltage can be smaller. For some poor quality ic, the maximum voltage needs to be increased a little. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 8 ++

[PATVH v2 0/4] arm64: dts: allwinner: h6: Enable CPU

2019-02-15 Thread Yangtao Li
Add the cpufreq support of h6, source of information is as follows. h6 cpu opp info: https://github.com/Allwinner-Homlet/H6-BSP4.9-linux/blob/master/arch/arm64/boot/dts/sunxi/sun50iw6p1.dtsi axp805 spec: http://linux-sunxi.org/images/b/bc/AXP805_Datasheet_V1.0_en.pdf Yangtao Li (4): arm64

[PATVH v2 3/4] arm64: dts: allwinner: h6: Add clock to CPU cores

2019-02-15 Thread Yangtao Li
The ARM CPU cores are fed by the CPU clock from the CCU. Add a reference to the clock for each CPU core, along with the clock transition latency. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64

[PATCH v3 0/4] arm64: dts: allwinner: h6: Enable CPU DVFS(cpufreq)

2019-02-15 Thread Yangtao Li
Add the cpufreq information of h6 to dts, source of information is as follows. h6 cpu opp info: https://github.com/Allwinner-Homlet/H6-BSP4.9-linux/blob/master/arch/arm64/boot/dts/sunxi/sun50iw6p1.dtsi axp805 spec: http://linux-sunxi.org/images/b/bc/AXP805_Datasheet_V1.0_en.pdf Yangtao Li (4

[PATCH v3 1/4] arm64: dts: allwinner: h6: orangepi: Add CPU supply regulator

2019-02-15 Thread Yangtao Li
ltage of the cpu is smaller or larger than the datasheet. For some better quality ic, the minimum voltage can be smaller. For some poor quality ic, the maximum voltage needs to be increased a little. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 8 ++

[PATCH v3 4/4] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table

2019-02-15 Thread Yangtao Li
ally. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 55 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 723f5d991a74..84fb47062fe6 100644 --- a/arch/a

[PATCH v3 3/4] arm64: dts: allwinner: h6: Add clock to CPU cores

2019-02-15 Thread Yangtao Li
The ARM CPU cores are fed by the CPU clock from the CCU. Add a reference to the clock for each CPU core, along with the clock transition latency. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64

[PATCH v3 2/4] arm64: dts: allwinner: h6: pine: Add CPU supply regulator

2019-02-15 Thread Yangtao Li
ge of the cpu is smaller or larger than the datasheet. For some better quality ic, the minimum voltage can be smaller. For some poor quality ic, the maximum voltage needs to be increased a little. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 8 ++-- 1

[PATCH] clocksource: decrement reference count when device_register() fail

2019-01-21 Thread Yangtao Li
device_register() may fail, use put_device() giving up the refconut to avoid refcount leak. Signed-off-by: Yangtao Li --- kernel/time/clocksource.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 3bcc19ceb073

[PATCH] cpuidle: fix description of exit latency in cpuidle.rst

2019-01-22 Thread Yangtao Li
Exit latency is the time from exiting the idle state to execute the first instruction. This place may be a typo , so fix it. Signed-off-by: Yangtao Li --- Documentation/admin-guide/pm/cpuidle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/admin-guide/pm

[PATCH] irq: convert the code format to BIT()

2019-01-16 Thread Yangtao Li
Use BIT() to do some clean-up. Signed-off-by: Yangtao Li --- include/linux/irq.h | 106 ++-- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index def2b2aac8b1..66c9801ce108 100644 --- a/include

[PATCH] clockchips: convert the code format to BIT()

2019-01-16 Thread Yangtao Li
Use BIT() to do some clean-up. Signed-off-by: Yangtao Li --- include/linux/clockchips.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 8ae9a95ebf5b..39a2294e995b 100644 --- a/include/linux

[PATCH v2] clocksource: use BIT() for clock source flags

2019-01-15 Thread Yangtao Li
It's a small tidy-up. Signed-off-by: Yangtao Li --- v2: -add missing changelog --- include/linux/clocksource.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index b21db536fd52..130f4c3c0781 1

[PATCH] clocksource: use BIT() for clock source flags

2019-01-15 Thread Yangtao Li
Signed-off-by: Yangtao Li --- include/linux/clocksource.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index b21db536fd52..130f4c3c0781 100644 --- a/include/linux/clocksource.h +++ b/include/linux

[PATCH] cpuidle: use BIT() for idle state flags and remove CPUIDLE_DRIVER_FLAGS_MASK

2019-01-15 Thread Yangtao Li
Use BIT() macro to do a small tidy-up. The CPUIDLE_DRIVER_FLAGS_MASK is not being used, so remove it. Signed-off-by: Yangtao Li --- include/linux/cpuidle.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index

[PATCH] PM / devfreq: fix mem leak and missing check of return value in devfreq_add_device()

2019-01-18 Thread Yangtao Li
'devfreq' is malloced in devfreq_add_device() and should be freed in the error handling cases, otherwise it will cause memory leak. devm_kzalloc() could fail, so insert a check of its return value. And if it fails, returns -ENOMEM. Signed-off-by: Yangtao Li --- drivers/devfreq/devf

[PATCH 2/3] PM / devfreq: fix missing check of return value in devfreq_add_device()

2019-01-19 Thread Yangtao Li
devm_kzalloc() could fail, so insert a check of its return value. And if it fails, returns -ENOMEM. Signed-off-by: Yangtao Li --- drivers/devfreq/devfreq.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c

[PATCH 1/3] PM / devfreq: fix indentation in devfreq_add_device()

2019-01-19 Thread Yangtao Li
To beautify the code format. Signed-off-by: Yangtao Li --- drivers/devfreq/devfreq.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 0ae3de76833b..076b1c2f40a4 100644 --- a/drivers/devfreq

[PATCH 3/3] PM / devfreq: fix mem leak in devfreq_add_device()

2019-01-19 Thread Yangtao Li
'devfreq' is malloced in devfreq_add_device() and should be freed in the error handling cases, otherwise it will cause memory leak. Signed-off-by: Yangtao Li --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c

[PATCH] clockevents: decrement reference count when device_register() fail

2019-01-21 Thread Yangtao Li
device_register() may fail, use put_device() giving up the refconut to avoid refcount leak. Signed-off-by: Yangtao Li --- kernel/time/clockevents.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index

[PATCH] cpufreq: qcom-kryo: make some variables static

2019-02-03 Thread Yangtao Li
The variables are local to the source and do not need to be in global scope, so make them static. Signed-off-by: Yangtao Li --- drivers/cpufreq/qcom-cpufreq-kryo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom

[PATCH] cpufreq: tegra124: add missing of_node_put()

2019-02-03 Thread Yangtao Li
of_cpu_device_node_get() will increase the refcount of device_node, it is necessary to call of_node_put() at the end to release the refcount. Signed-off-by: Yangtao Li --- drivers/cpufreq/tegra124-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/tegra124-cpufreq.c

[PATCH v2] cpufreq: tegra124: add missing of_node_put()

2019-02-03 Thread Yangtao Li
of_cpu_device_node_get() will increase the refcount of device_node, it is necessary to call of_node_put() at the end to release the refcount. Fixes: 9eb15dbbfa1a2 ("cpufreq: Add cpufreq driver for Tegra124") Cc: # 4.4+ Signed-off-by: Yangtao Li --- v2: - move of_node_put() to th

[PATCH] PM / wakeup: fix comment of pm_wakeup_dev_event()

2019-01-23 Thread Yangtao Li
This brings the kernel doc in line with the function signature. Signed-off-by: Yangtao Li --- drivers/base/power/wakeup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 5fa1898755a3..f1fee72ed970 100644 --- a

[PATCH v3 3/3] thermal: fix indentation in makefile

2019-05-25 Thread Yangtao Li
To unify code style. Signed-off-by: Yangtao Li --- drivers/thermal/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index fa6f8b206281..d7eafb5ef8ef 100644 --- a/drivers/thermal/Makefile +++ b/drivers

[PATCH v3 0/3] add thermal driver for h6

2019-05-25 Thread Yangtao Li
This patchset add support for H6 thermal sensor. BWY, do a cleanup in thermal makfile. Yangtao Li (3): thermal: sun8i: add thermal driver for h6 dt-bindings: thermal: add binding document for h6 thermal controller thermal: fix indentation in makefile .../bindings/thermal/sun8i

[PATCH v3 1/3] thermal: sun8i: add thermal driver for h6

2019-05-25 Thread Yangtao Li
This patch adds the support for allwinner thermal sensor, within allwinner SoC. It will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Yangtao Li --- MAINTAINERS | 7 + drivers/thermal/Kconfig | 14 + drivers

[PATCH v3 2/3] dt-bindings: thermal: add binding document for h6 thermal controller

2019-05-25 Thread Yangtao Li
This patch adds binding document for allwinner h6 thermal controller. Signed-off-by: Yangtao Li --- .../bindings/thermal/sun8i-thermal.yaml | 71 +++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml diff

[PATCH] alarmtimer: fix kerneldoc comment for alarmtimer_suspend

2019-05-25 Thread Yangtao Li
This brings the kernel doc in line with the function signature. Signed-off-by: Yangtao Li --- kernel/time/alarmtimer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 0519a8805aab..57518efc3810 100644 --- a/kernel/time/alarmtimer.c

[RESEND 1/2] nvmem: sunxi_sid: Support SID on H6

2019-04-04 Thread Yangtao Li
Add support for H6's SID controller. It supports 4K-bit EFUSE, bigger than before. Signed-off-by: Yangtao Li --- drivers/nvmem/sunxi_sid.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c index 7013f9cc43c7..a079a80ddf2c 1

[RESEND 2/2] arm64: dts: sunxi: h6: Add device node for SID

2019-04-04 Thread Yangtao Li
The device tree binding already lists compatible strings for H6 SoCs, so add a device node for iy. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot

[RESEND 0/2] nvmem: sunxi-sid: add SID controller support for H6

2019-04-04 Thread Yangtao Li
Add SID's support for H6. Yangtao Li (2): nvmem: sunxi_sid: Support SID on H6 arm64: dts: sunxi: h6: Add device node for SID arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 5 + drivers/nvmem/sunxi_sid.c| 6 ++ 2 files changed, 11 insertions(+) -- 2.17.0

[RESEND 2/2] arm64: dts: sunxi: h6: Add device node for SID

2019-04-04 Thread Yangtao Li
The device tree binding already lists compatible strings for H6 SoC, so add a device node for it. Signed-off-by: Yangtao Li --- fix typo: iy->it 0x3006000->0x03006000 --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/bo

[PATCH 2/2] dt-bindings: cpufreq: Document operating-points-v2-sunxi-cpu

2019-04-05 Thread Yangtao Li
M area containig the speedbin information) - opp-supported-hw: A single 32 bit bitmap value, representing compatible HW: 0: speedbin 0 1: speedbin 1 2: speedbin 2 3-31: unused Signe

[PATCH 0/2] cpufreq: Add sunxi nvmem based CPU scaling driver

2019-04-05 Thread Yangtao Li
Add sunxi nvmem based CPU scaling driver, refers to qcom-cpufreq-kryo. Yangtao Li (2): cpufreq: Add sunxi nvmem based CPU scaling driver dt-bindings: cpufreq: Document operating-points-v2-sunxi-cpu .../bindings/opp/sunxi-nvmem-cpufreq.txt | 235 + MAINTAINERS

[PATCH 1/2] cpufreq: Add sunxi nvmem based CPU scaling driver

2019-04-05 Thread Yangtao Li
value from the SoC to provide the OPP framework with required information. Signed-off-by: Yangtao Li --- MAINTAINERS | 7 + drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 2

[PATCH 2/3] thermal: sun50i: add thermal driver for h6

2019-05-12 Thread Yangtao Li
-off-by: Yangtao Li --- MAINTAINERS | 7 + drivers/thermal/Kconfig | 14 ++ drivers/thermal/Makefile | 1 + drivers/thermal/sun50i_thermal.c | 357 +++ 4 files changed, 379 insertions(+) create mode 100644 drivers/thermal

[PATCH 3/3] dt-bindings: thermal: add binding document for h6 thermal controller

2019-05-12 Thread Yangtao Li
This patch adds binding document for allwinner h6 thermal controller. Signed-off-by: Yangtao Li --- .../bindings/thermal/sun50i-thermal.txt | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/sun50i-thermal.txt diff

[PATCH 1/3] arm64: defconfig: add allwinner sid support

2019-05-12 Thread Yangtao Li
Sid contains speedbin information and temperature sensor calibration information and more, which are important for SOC. This patch enables CONFIG_NVMEM_SUNXI_SID by default. Signed-off-by: Yangtao Li --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH 0/3] add thermal driver for h6

2019-05-12 Thread Yangtao Li
This patchset support thermal driver of allwinner H6. Yangtao Li (3): arm64: defconfig: add allwinner sid support thermal: sun50i: add thermal driver for h6 dt-bindings: thermal: add binding document for h6 thermal controller .../bindings/thermal/sun50i-thermal.txt | 32

[PATCH] iio: adc: sun4i-gpadc-iio convert to SPDX license tags

2019-05-12 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 04d7147e0110..f13c6248a662 100644

[PATCH] arm64: dts: allwinner: h6: Enable HDMI output on orangepi 3

2019-04-20 Thread Yangtao Li
Orangepi 3 has HDMI type A connector. Signed-off-by: Yangtao Li --- rebase: sunxi/dt64-for-5.2 arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node --- .../dts/allwinner/sun50i-h6-orangepi-3.dts| 25 +++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64

[PATCH 7/7] iio: adc: sun4i-gpadc-iio convert to SPDX license tags

2019-05-03 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 9b6fc592f54c..cf2bf3ab3342 100644

[PATCH 2/7] iio: adc: sun4i-gpadc: introduce temp_data in gpadc_data

2019-05-03 Thread Yangtao Li
For some SOCs, the temperature data register start address may be different, so introduce temp_data in gpadc_data. Also modify read temperature to support multiple sensor. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

[PATCH 1/7] iio: adc: sun4i-gpadc: rework for support multiple thermal sensor

2019-05-03 Thread Yangtao Li
thermal_zone_device and distinguish between different sensors. 3) modify read temperature and initialization function. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 61 +++ 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/drivers/iio/adc

[PATCH 3/7] iio: adc: sun4i-gpadc: introduce gpadc_enable and gpadc_disable in gpadc_data

2019-05-03 Thread Yangtao Li
Different sensors may have different enable and disable functions, so introduce enable and disable in gpadc_data to support soc specific function. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 37 ++- 1 file changed, 31 insertions(+), 6 deletions

[PATCH 5/7] dt-bindings: mfd: Add H6 GPADC binding

2019-05-03 Thread Yangtao Li
This patch adds documentation for the H6 GPADC binding. Signed-off-by: Yangtao Li --- .../devicetree/bindings/mfd/sun4i-gpadc.txt | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt b/Documentation

[PATCH 6/7] iio: adc: sun4i-gpadc-iio: add support for H6 thermal sensor

2019-05-03 Thread Yangtao Li
This patch adds support for the H6 ths sensor. TODO: calibrate thermal sensor by using information from sid. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 65 +++ include/linux/mfd/sun4i-gpadc.h | 9 + 2 files changed, 74 insertions

[PATCH 4/7] iio: adc: sun4i-gpadc-iio: support clocks and reset

2019-05-03 Thread Yangtao Li
H6 has bus clock and a reset, so introduce something in gpadc_data/sun4i_gpadc_iio and adds the process of the clocks and resets. This is pre-work for supprt it. Signed-off-by: Yangtao Li --- drivers/iio/adc/sun4i-gpadc-iio.c | 32 +-- 1 file changed, 30 insertions

[PATCH 0/7] Add support for H6 thermal sensor

2019-05-03 Thread Yangtao Li
This patchset adds support for the H6 ths sensor. Based on IIO-based thermal sensor driver for Allwinner H3 and A83T SoC, thx to Philipp Rossak's work. TODO: calibrate thermal sensor by using information from sid. Yangtao Li (7): iio: adc: sun4i-gpadc: rework for support multiple th

[PATCH v5 01/18] thermal: sun8i: add thermal driver for h6

2019-08-09 Thread Yangtao Li
This patch adds the support for allwinner thermal sensor, within allwinner SoC. It will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Yangtao Li --- MAINTAINERS | 7 + drivers/thermal/Kconfig | 14 ++ drivers

[PATCH v5 00/18] add thermal driver for h6

2019-08-09 Thread Yangtao Li
thermal: sun8i: add support for Allwinner R40 thermal sensor Vasily Khoruzhick (1): thermal: sun8i: add thermal driver for A64 Yangtao Li (14): thermal: sun8i: add thermal driver for h6 dt-bindings: thermal: add binding document for h6 thermal controller thermal: fix indentation in makefile

[PATCH v5 02/18] dt-bindings: thermal: add binding document for h6 thermal controller

2019-08-09 Thread Yangtao Li
This patch adds binding document for allwinner h6 thermal controller. Signed-off-by: Yangtao Li --- .../bindings/thermal/sun8i-thermal.yaml | 79 +++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml diff

[PATCH v5 05/18] thermal: sun8i: rework for sun8i_ths_get_temp()

2019-08-09 Thread Yangtao Li
For different socs, the way they get and calculate the temperature is roughly the same. So get the difference from device compatible. Difference point: 1) temperature calculation formula parameters 2) ths data register start address Signed-off-by: Yangtao Li --- drivers/thermal

[PATCH v5 03/18] thermal: fix indentation in makefile

2019-08-09 Thread Yangtao Li
To unify code style. Signed-off-by: Yangtao Li --- drivers/thermal/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index fa6f8b206281..d7eafb5ef8ef 100644 --- a/drivers/thermal/Makefile +++ b/drivers

[PATCH v5 12/18] dt-bindings: thermal: add binding document for a64 thermal controller

2019-08-09 Thread Yangtao Li
This patch adds binding document for allwinner a64 thermal controller. Signed-off-by: Yangtao Li --- Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml b/Documentation

[PATCH v5 08/18] thermal: sun8i: support mod clocks

2019-08-09 Thread Yangtao Li
H3 has extra clock, so introduce something in ths_thermal_chip/ths_device and adds the process of the clock. This is pre-work for supprt it. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a

[PATCH v5 09/18] thermal: sun8i: rework for ths calibrate func

2019-08-09 Thread Yangtao Li
: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 86 ++--- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 6f4294c2aba7..47c20c4c69e7 100644 --- a/drivers/thermal/sun8i_thermal.c

<    1   2   3   4   >