[PATCH v2] cpufreq: nforce2: Remove meaningless return

2018-12-05 Thread Yangtao Li
Delete a line of meaningless return and some useless blank lines. In a function whose return type is void, returning on the last line is not required. Signed-off-by: Yangtao Li --- Changes in v2: -revert modify of MODULE_ -delete some blank lines --- drivers/cpufreq/cpufreq-nforce2.c | 3 --- 1

[PATCH 4/4] dmaengine: qcom_hidma: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-05 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Sinan Kaya --- drivers/dma/qcom/hidma_dbg.c | 33 ++--- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom

[PATCH 3/4] dmaengine: pxa: remove DBGFS_FUNC_DECL()

2018-12-05 Thread Yangtao Li
We already have the DEFINE_SHOW_ATTRIBUTE, There is no need to define such a macro, so remove DBGFS_FUNC_DECL. Signed-off-by: Yangtao Li Acked-by: Robert Jarzmik --- drivers/dma/pxa_dma.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git

[PATCH 1/4] dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-05 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/dma/amba-pl08x.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 97483df1f82e..fc8c2bab563c 100644

[PATCH 2/4] dmaengine: mic_x100_dma: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-05 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/dma/mic_x100_dma.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c index adfd316db1a8..6a91e28d537d

[PATCH] usb: host: isp1362-hcd: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-05 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/usb/host/isp1362-hcd.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index b21c386e6a46

[PATCH] softirq: modify comments about PF_MEMALLOC in __do_softirq

2018-10-18 Thread Yangtao Li
--- kernel/softirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index 6f584861d329..6193e1d1b30d 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -257,7 +257,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)

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

2019-04-16 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 allwinner,sun50i-h6-operating-points .../bindings/opp/sun50i-nvmem-cpufreq.txt | 167 + MAINTAINERS

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

2019-04-16 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 --- MAINTAINERS

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

2019-04-16 Thread Yangtao Li
-microvolt-: voltage in micro Volts. At runtime, the platform can pick a and matching opp-microvolt- property. HW: : sun50iw-h6 speed0 speed1 speed2 Signed-off-by: Yangtao Li --- .../bindings/opp/sun50i-nvmem-cpufreq.txt | 167 +

[PATCH] PM / Domains: remove unnecessary unlikely()

2019-04-16 Thread Yangtao Li
WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li --- drivers/base/power/domain.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 96a6dc9d305c

[RESEND] dt-bindings: cpufreq: Document allwinner,sun50i-h6-operating-points

2019-04-18 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 --- just fix a typo: sun

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

[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 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] 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
); } The 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 changed, 23 inserti

[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] interconnect: convert to DEFINE_SHOW_ATTRIBUTE

2019-03-27 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/interconnect/core.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 6005a1c189f6..871eb4bc4efc 100644

[PATCH v2 0/5] nvmem: sunxi-sid: add SID controller support for H6

2019-04-02 Thread Yangtao Li
Add SID support for H6, and do some cleanup. For endianness issue, add a new ref_read func. Yangtao Li (5): nvmem: sunxi-sid: fix wrong description in kernel doc nvmem: sunxi-sid: add binding for H6's SID controller nvmem: sunxi-sid: convert to SPDX license tags nvmem: sunxi-sid: add new

[PATCH v2 2/5] nvmem: sunxi-sid: add binding for H6's SID controller

2019-04-02 Thread Yangtao Li
Add a binding for H6's SID controller. Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Yangtao Li --- Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi

[PATCH v2 3/5] nvmem: sunxi-sid: convert to SPDX license tags

2019-04-02 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Acked-by: Maxime Ripard Signed-off-by: Yangtao Li --- drivers/nvmem/sunxi_sid.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c index 570a2e354f30..54620d72ddb9

[PATCH v2 4/5] nvmem: sunxi-sid: add new reg_read func

2019-04-02 Thread Yangtao Li
Because there was an endianness issue. It seems that reg_read function which the nvmem the driver currently exposes is wrong. So add the new read function, the new function is used when the native_endian flag is set. Signed-off-by: Yangtao Li --- drivers/nvmem/sunxi_sid.c | 29

[PATCH v2 5/5] nvmem: sunxi-sid: add support for H6's SID controller

2019-04-02 Thread Yangtao Li
Add support for H6's SID controller. It supports 4K-bit EFUSE, bigger than before. And convert to use sunxi_sid_read_native func. Signed-off-by: Yangtao Li --- drivers/nvmem/sunxi_sid.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem

[PATCH v2 1/5] nvmem: sunxi-sid: fix wrong description in kernel doc

2019-04-02 Thread Yangtao Li
qfprom->sunxi-sid Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Yangtao Li --- Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.

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

2019-04-09 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 sunxi-cpufreq-nvmem driver reads the efuse value from the SoC to provide the OPP framework with required information. Signed-off-by: Yangtao Li --- MAINTAINERS

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

2019-04-09 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 | 166 + MAINTAINERS

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

2019-04-09 Thread Yangtao Li
t-: voltage in micro Volts. At runtime, the platform can pick a and matching opp-microvolt- property Signed-off-by: Yangtao Li --- .../bindings/opp/sunxi-nvmem-cpufreq.txt | 166 ++ 1 file changed, 166 insertions(+) create mode 100644 Documentation/devicetree/bind

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

2019-04-10 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 allwinner,cpu-operating-points-v2 .../bindings/opp/sunxi-nvmem-cpufreq.txt | 168 + MAINTAINERS

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

2019-04-10 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 sunxi-cpufreq-nvmem driver reads the efuse value from the SoC to provide the OPP framework with required information. Signed-off-by: Yangtao Li --- MAINTAINERS

[PATCH v3 2/2] dt-bindings: cpufreq: Document allwinner,cpu-operating-points-v2

2019-04-10 Thread Yangtao Li
t-: voltage in micro Volts. At runtime, the platform can pick a and matching opp-microvolt- property. HW: : sun50iw-h6 speed0 speed1 speed2 Signed-off-by: Yangtao Li --- .../bindings/opp/sunxi-nvmem-cpufreq.txt | 168 +

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

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

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

2019-02-15 Thread Yangtao Li
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 file

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

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

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

[PATCH 0/3] PM / devfreq: do some cleanup

2019-02-16 Thread Yangtao Li
The informations come from the coccinelle tool. drivers/devfreq/tegra-devfreq.c:577:5-8: Unneeded variable: "ret". Return "0" on line 603 drivers/devfreq/rk3399_dmc.c:325:2-3: Unneeded semicolon drivers/devfreq/event/rockchip-dfi.c:214:2-3: Unneeded semicolon Yangtao Li

[PATCH 2/3] PM / devfreq: rockchip-dfi: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/devfreq/event/rockchip-dfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c index 22b113363ffc..fcbf76ebf55d 100644

[PATCH 1/3] PM / devfreq: rk3399_dmc: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/devfreq/rk3399_dmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index e795ad2b3f6b..a228dad2bee4 100644 --- a/drivers/devfreq

[PATCH 3/3] PM / devfreq: tegra: remove unneeded variable

2019-02-16 Thread Yangtao Li
This variable is not used after initialization, so remove it. And in order to unify the code style, move the location where the dev_get_drvdata is called by the way. Signed-off-by: Yangtao Li --- drivers/devfreq/tegra-devfreq.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff

[PATCH 0/2] cpufreq: do some cleanup

2019-02-16 Thread Yangtao Li
The informations come from the coccinelle tool. drivers/cpufreq/longhaul.c:854:2-3: Unneeded semicolon drivers/cpufreq/pcc-cpufreq.c:271:2-3: Unneeded semicolon Yangtao Li (2): cpufreq: pcc-cpufreq: remove unneeded semicolon cpufreq: longhaul: remove unneeded semicolon drivers/cpufreq

[PATCH 2/2] cpufreq: longhaul: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/cpufreq/longhaul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index 279bd9e9fa95..fb546e0d0356 100644 --- a/drivers/cpufreq/longhaul.c

[PATCH 1/2] cpufreq: pcc-cpufreq: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/cpufreq/pcc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index 099a849396f6..1e5e64643c3a 100644 --- a/drivers/cpufreq

[PATCH] cpufreq: speedstep: convert BUG() to BUG_ON()

2019-02-16 Thread Yangtao Li
To fix coccinelle WARNING. WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Yangtao Li --- drivers/cpufreq/speedstep-ich.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index

[PATCH] cpufreq: scmi: fix use-after-free in scmi_cpufreq_exit()

2019-02-16 Thread Yangtao Li
This issue was detected with the help of Coccinelle. So change the order of function calls to fix it. Fixes: 1690d8bb91e37 (cpufreq: scpi/scmi: Fix freeing of dynamic OPPs) Signed-off-by: Yangtao Li --- drivers/cpufreq/scmi-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()

2019-02-16 Thread Yangtao Li
-off-by: Yangtao Li --- drivers/cpufreq/powernv-cpufreq.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 7e7ad3879c4e..d2230812fa4b 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b

[PATCH 1/5] nvmem: sunxi-sid: fix wrong description in kernel doc

2019-02-17 Thread Yangtao Li
qfprom->sunxi-sid Signed-off-by: Yangtao Li --- Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nv

[PATCH 0/5] nvmem: sunxi-sid: add SID controller support for H5 and H6

2019-02-17 Thread Yangtao Li
Add SID controller support for H5 and H6, and do some cleanup without functional changes. Yangtao Li (5): nvmem: sunxi-sid: fix wrong description in kernel doc nvmem: sunxi-sid: add support for H5's SID controller nvmem: sunxi-sid: add binding for H6's SID controller nvmem: sunxi-sid: add

[PATCH 2/5] nvmem: sunxi-sid: add support for H5's SID controller

2019-02-17 Thread Yangtao Li
Add support for H5's SID controller. 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 570a2e354f30..036029e90921 100644 --- a/drivers/nvmem/sunxi_sid.c +++ b/drivers

[PATCH 5/5] nvmem: sunxi-sid: convert to SPDX license tags

2019-02-17 Thread Yangtao Li
Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li --- drivers/nvmem/sunxi_sid.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c index 8692b58d76ce..f56c9f713cb4 100644 --- a/drivers

[PATCH 3/5] nvmem: sunxi-sid: add binding for H6's SID controller

2019-02-17 Thread Yangtao Li
Add a binding for H6's SID controller. Signed-off-by: Yangtao Li --- Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem

[PATCH 4/5] nvmem: sunxi-sid: add support for H6's SID controller

2019-02-17 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 036029e90921..8692b58d76ce 100644

[PATCH] clocksource: arm_arch_timer: remove unneeded pr_fmt macro

2019-03-05 Thread Yangtao Li
After this commit ded24019b6b6f(clocksource: arm_arch_timer: clean up printk usage), the previous macro is redundant, so delete it. And move the new macro to the previous position. Signed-off-by: Yangtao Li --- drivers/clocksource/arm_arch_timer.c | 5 + 1 file changed, 1 insertion(+), 4

[PATCH] of: thermal: Improve print information

2019-02-23 Thread Yangtao Li
: Registered protocol family 2 Signed-off-by: Yangtao Li --- drivers/thermal/of-thermal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 4bfdb4a1e47d..02b5e78f027b 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal

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

[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/devfreq.c | 33

[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 b/drivers

[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] 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] dmaengine: remove DBGFS_FUNC_DECL()

2018-11-30 Thread Yangtao Li
We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define such a macro,so remove DBGFS_FUNC_DECL.Also use macro to simplify some code. Signed-off-by: Yangtao Li --- drivers/dma/amba-pl08x.c | 14 ++ drivers/dma/mic_x100_dma.c | 22 +++--- drivers/dma

[PATCH] gpio: ks8695: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-30 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/gpio/gpio-ks8695.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-ks8695.c b/drivers/gpio/gpio-ks8695.c index 55d562e1278e..d6d6140ffc40 100644

[PATCH] pinctrl: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-30 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/pinctrl/pinconf.c | 29 - drivers/pinctrl/pinmux.c | 29 - 2 files changed, 8 insertions(+), 50 deletions(-) diff --git a/drivers/pinctrl

[PATCH] ACPI, APEI, EINJ: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-30 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/acpi/apei/einj.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c index b38737c83a24..fcccbfdbdd1a 100644 --- a/drivers

[PATCH] binder: remove BINDER_DEBUG_ENTRY()

2018-11-30 Thread Yangtao Li
We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define such a macro,so remove BINDER_DEBUG_ENTRY. Signed-off-by: Yangtao Li --- drivers/android/binder.c | 48 ++-- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/drivers/android

[PATCH] driver core: remove define_genpd_open_function() and define_genpd_debugfs_fops()

2018-11-30 Thread Yangtao Li
We already have the DEFINE_SHOW_ATTRIBUTE,There is no need to define such a macro,so remove define_genpd_open_function and define_genpd_debugfs_fops. Also use DEFINE_SHOW_ATTRIBUTE to simplify somecode. Signed-off-by: Yangtao Li --- drivers/base/component.c | 12 + drivers/base

[PATCH] drivers/fmc: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-30 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/fmc/fmc-debug.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/fmc/fmc-debug.c b/drivers/fmc/fmc-debug.c index 32930722770c..c923d076c807 100644

[PATCH] bus: mvebu-mbus: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-30 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/bus/mvebu-mbus.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index 5b2a11a88951..3aaaf484857f 100644

<    1   2   3   4   5   >