[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 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 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

[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 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 --git

[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 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 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-dmc.c index

[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/venus

[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 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

[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 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 +++ b

[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 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/spi/spi-geni

[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 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(-) diff --git

[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 05/31] opp: Add devres wrapper for dev_pm_opp_register_notifier

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

[PATCH 04/31] opp: Add devres wrapper for dev_pm_opp_of_add_table

2021-01-01 Thread Yangtao Li
Add devres wrapper for dev_pm_opp_of_add_table() to simplify driver code. Signed-off-by: Yangtao Li --- drivers/opp/of.c | 36 include/linux/pm_opp.h | 6 ++ 2 files changed, 42 insertions(+) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index

[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 02/31] opp: Add devres wrapper for dev_pm_opp_set_regulators and dev_pm_opp_put_regulators

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

[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

[PATCH 00/31] Introduce devm_pm_opp_* API

2021-01-01 Thread Yangtao Li
Hi, This patchset add devm_pm_opp_set_clkname, devm_pm_opp_put_clkname, devm_pm_opp_set_regulators, devm_pm_opp_put_regulators, devm_pm_opp_set_supported_hw, devm_pm_opp_of_add_table and devm_pm_opp_register_notifier. Yangtao Li (31): opp: Add devres wrapper for dev_pm_opp_set_clkname

[PATCH v5 13/18] thermal: sun8i: add thermal driver for A64

2019-08-09 Thread Yangtao Li
From: Vasily Khoruzhick Thermal sensor controller in A64 is similar to H3, but it has 3 sensors. Extend H3 functions to add support for multiple sensors. Signed-off-by: Vasily Khoruzhick --- drivers/thermal/sun8i_thermal.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v5 18/18] thermal: sun8i: add support for Allwinner R40 thermal sensor

2019-08-09 Thread Yangtao Li
From: Icenowy Zheng The thermal sensor in Allwinner R40 SoC is quite similar to the one in Allwinner A64 SoC, with only slightly different temperature calculation formula. Signed-off-by: Icenowy Zheng --- drivers/thermal/sun8i_thermal.c | 12 1 file changed, 12 insertions(+)

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

2019-08-09 Thread Yangtao Li
This patch adds binding document for allwinner r40 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 16/18] thermal: sun8i: add support for Allwinner H5 thermal sensor

2019-08-09 Thread Yangtao Li
From: Icenowy Zheng The thermal sensor in Allwinner H5 has 2 sensors, and they have a special segmented temperature calculation formula. Add support for this thermal sensor. Signed-off-by: Icenowy Zheng --- drivers/thermal/sun8i_thermal.c | 21 + 1 file changed, 21

[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

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

2019-08-09 Thread Yangtao Li
-by: 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

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

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

[PATCH v5 06/18] thermal: sun8i: get ths init func from device compatible

2019-08-09 Thread Yangtao Li
There are some differences in register initialization for different socs. So we get different initialization functions from device compatible. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/thermal

[PATCH v5 15/18] thermal: sun8i: allow to use custom temperature calculation function

2019-08-09 Thread Yangtao Li
From: Icenowy Zheng The H5 temperature calculation function is strange. Firstly, it's segmented. Secondly, the formula of two sensors are different in the second segment. Allow to use a custom temperature calculation function, in case of the function is complex. Signed-off-by: Icenowy Zheng

[PATCH v5 04/18] thermal: sun8i: get ths sensor number from device compatible

2019-08-09 Thread Yangtao Li
For different socs, the number of ths sensors is different. So we need to do some work in order to support more soc. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/thermal

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

2019-08-09 Thread Yangtao Li
This patch adds binding document for allwinner h5 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 13/18] thermal: sun8i: add thermal driver for A64

2019-08-09 Thread Yangtao Li
From: Vasily Khoruzhick Thermal sensor controller in A64 is similar to H3, but it has 3 sensors. Extend H3 functions to add support for multiple sensors. Signed-off-by: Vasily Khoruzhick --- drivers/thermal/sun8i_thermal.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v5 11/18] thermal: sun8i: add thermal driver for h3

2019-08-09 Thread Yangtao Li
This patch adds the support for allwinner h3 thermal sensor. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 91 + 1 file changed, 91 insertions(+) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 47c20c4c69e7

[PATCH v5 07/18] thermal: sun8i: rework for ths irq handler func

2019-08-09 Thread Yangtao Li
Here, we do something to prepare for the subsequent support of multiple platforms. 1) rename sun50i_h6_irq_thread to sun8i_irq_thread, because this function should be suitable for all platforms. 2) introduce irq_ack callback to mask interrupt register differences. Signed-off-by: Yangtao

[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 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 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 v4 08/11] thermal: sun8i: support ahb clocks

2019-06-23 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

[PATCH v4 05/11] thermal: sun8i: rework for sun8i_ths_get_temp()

2019-06-23 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 v4 04/11] thermal: sun8i: get ths sensor number from device compatible

2019-06-23 Thread Yangtao Li
For different socs, the number of ths sensors is different. So we need to do some work in order to support more soc. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/thermal

[PATCH v4 09/11] thermal: sun8i: rework for ths calibrate func

2019-06-23 Thread Yangtao Li
-by: 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 04f53ffb6a14..260b24340f5b 100644 --- a/drivers/thermal/sun8i_thermal.c

[PATCH v4 00/11] add thermal driver for h6

2019-06-23 Thread Yangtao Li
This patchset add support for H3 and H6 thermal sensor. BTY, do a cleanup in thermal makfile. Yangtao Li (11): thermal: sun8i: add thermal driver for h6 dt-bindings: thermal: add binding document for h6 thermal controller thermal: fix indentation in makefile thermal: sun8i: get ths

[PATCH v4 01/11] thermal: sun8i: add thermal driver for h6

2019-06-23 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 v4 03/11] thermal: fix indentation in makefile

2019-06-23 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 v4 10/11] dt-bindings: thermal: add binding document for h3 thermal controller

2019-06-23 Thread Yangtao Li
This patch adds binding document for allwinner h3 thermal controller. Signed-off-by: Yangtao Li --- .../bindings/thermal/sun8i-thermal.yaml | 29 +-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml

[PATCH v4 11/11] thermal: sun8i: add thermal driver for h3

2019-06-23 Thread Yangtao Li
This patch adds the support for allwinner h3 thermal sensor. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 72 + 1 file changed, 72 insertions(+) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 260b24340f5b

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

2019-06-23 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 v4 06/11] thermal: sun8i: get ths init func from device compatible

2019-06-23 Thread Yangtao Li
There are some differences in register initialization for different socs. So we get different initialization functions from device compatible. Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/thermal

[PATCH v4 07/11] thermal: sun8i: rework for ths irq handler func

2019-06-23 Thread Yangtao Li
Here, we do something to prepare for the subsequent support of multiple platforms. 1) rename sun50i_h6_irq_thread to sun8i_irq_thread, because this function should be suitable for all platforms. 2) introduce irq_ack callback to mask interrupt register differences. Signed-off-by: Yangtao

[tip:timers/core] alarmtimer: Fix kerneldoc comment for alarmtimer_suspend()

2019-06-14 Thread tip-bot for Yangtao Li
Commit-ID: 141e1ecda356bb0034027a9acb949e97a963ba16 Gitweb: https://git.kernel.org/tip/141e1ecda356bb0034027a9acb949e97a963ba16 Author: Yangtao Li AuthorDate: Sat, 25 May 2019 14:39:25 -0400 Committer: Thomas Gleixner CommitDate: Fri, 14 Jun 2019 17:04:04 +0200 alarmtimer: Fix

[PATCH v2] iommu/omap: convert to SPDX license tags

2019-06-13 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li Acked-by: Suman Anna --- v2: -add include/linux/platform_data/iommu-omap.h --- drivers/iommu/omap-iommu-debug.c | 5 + drivers/iommu/omap-iommu.c | 5 + drivers/iommu/omap-iommu.h

[PATCH 04/10] iommu/qcom: convert to SPDX license tags

2019-06-13 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li --- drivers/iommu/qcom_iommu.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index 8cdd3f059513..ad913720d7dd 100644

[PATCH 08/10] iommu/sysfs: convert to SPDX license tags

2019-06-13 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li --- drivers/iommu/iommu-sysfs.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c index 44127d54e943..a193758c8122 100644 --- a/drivers/iommu

[PATCH 01/10] iommu/exynos: convert to SPDX license tags

2019-06-13 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li --- drivers/iommu/exynos-iommu.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 05c6bc099d62..938a33d2f89d 100644 --- a/drivers

[RESEND, PATCH v4 1/2] cpufreq: Add sun50i nvmem based CPU scaling driver

2019-06-12 Thread Yangtao Li
For some SoCs, the CPU frequency subset and voltage value of each OPP varies based on the silicon variant in use. The sun50i-cpufreq-nvmem driver reads the efuse value from the SoC to provide the OPP framework with required information. Signed-off-by: Yangtao Li Acked-by: Maxime Ripard

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

2019-06-12 Thread Yangtao Li
Add sunxi nvmem based CPU scaling driver, refers to qcom-cpufreq-kryo. Yangtao Li (2): cpufreq: Add sun50i nvmem based CPU scaling driver dt-bindings: cpufreq: Document allwinner,sun50i-h6-operating-points .../bindings/opp/sun50i-nvmem-cpufreq.txt | 167 + MAINTAINERS

[RESEND, PATCH v4 2/2] dt-bindings: cpufreq: Document allwinner,sun50i-h6-operating-points

2019-06-12 Thread Yangtao Li
-microvolt-: voltage in micro Volts. At runtime, the platform can pick a and matching opp-microvolt- property. HW: : sun50i-h6 speed0 speed1 speed2 Signed-off-by: Yangtao Li Acked-by: Maxime Ripard --- .../bindings/opp/sun5

[tip:timers/core] hrtimer: Remove unused header include

2019-06-12 Thread tip-bot for Yangtao Li
Commit-ID: 0e5aa23282f8e6ee38c18f67ddfdaaa32d3df86b Gitweb: https://git.kernel.org/tip/0e5aa23282f8e6ee38c18f67ddfdaaa32d3df86b Author: Yangtao Li AuthorDate: Fri, 7 Jun 2019 13:42:53 -0400 Committer: Thomas Gleixner CommitDate: Wed, 12 Jun 2019 10:21:17 +0200 hrtimer: Remove unused

[PATCH 4/5] random: fix typo in add_timer_randomness()

2019-06-07 Thread Yangtao Li
s/entimate/estimate Signed-off-by: Yangtao Li --- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index f0c834af14a8..885707ac8e3b 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1247,7

[PATCH 5/5] random: remove some dead code of poolinfo

2019-06-07 Thread Yangtao Li
Since it is not being used, so delete it. Signed-off-by: Yangtao Li --- drivers/char/random.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 885707ac8e3b..d83401e35f71 100644 --- a/drivers/char/random.c +++ b

[PATCH 3/5] random: Add and use pr_fmt()

2019-06-07 Thread Yangtao Li
Prefix all printk/pr_ messages with "random: " to make the logging a bit more consistent. Miscellanea: o Convert a printks to pr_notice o Whitespace to align to open parentheses o Remove embedded "random: " from pr_* as pr_fmt adds it Signed-off-by: Yangtao Li --- driver

[PATCH 2/5] random: convert to ENTROPY_BITS

2019-06-07 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to enhance code readability. Signed-off-by: Yangtao Li --- drivers/char/random.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index bebf622c61c4..d714a458f088 100644 --- a/drivers

[PATCH 1/5] random: remove unnecessary unlikely()

2019-06-07 Thread Yangtao Li
WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li --- drivers/char/random.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 5d5ea4ce1442..bebf622c61c4 100644

[PATCH] hrtimer: remove unused header files

2019-06-07 Thread Yangtao Li
seq_file.h does not need to be included, so remove it. Signed-off-by: Yangtao Li --- kernel/time/hrtimer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 41dfff23c1f9..edb230aba3d1 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time

[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

[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 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 v2 1/2] thermal: sun8i: add thermal driver for h6

2019-05-16 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 v2 2/2] dt-bindings: thermal: add binding document for h6 thermal controller

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

[PATCH v2 0/2] add thermal driver for h6

2019-05-16 Thread Yangtao Li
This patchset supprt H6 thermal controller. Yangtao Li (2): thermal: sun8i: add thermal driver for h6 dt-bindings: thermal: add binding document for h6 thermal controller .../bindings/thermal/sun8i-thermal.txt| 34 ++ MAINTAINERS | 7 + drivers

[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 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 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 thermal

[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 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 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 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 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

  1   2   3   4   5   >