[BACKPORT 4.14.y 0/8] candidates from spreadtrum 4.14 product kernel

3 messages, 2 authors, 2019-03-26 · open the first message on its own page

[BACKPORT 4.14.y 0/8] candidates from spreadtrum 4.14 product kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: 2019-03-22 16:18:37

I took a scripted approach to look at some product kernels for patches
backported into vendor kernels. This is a set of (mostly) bugfixes I found
in Spreadtrum's linux-4.14 kernel that are missing in v4.14.107:

83dc7e3dea76 scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1
099a95f3591a PCI: designware-ep: dw_pcie_ep_set_msi() should only set MMC bits
1cab826b30c6 PCI: designware-ep: Read-only registers need DBI_RO_WR_EN to be writable
b330104fa76d PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent()
36d46cdb43ef rtc: Fix overflow when converting time64_t to rtc_time
1b5d43cfb697 sched/cpufreq/schedutil: Fix error path mutex unlock
5fb5caee92ba pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.
f25a646fbe20 power: supply: charger-manager: Fix incorrect return value

Only a small number of patches here, the vendor tree is fairly close to
mainline. All commits apply cleanly through git-cherry-pick.

Baolin Wang (2):
  rtc: Fix overflow when converting time64_t to rtc_time
  power: supply: charger-manager: Fix incorrect return value

Enric Balletbo i Serra (1):
  pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.

Jules Maselbas (1):
  sched/cpufreq/schedutil: Fix error path mutex unlock

Kishon Vijay Abraham I (1):
  PCI: endpoint: Use EPC's device in
    dma_alloc_coherent()/dma_free_coherent()

Niklas Cassel (2):
  PCI: designware-ep: dw_pcie_ep_set_msi() should only set MMC bits
  PCI: designware-ep: Read-only registers need DBI_RO_WR_EN to be
    writable

kehuanlin (1):
  scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1

 drivers/pci/dwc/pcie-designware-ep.c   | 12 +++++++++++-
 drivers/pci/dwc/pcie-designware.h      |  1 +
 drivers/pci/endpoint/pci-epc-core.c    | 10 ----------
 drivers/pci/endpoint/pci-epf-core.c    |  4 ++--
 drivers/power/supply/charger-manager.c |  3 +--
 drivers/rtc/rtc-lib.c                  |  6 ++----
 drivers/scsi/ufs/ufshcd.c              | 14 ++++++++------
 drivers/video/backlight/pwm_bl.c       |  9 +++++----
 kernel/sched/cpufreq_schedutil.c       |  3 +--
 9 files changed, 31 insertions(+), 31 deletions(-)


Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Joao Pinto <redacted>
Cc: Lorenzo Pieralisi <redacted>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Kishon Vijay Abraham I <redacted>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Alessandro Zummo <redacted>
Cc: Alexandre Belloni <redacted>
Cc: Vinayak Holikatti <redacted>
Cc: "James E.J. Bottomley" <redacted>
Cc: "Martin K. Petersen" <redacted>
Cc: Thierry Reding <redacted>
Cc: Lee Jones <redacted>
Cc: Daniel Thompson <redacted>
Cc: Bartlomiej Zolnierkiewicz <redacted>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: linux-pwm@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org

-- 
2.20.0

[BACKPORT 4.14.y 7/8] pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.

From: Arnd Bergmann <arnd@arndb.de>
Date: 2019-03-22 16:18:30

From: Enric Balletbo i Serra <redacted>

Before this patch the enable signal was set before the PWM signal and
vice-versa on power off. This sequence is wrong, at least, it is on
the different panels datasheets that I checked, so I inverted the sequence
to follow the specs.

For reference the following panels have the mentioned sequence:
  - N133HSE-EA1 (Innolux)
  - N116BGE (Innolux)
  - N156BGE-L21 (Innolux)
  - B101EAN0 (Auo)
  - B101AW03 (Auo)
  - LTN101NT05 (Samsung)
  - CLAA101WA01A (Chunghwa)

Signed-off-by: Enric Balletbo i Serra <redacted>
Acked-by: Daniel Thompson <redacted>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Acked-by: Thierry Reding <redacted>
Signed-off-by: Lee Jones <redacted>
(cherry picked from commit 5fb5caee92ba35a4a3baa61d45a78eb057e2c031)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/video/backlight/pwm_bl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 0fa7d2bd0e48..155153ecb894 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -54,10 +54,11 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness)
 	if (err < 0)
 		dev_err(pb->dev, "failed to enable power supply\n");
 
+	pwm_enable(pb->pwm);
+
 	if (pb->enable_gpio)
 		gpiod_set_value_cansleep(pb->enable_gpio, 1);
 
-	pwm_enable(pb->pwm);
 	pb->enabled = true;
 }
 
@@ -66,12 +67,12 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb)
 	if (!pb->enabled)
 		return;
 
-	pwm_config(pb->pwm, 0, pb->period);
-	pwm_disable(pb->pwm);
-
 	if (pb->enable_gpio)
 		gpiod_set_value_cansleep(pb->enable_gpio, 0);
 
+	pwm_config(pb->pwm, 0, pb->period);
+	pwm_disable(pb->pwm);
+
 	regulator_disable(pb->power_supply);
 	pb->enabled = false;
 }
-- 
2.20.0

Re: [BACKPORT 4.14.y 0/8] candidates from spreadtrum 4.14 product kernel

From: Greg KH <hidden>
Date: 2019-03-26 02:27:06

On Fri, Mar 22, 2019 at 05:17:15PM +0100, Arnd Bergmann wrote:
I took a scripted approach to look at some product kernels for patches
backported into vendor kernels. This is a set of (mostly) bugfixes I found
in Spreadtrum's linux-4.14 kernel that are missing in v4.14.107:

83dc7e3dea76 scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1
099a95f3591a PCI: designware-ep: dw_pcie_ep_set_msi() should only set MMC bits
1cab826b30c6 PCI: designware-ep: Read-only registers need DBI_RO_WR_EN to be writable
b330104fa76d PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent()
36d46cdb43ef rtc: Fix overflow when converting time64_t to rtc_time
1b5d43cfb697 sched/cpufreq/schedutil: Fix error path mutex unlock
5fb5caee92ba pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.
f25a646fbe20 power: supply: charger-manager: Fix incorrect return value

Only a small number of patches here, the vendor tree is fairly close to
mainline. All commits apply cleanly through git-cherry-pick.
Thanks for these, now queued up to 4.14.y and a few other branches that
needed them.

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help