Re: [PATCH 00/15 v4] Regulator ena_gpiod fixups

2018-12-06 Thread Marek Szyprowski
Feel free to add my: Reviewed-by: Marek Szyprowski and Tested-by: Marek Szyprowski (to patches: 1-2, 5-10 and 13-15). One more thing - if I got everything right, gpiod_put() in *regulator_register() error path has to be removed also in wm8994-regulator.c and arizona-ldo1.c. > To make sur

Re: [PATCH] ARM: dts: exynos: Add proper regulator states for suspend-to-mem for odroid-u3

2018-12-06 Thread Marek Szyprowski
Hi All, On 2018-12-06 09:25, Marek Szyprowski wrote: > On 2018-12-05 17:11, Anand Moon wrote: >> On Wed, 5 Dec 2018 at 19:36, Krzysztof Kozlowski wrote: >>> On Tue, 4 Dec 2018 at 20:40, Anand Moon wrote: >>>> Add suspend-to-mem node to regulator core to be enabled

Re: [PATCH] ARM: dts: exynos: Add proper regulator states for suspend-to-mem for odroid-u3

2018-12-06 Thread Marek Szyprowski
; Well I have tested this patch as following > with only one issue, before enable suspend number of On-line cpu is 4 > after resume number of On-line cpu is 1. This seems to be a regression in v4.20-rc1, not related to dts changes at all. I'm investigating this now... > ... Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [PATCH 10/15 v3] gpio: devres: Handle nonexclusive GPIOs

2018-12-05 Thread Marek Szyprowski
alls to account for this by checking if the descriptor > is already resource managed before we proceed to allocate > a new resource management struct. > > Cc: Mark Brown > Cc: Bartosz Golaszewski > Cc: Marek Szyprowski > Fixes: b0ce7b29bfcd ("regulator/gpio: Allow nonexc

Re: [PATCH 11/15 v3] gpio: Add devm_gpiod_unhinge()

2018-12-05 Thread Marek Szyprowski
gpio_desc *desc) > WARN_ON(1); > } > > +static inline void devm_gpiod_unhinge(struct device *dev, > + struct gpio_desc *desc) > +{ > + might_sleep(); > + > + /* GPIO can never have been requested */ > + WARN_ON(1); > +} > + > static inline void gpiod_put_array(struct gpio_descs *descs) > { > might_sleep(); Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups

2018-12-05 Thread Marek Szyprowski
Hi Linus, On 2018-12-04 13:44, Linus Walleij wrote: > On Tue, Dec 4, 2018 at 11:33 AM Marek Szyprowski > wrote: > >>>> Artik5 evaluation board (arch/arm/boot/dts/exynos3250-artik5-eval.dtb): >>>> s2mps11-pmic s2mps14-regulator: Failed to get contr

Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups

2018-12-04 Thread Marek Szyprowski
Hi Linus, On 2018-12-04 10:31, Linus Walleij wrote: > Hi Marek, > > first, thanks a *lot* for testing this, it is is much, much appreciated! > > On Mon, Dec 3, 2018 at 3:35 PM Marek Szyprowski > wrote: > >> The idea is good imho, but it looks that there are some m

Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups

2018-12-03 Thread Marek Szyprowski
| 10 +++-- > drivers/regulator/max8973-regulator.c | 23 +++ > drivers/regulator/s2mps11.c| 7 +++- > drivers/regulator/s5m8767.c| 9 - > drivers/regulator/tps65090-regulator.c | 6 +++ > include/linux/gpio/consumer.h | 23 +++ > 15 files changed, 161 insertions(+), 38 deletions(-) > Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [PATCH 3/3] gpio: Add reference counting for non-exclusive GPIOs

2018-11-23 Thread Marek Szyprowski
nly a single one can free it. Rather than > manually handling this in each driver add some basic reference > counting into the core. Currently, this is fairly primitive but > so is the support for the NONEXCLUSIVE flag and the implementation > covers those use-cases. > > Reported-

Re: [PATCH 2/3] regulator: Only free GPIOs if the core requested them

2018-11-23 Thread Marek Szyprowski
ree the GPIO if it requested it, this allows the drivers to manage the > GPIO lifetime as they normally would. > > Reported-by: Marek Szyprowski > Signed-off-by: Charles Keepax Tested-by: Marek Szyprowski > --- > drivers/regulator/core.c | 19 +++ > 1 file chang

Re: [PATCH 1/3] regulator: wm8994: Revert back to using devres

2018-11-23 Thread Marek Szyprowski
ver free > the GPIO but that makes the handling in the regulator core rather > complex. Ultimately it makes more sense to handle the shared GPIO > in the core. > > Reported-by: Marek Szyprowski > Signed-off-by: Charles Keepax Thanks for sorting this out! Works fine on Trats2: Test

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Marek Szyprowski
Hi Mark, On 2018-11-21 13:19, Mark Brown wrote: > On Wed, Nov 21, 2018 at 10:26:30AM +0100, Marek Szyprowski wrote: > >> from wm8994_ldo_remove(), switched to regulator_register() in >> wm8994_ldo_probe() and added regulator_unregister() in >> wm8994_ldo_remove(). This

Re: [PATCH v2] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Marek Szyprowski
Hi Charles, On 2018-11-21 11:13, Charles Keepax wrote: > The regulator core takes over managing the lifetime of the enable GPIO > once the regulator is registered. As such we shouldn't register the > enable GPIO using devm, or it will be freed twice. > > Reported-by: Marek Szypr

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Marek Szyprowski
Hi, On 2018-11-20 18:25, Marek Szyprowski wrote: > Hi Charles, > > On 2018-11-20 18:01, Charles Keepax wrote: >> We need to manage the life time of the enable GPIO against the regulator >> device but the OF node lives on the parent MFD device. As such we can't >> u

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-20 Thread Marek Szyprowski
> > Reported-by: Marek Szyprowski > Signed-off-by: Charles Keepax > --- > > This patch is only build tested so it would be good to get a > tested by from Marek before applying. Sadly it looks that it is not enough. The issue is still there: wm8994 4-001a: Failed to get su

Re: Applied "regulator: wm8994: Pass descriptor instead of GPIO number" to the regulator tree

2018-11-20 Thread Marek Szyprowski
Hi Charles, On 2018-11-20 18:03, Charles Keepax wrote: > On Tue, Nov 20, 2018 at 04:57:16PM +, Richard Fitzgerald wrote: >> On 20/11/18 16:34, Marek Szyprowski wrote: >>> On 2018-11-20 17:16, Richard Fitzgerald wrote: >>>> On 20/11/18 15:56, Marek Szyprowski wr

Re: Applied "regulator: wm8994: Pass descriptor instead of GPIO number" to the regulator tree

2018-11-20 Thread Marek Szyprowski
Hi Richard, On 2018-11-20 17:57, Richard Fitzgerald wrote: > On 20/11/18 16:34, Marek Szyprowski wrote: >> Hi Richard, >> >> On 2018-11-20 17:16, Richard Fitzgerald wrote: >>> On 20/11/18 15:56, Marek Szyprowski wrote: >>>> Hi Charles, >>&

Re: Applied "regulator: wm8994: Pass descriptor instead of GPIO number" to the regulator tree

2018-11-20 Thread Marek Szyprowski
Hi Richard, On 2018-11-20 17:16, Richard Fitzgerald wrote: > On 20/11/18 15:56, Marek Szyprowski wrote: >> Hi Charles, >> >> On 2018-11-20 16:36, Charles Keepax wrote: >>> On Tue, Nov 20, 2018 at 03:32:15PM +, Charles Keepax wrote: >>>> On Tu

Re: Applied "regulator: wm8994: Pass descriptor instead of GPIO number" to the regulator tree

2018-11-20 Thread Marek Szyprowski
Hi Charles, On 2018-11-20 16:36, Charles Keepax wrote: > On Tue, Nov 20, 2018 at 03:32:15PM +, Charles Keepax wrote: >> On Tue, Nov 20, 2018 at 03:58:59PM +0100, Marek Szyprowski wrote: >>> On 2018-11-20 15:47, Charles Keepax wrote: >>>> On Tue, Nov 20, 2

Re: Applied "regulator: wm8994: Pass descriptor instead of GPIO number" to the regulator tree

2018-11-20 Thread Marek Szyprowski
Hi Charles, On 2018-11-20 15:47, Charles Keepax wrote: > On Tue, Nov 20, 2018 at 02:43:32PM +0100, Marek Szyprowski wrote: >> On 2018-05-17 18:41, Mark Brown wrote: >>> Subject: [PATCH] regulator: wm8994: Pass descriptor instead of GPIO number >> This patch causes

Re: Applied "regulator: wm8994: Pass descriptor instead of GPIO number" to the regulator tree

2018-11-20 Thread Marek Szyprowski
|| wm8994->dev->of_node) { > @@ -159,7 +162,7 @@ static int wm8994_ldo_probe(struct platform_device *pdev) > > ldo->init_data = wm8994_ldo_default[id]; > ldo->init_data.consumer_supplies = >supply; > - if (!config.ena_gpio) > + if (!gpiod) > ldo->init_data.constraints.valid_ops_mask = 0; > } else { > ldo->init_data = *pdata->ldo[id].init_data; > diff --git a/include/linux/mfd/wm8994/pdata.h > b/include/linux/mfd/wm8994/pdata.h > index 90c60524a496..fca67bd194e2 100644 > --- a/include/linux/mfd/wm8994/pdata.h > +++ b/include/linux/mfd/wm8994/pdata.h > @@ -20,9 +20,6 @@ > #define WM8994_NUM_AIF 3 > > struct wm8994_ldo_pdata { > - /** GPIOs to enable regulator, 0 or less if not available */ > - int enable; > - > const struct regulator_init_data *init_data; > }; > > Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

[PATCH] regulator: s2mps11: Fix GPIO descriptor initialization

2018-11-20 Thread Marek Szyprowski
GPIO descriptor array must be zero initialized to ensure that core will properly handle also the case when no external GPIO pin is defined. Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number") Signed-off-by: Marek Szyprowski --- This fixes broken eMMC boo

[PATCH] usb: gadget: u_ether: fix unsafe list iteration

2018-11-19 Thread Marek Szyprowski
ork+0x14/0x20) Exception stack(0xee7fbfb0 to 0xee7fbff8) ... ---[ end trace 64480bc835eba7d6 ]--- Fixes: fea14e68ff5e ("usb: gadget: u_ether: use better list accessors") Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/function/u_ether.c | 11 ++- 1 file changed, 6 ins

[PATCH] extcon: max8997: Fix lack of path setting in USB device mode

2018-11-13 Thread Marek Szyprowski
are not touched. This means that once the non-USB accessory is connected to MAX8997-operated micro USB port, the path is no longer set to USB and USB device mode doesn't work. This patch fixes it by setting USB path both for USB and USB host modes. Signed-off-by: Marek Szyprowski --- drivers/extcon

Re: [PATCH] media: videobuf2-core: Fix error handling when fileio is deallocated

2018-11-13 Thread Marek Szyprowski
. > > Signed-off-by: Myungho Jung > Reported-by: syzbot+4180ff9ca6810b06c...@syzkaller.appspotmail.com Acked-by: Marek Szyprowski Thanks for analyzing the code and fixing this issue! > --- > drivers/media/common/videobuf2/videobuf2-core.c | 4 > 1 file changed, 4 insertio

[PATCH 0/4] Fix common issue in MAX* extcon drivers

2018-11-08 Thread Marek Szyprowski
. This patchset fixes following MAX* extcon drivers: 8997, 14577, 77693 and 77843. Tested on following Samsung boards: Trats (8997), Rinato (14577), Trats2 (77693) and TM2/TM2e (77843). Best regards Marek Szyprowski Samsung R Institute Poland Patch summary: Marek Szyprowski (4): extcon: max77843

[PATCH 4/4] extcon: max8997: Avoid forcing UART path on drive probe

2018-11-08 Thread Marek Szyprowski
path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski --- drivers/extcon/extcon-max8997.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index bdabb2479e0d

[PATCH 3/4] extcon: max14577: Avoid forcing UART path on drive probe

2018-11-08 Thread Marek Szyprowski
path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski --- drivers/extcon/extcon-max14577.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index 22d2feb1f8bc

[PATCH 2/4] extcon: max77693: Avoid forcing UART path on drive probe

2018-11-08 Thread Marek Szyprowski
path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski --- drivers/extcon/extcon-max77693.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index a79537ebb671

[PATCH 1/4] extcon: max77843: Avoid forcing UART path on drive probe

2018-11-08 Thread Marek Szyprowski
path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski --- drivers/extcon/extcon-max77843.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c index b98cbd0362f5

[PATCH v4 3/6] clocksource: exynos_mct: Refactor resources allocation

2018-10-18 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 50 +++- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c

[PATCH v4 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization

2018-10-18 Thread Marek Szyprowski
ifier") Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_m

[PATCH v4 6/6] arm64: platform: Add enable Exynos Multi-Core Timer driver

2018-10-18 Thread Marek Szyprowski
On Exynos SoCs enabling MCT driver is required even if ARM Architected Timer driver is used to for managing timer hardware and clock source events. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- arch/arm64

[PATCH v4 4/6] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64

2018-10-18 Thread Marek Szyprowski
interface via arch_timer driver, which is mandatory on ARM64. In such mode MCT driver only enables its clocks and starts global timer. Everything else will be handled by arch_timer driver. Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- drivers/clocksource

[PATCH v4 0/6] Proper arch timer support for Exynos5433-based TM2(e) boards

2018-10-18 Thread Marek Szyprowski
for add proper support for system suspend/resume. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v4: - fixes lack of fixup in patch #3, pointed by Krzysztof Kozlowski v3: - added patch, which splits resources and interrupts allocation - simplified arch timer cooperation mode

[PATCH v4 5/6] arm64: dts: exynos: Move arch-timer node to right place

2018-10-18 Thread Marek Szyprowski
Move ARM architected timer device-tree node to the beginning of 'soc' node, to group it together with other ARM CPU core devices (like PMU). Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 23

[PATCH v4 1/6] clocksource: exynos_mct: Remove dead code

2018-10-18 Thread Marek Szyprowski
-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 7a244b681876..ef18bbf8d20c

Re: [PATCH v3 3/6] clocksource: exynos_mct: Refactor resources allocation

2018-10-18 Thread Marek Szyprowski
Hi Krzysztof, On 2018-10-17 16:29, Krzysztof Kozlowski wrote: > On Wed, 17 Oct 2018 at 15:42, Marek Szyprowski > wrote: >> Move interrupts allocation from exynos4_timer_resources() into separate >> function together with the interrupt number parsing code from >> mc

[PATCH v3 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization

2018-10-17 Thread Marek Szyprowski
ifier") Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_m

[PATCH v3 0/6] Proper arch timer support for Exynos5433-based TM2(e) boards

2018-10-17 Thread Marek Szyprowski
for add proper support for system suspend/resume. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v3: - added patch, which splits resources and interrupts allocation - simplified arch timer cooperation mode - dropped CPU hotplug priority change patch, it is not really needed

[PATCH v3 5/6] arm64: dts: exynos: Move arch-timer node to right place

2018-10-17 Thread Marek Szyprowski
Move ARM architected timer device-tree node to the beginning of 'soc' node, to group it together with other ARM CPU core devices (like PMU). Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 23

[PATCH v3 3/6] clocksource: exynos_mct: Refactor resources allocation

2018-10-17 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- drivers/clocksource/exynos_mct.c | 49 +++- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 49413900b24c..02ad55db390b 100644 --- a/drivers

[PATCH v3 1/6] clocksource: exynos_mct: Remove dead code

2018-10-17 Thread Marek Szyprowski
-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 7a244b681876..ef18bbf8d20c

[PATCH v3 6/6] arm64: platform: Add enable Exynos Multi-Core Timer driver

2018-10-17 Thread Marek Szyprowski
On Exynos SoCs enabling MCT driver is required even if ARM Architected Timer driver is used to for managing timer hardware and clock source events. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- arch/arm64

[PATCH v3 4/6] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64

2018-10-17 Thread Marek Szyprowski
interface via arch_timer driver, which is mandatory on ARM64. In such mode MCT driver only enables its clocks and starts global timer. Everything else will be handled by arch_timer driver. Signed-off-by: Marek Szyprowski --- drivers/clocksource/exynos_mct.c | 9 + 1 file changed, 9

Re: [PATCH v2 3/6] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64

2018-10-17 Thread Marek Szyprowski
Hi Mark, On 2018-10-15 15:26, Mark Rutland wrote: > On Mon, Oct 15, 2018 at 02:31:09PM +0200, Marek Szyprowski wrote: >> To get ARM Architected Timers working on Samsung Exynos SoCs, one has to >> first configure and enable Exynos Multi-Core Timer, because they both >> share

[PATCH v2 3/6] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64

2018-10-15 Thread Marek Szyprowski
arch_timer driver, which is mandatory on ARM64. In such mode driver only configures MCT registers and starts the timer but don't register any clocksource or events in the system. Those are left to be handled by arch_timer driver. Signed-off-by: Marek Szyprowski --- drivers/clocksource/exynos_mct.c | 52

[PATCH v2 5/6] arm64: dts: exynos: Move arch-timer node to right place

2018-10-15 Thread Marek Szyprowski
Move ARM architected timer device-tree node to the beginning of 'soc' node, to group it together with other ARM CPU core devices (like PMU). Signed-off-by: Marek Szyprowski --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 23 +++--- 1 file changed, 12 insertions(+), 11 deletions

[PATCH v2 0/6] Proper arch timer support for Exynos5433-based TM2(e) boards

2018-10-15 Thread Marek Szyprowski
for add proper support for system suspend/resume. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v2: - dropped arch timer patch, it will be discussed separately - fixed issues pointed by Krzysztof Kozlowski v1: https://patchwork.kernel.org/project/linux-samsung-soc/list

[PATCH v2 1/6] clocksource: exynos_mct: Remove dead code

2018-10-15 Thread Marek Szyprowski
Exynos Multi-Core Timer driver is used only on device-tree based systems, so remove non-dt related code. In case of !CONFIG_OF the code is anyway equal because of_irq_count() has a stub returning 0. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski --- drivers/clocksource

[PATCH v2 6/6] arm64: platform: Add enable Exynos Multi-Core Timer driver

2018-10-15 Thread Marek Szyprowski
On Exynos SoCs enabling MCT driver is required even if ARM Architected Timer driver is used to for managing timer hardware and clock source events. Signed-off-by: Marek Szyprowski --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b

[PATCH v2 4/6] clocksource: Change CPU hotplug priority of exynos_mct driver

2018-10-15 Thread Marek Szyprowski
Exynos Multi-Core Timer driver (exynos_mct) must be started before ARM Architected Timers (arch_timer), because both timers share common hardware block and turning on MCT is needed to get ARM Architected Timer working properly. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski

[PATCH v2 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization

2018-10-15 Thread Marek Szyprowski
ifier") Signed-off-by: Marek Szyprowski --- drivers/clocksource/exynos_mct.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 43b335ff4a96..a379f11fad2d 100644 --- a/drivers/c

Re: [PATCH 4/7] clocksource: arch_timer: Add support for not-fw-configured timer on ARM64

2018-10-15 Thread Marek Szyprowski
Hi All, On 2018-10-08 15:17, Marc Zyngier wrote: > + Mark Rutland > > Hi Marek, > > On 08/10/18 13:50, Marek Szyprowski wrote: >> Use common infrastructure for ARM Architected Timers erratum to enable >> support for systems with broken CPU firmware (timer registers

Re: [RFT PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap

2018-10-15 Thread Marek Szyprowski
n one GPIO assigned to pwrseq_simple): > - arch/arm/boot/dts/imx6qdl-sr-som-brcm.dtsi > - arch/arm/boot/dts/exynos5250-snow-common.dtsi On Samsung Snow Chromebook it doesn't change anything. Board boots and detects WiFi SDIO card before and after applying it on top on Linux next-20181012. Teste

Re: [PATCH] gpio/regulator: Allow nonexclusive GPIO access

2018-10-11 Thread Marek Szyprowski
lator: fixed: Convert to use GPIO descriptor only") > Reported-by: Marek Szyprowski > Cc: Marek Szyprowski > Signed-off-by: Linus Walleij > --- It looks to be fixing the Sii9234 probe issue, but I didn't do any further tests. I must go out the office and I will be back on Mond

Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only

2018-10-11 Thread Marek Szyprowski
Hi Linus, On 2018-10-11 11:29, Linus Walleij wrote: > On Thu, Oct 11, 2018 at 11:01 AM Marek Szyprowski > wrote: > >> I've just noticed that this patch causes regression on Samsung >> Exynos4412-based Trats2 board. Conversion to GPIO descriptor breaks >> operation

Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only

2018-10-11 Thread Marek Szyprowski
e > > @@ -78,10 +77,6 @@ of_get_fixed_voltage_config(struct device *dev, > if (init_data->constraints.boot_on) > config->enabled_at_boot = true; > > - config->gpio = of_get_named_gpio(np, "gpio", 0); > - if ((config->gpio < 0) && (config->gpio != -ENOENT)) > - return ERR_PTR(config->gpio); > - > of_property_read_u32(np, "startup-delay-us", >startup_delay); > > config->enable_high = of_property_read_bool(np, "enable-active-high"); > @@ -102,6 +97,7 @@ static int reg_fixed_voltage_probe(struct platform_device > *pdev) > struct fixed_voltage_config *config; > struct fixed_voltage_data *drvdata; > struct regulator_config cfg = { }; > + enum gpiod_flags gflags; > int ret; > > drvdata = devm_kzalloc(>dev, sizeof(struct fixed_voltage_data), > @@ -150,25 +146,28 @@ static int reg_fixed_voltage_probe(struct > platform_device *pdev) > > drvdata->desc.fixed_uV = config->microvolts; > > - if (gpio_is_valid(config->gpio)) { > - cfg.ena_gpio = config->gpio; > - if (pdev->dev.of_node) > - cfg.ena_gpio_initialized = true; > - } > cfg.ena_gpio_invert = !config->enable_high; > if (config->enabled_at_boot) { > if (config->enable_high) > - cfg.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH; > + gflags = GPIOD_OUT_HIGH; > else > - cfg.ena_gpio_flags |= GPIOF_OUT_INIT_LOW; > + gflags = GPIOD_OUT_LOW; > } else { > if (config->enable_high) > - cfg.ena_gpio_flags |= GPIOF_OUT_INIT_LOW; > + gflags = GPIOD_OUT_LOW; > else > - cfg.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH; > + gflags = GPIOD_OUT_HIGH; > } > - if (config->gpio_is_open_drain) > - cfg.ena_gpio_flags |= GPIOF_OPEN_DRAIN; > + if (config->gpio_is_open_drain) { > + if (gflags == GPIOD_OUT_HIGH) > + gflags = GPIOD_OUT_HIGH_OPEN_DRAIN; > + else > + gflags = GPIOD_OUT_LOW_OPEN_DRAIN; > + } > + > + cfg.ena_gpiod = devm_gpiod_get_optional(>dev, NULL, gflags); > + if (IS_ERR(cfg.ena_gpiod)) > + return PTR_ERR(cfg.ena_gpiod); > > cfg.dev = >dev; > cfg.init_data = config->init_data; > diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h > index 48918be649d4..1a4340ed8e2b 100644 > --- a/include/linux/regulator/fixed.h > +++ b/include/linux/regulator/fixed.h > @@ -24,8 +24,6 @@ struct regulator_init_data; > * @supply_name: Name of the regulator supply > * @input_supply:Name of the input regulator supply > * @microvolts: Output voltage of regulator > - * @gpio:GPIO to use for enable control > - * set to -EINVAL if not used > * @startup_delay: Start-up time in microseconds > * @gpio_is_open_drain: Gpio pin is open drain or normal type. > * If it is open drain type then HIGH will be set > @@ -49,7 +47,6 @@ struct fixed_voltage_config { > const char *supply_name; > const char *input_supply; > int microvolts; > - int gpio; > unsigned startup_delay; > unsigned gpio_is_open_drain:1; > unsigned enable_high:1; > Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

[PATCH 3/7] clocksource: Change CPU hotplug priority of exynos_mct driver

2018-10-08 Thread Marek Szyprowski
Exynos Multi-Core Timer driver (exynos_mct) must be started before ARM Architected Timers (arch_timer), because both timers share common hardware block and turning on MCT is needed to get ARM Architected Timer working properly. Signed-off-by: Marek Szyprowski --- include/linux/cpuhotplug.h | 2

[PATCH 4/7] clocksource: arch_timer: Add support for not-fw-configured timer on ARM64

2018-10-08 Thread Marek Szyprowski
architected timers instead of the virtual ones. Examples of such system with broken firmware are Samsung Exynos5433 SoC based TM2(e) boards, which is already deployed for years and updating firmware is not possible. Signed-off-by: Marek Szyprowski --- drivers/clocksource/Kconfig | 11

[PATCH 1/7] clocksource: exynos_mct: Remove dead code

2018-10-08 Thread Marek Szyprowski
Exynos Multi-Core Timer driver is used only on device-tree based systems, so remove non-dt related code. Signed-off-by: Marek Szyprowski --- drivers/clocksource/exynos_mct.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource

[PATCH 2/7] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64

2018-10-08 Thread Marek Szyprowski
arch_timer driver, which is mandatory on ARM64. In such mode driver only configures MCT registers and starts the timer but don't register any clocksource or events in the system. Those are left to be handled by arch_timer driver. Signed-off-by: Marek Szyprowski --- drivers/clocksource/exynos_mct.c | 28

[PATCH 5/7] arm64: dts: exynos: Move arch-timer node to right place

2018-10-08 Thread Marek Szyprowski
Move ARM architected timer device-tree node to the beginning of 'soc' node, to group it together with other ARM CPU core devices (like PMU). Signed-off-by: Marek Szyprowski --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 23 +++--- 1 file changed, 12 insertions(+), 11 deletions

[PATCH 6/7] arm64: dts: exynos: Mark arch_timer device as not-fw-configured on TM2(e)

2018-10-08 Thread Marek Szyprowski
TM2(e) boards use old firmware, which some PCSI requirements and doesn't properly configure arch virtual timers, so add property indicating this state. This enables respective workarounds in the timer driver. Signed-off-by: Marek Szyprowski --- arch/arm64/boot/dts/exynos/exynos5433-tm2

[PATCH 7/7] arm64: platform: Add enable Exynos Multi-Core Timer driver

2018-10-08 Thread Marek Szyprowski
Exynos MCT driver is required even if ARM Architected Timer driver is used to properly configure common timer hardware. Signed-off-by: Marek Szyprowski --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64

[PATCH 0/7] Proper arch timer support for Exynos5433-based TM2(e) boards

2018-10-08 Thread Marek Szyprowski
for add proper support for system suspend/resume. Best regards Marek Szyprowski Samsung R Institute Poland Patch summary: Marek Szyprowski (7): clocksource: exynos_mct: Remove dead code clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64 clocksource: Change CPU hotplug priority

Re: [PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap

2018-09-26 Thread Marek Szyprowski
Hi again, On 2018-09-26 10:14, Marek Szyprowski wrote: > On 2018-09-25 21:24, Janusz Krzysztofik wrote: >> Commit b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to >> get/set array") changed the way GPIO values are passed to >> gpiod_get/set_array_value()

Re: [PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap

2018-09-26 Thread Marek Szyprowski
caused by incorrectly handled MMC device > has been observed. > > As a side effect of that incorrect interpreation of the 'value' > argument, wrong assumption is taken about the 'values' bitmap size > never exceding the number of bits of the 'value' argument type. > > Fix it. >

Re: [PATCH 0/2] gpiolib: Fix issues introduced by fast bitmap processing path

2018-09-24 Thread Marek Szyprowski
Hi Janusz, On 2018-09-24 13:08, Janusz Krzysztofik wrote: > 2018-09-24 11:43 GMT+02:00, Marek Szyprowski : >> On 2018-09-24 01:53, Janusz Krzysztofik wrote: >>> While investigating possible reasons of GPIO fast bitmap processing >>> related boot hang on Samsung Snow Ch

Re: [PATCH] ARM: dts: exynos: Add CD and WP pins to Odroid XU SD card

2018-09-24 Thread Marek Szyprowski
> + sd2_wp: sd2-wp { > + samsung,pins = "gpm5-0"; > + samsung,pin-function = ; > + /* Pin is floating so pull it up to disable write-protect */ > + samsung,pin-pud = ; > + samsung,pin-drv = ; > + }; > }; > >{ Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [RFT] arm64: ARM: dts: exynos: Remove double SD card detect pin inversion on TM2

2018-09-24 Thread Marek Szyprowski
d TM2e. However I'm not sure if it makes sense to refer to the SDHCI standard, as Exynos5433 has only DWMMC host controllers. Tested-by: Marek Szyprowski > --- > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > di

Re: [RFT] ARM: dts: exynos: Remove double SD card detect pin inversion

2018-09-06 Thread Marek Szyprowski
t; Tested only on Odroid U3. Tests on other platforms would be appreciated. SD card detection still works fine on UniversalC210, Trats2 and OdroidU3 with this patch. Tested-by: Marek Szyprowski > --- > arch/arm/boot/dts/exynos4210-universal_c210.dts | 3 +-- > arch/arm/boot/d

[PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle

2018-09-05 Thread Marek Szyprowski
Disable IRQs during suspend/resume cycle to ensure handling of wakeup interrupts (i.e. RTC wake alarm) after max8997_resume(). This way it can be properly handled when I2C bus is finally available. This pattern is also used in other MAX PMIC MFD drivers. Signed-off-by: Marek Szyprowski

[PATCH] mfd: max8997: Disable interrupt handling for suspend/resume cycle

2018-09-05 Thread Marek Szyprowski
Disable IRQs during suspend/resume cycle to ensure handling of wakeup interrupts (i.e. RTC wake alarm) after max8997_resume(). This way it can be properly handled when I2C bus is finally available. This pattern is also used in other MAX PMIC MFD drivers. Signed-off-by: Marek Szyprowski

[PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally

2018-09-05 Thread Marek Szyprowski
enable it also for MAX8997. This fixes support for wakeup from MAX8997 RTC alarm. Signed-off-by: Marek Szyprowski --- changelog: v2: - removed pdata->wakeup entry as suggested by Krzysztof Kozlowski --- drivers/mfd/max8997.c | 8 +--- include/linux/mfd/max8997.h | 1 - 2 files chan

[PATCH] mfd: max8997: Enale irq-wakeup unconditionally

2018-09-05 Thread Marek Szyprowski
be an irq wakeup source, so enable wakeup support also for MAX8997. This fixes support for wakeup from MAX8997 RTC alarm. Signed-off-by: Marek Szyprowski --- drivers/mfd/max8997.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997

Re: [PATCH 1/2] regulator: Fix useless O^2 complexity in suspend/resume

2018-09-04 Thread Marek Szyprowski
Hi Mark, On 2018-09-03 17:09, Mark Brown wrote: > On Mon, Sep 03, 2018 at 04:49:36PM +0200, Marek Szyprowski wrote: >> regulator_pm_ops with regulator_suspend and regulator_resume functions are >> assigned to every regulator device registered in the system, so there is no >>

[PATCH 0/2] regualtors: Fix suspend/resume issues since v4.16

2018-09-03 Thread Marek Szyprowski
review my fixes and apply to v4.19-rcX if possible. Best regards Marek Szyprowski, PhD Samsung R Institute Poland Patch summary: Marek Szyprowski (2): regulator: Fix useless O^2 complexity in suspend/resume regulator: Fix 'do-nothing' value for regulators without suspend state drivers

[PATCH 2/2] regulator: Fix 'do-nothing' value for regulators without suspend state

2018-09-03 Thread Marek Szyprowski
the values of the them, so default '0' means DO_NOTHING_IN_SUSPEND. Fixes: 72069f9957a1: regulator: leave one item to record whether regulator is enabled Signed-off-by: Marek Szyprowski --- drivers/regulator/core.c | 2 +- drivers/regulator/of_regulator.c | 2 -- include/linux/regulator

[PATCH 1/2] regulator: Fix useless O^2 complexity in suspend/resume

2018-09-03 Thread Marek Szyprowski
regulator device. This saves a lots of useless operations in suspend and resume paths. Fixes: f7efad10b5c4: regulator: add PM suspend and resume hooks Signed-off-by: Marek Szyprowski --- drivers/regulator/core.c | 39 +++ 1 file changed, 11 insertions(+), 28

Re: mfd: cros_ec: Check for mkbp events on resume only if supported.

2018-08-21 Thread Marek Szyprowski
rd in a loop which blocks the resume. Instead check for events > only if mkbp is supported. > > Signed-off-by: RaviChandra Sadineni Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski > --- > > Note: This patch fixes the suspend/resume issue on Snow and Peach-Pit &g

Re: Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-20 Thread Marek Szyprowski
; the keyboard in a loop and block the resume. Instead check for events only > if mkbp is supported. > > Signed-off-by: RaviChandra Sadineni This patch fixes the suspend/resume issue on Snow and Peach-Pit Chromebooks, both on vanilla v4.18 as well as linux-next from 20 August 2018. Thanks!

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-10 Thread Marek Szyprowski
evice.") breaks suspend/resume operation also on Samsung Exynos5420-based Peach-Pit Chromebook. Here is some more information how to get suspend/resume working with mainline on that board: https://patchwork.kernel.org/patch/10562419/ Best regards Marek Szyprowski, PhD Samsung R Institute Poland On

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-07 Thread Marek Szyprowski
s for the info. Lemme understand what's going on. Will update the >> thread once I have more info. >> >> Thanks, >> Ravi >> On Mon, Aug 6, 2018 at 12:15 AM Marek Szyprowski >> wrote: >>> Hi Dmitry >>> >>> On 2018-08-06 08

Re: [RFT 4/4] ARM: dts: exynos: Add LDO28 regulator on Exynos5422 Odroid boards

2018-08-07 Thread Marek Szyprowski
mainline for OdroidXU3, so there is not much else to test for now. Tested-by: Marek Szyprowski > --- > > Not tested on Odroid XU3 with Display Port. > --- > arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 7 +++ > arch/arm/boot/dts/exynos5422-odroidxu3.dts| 6 ++ >

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-06 Thread Marek Szyprowski
Hi Dmitry On 2018-08-06 08:16, Dmitry Torokhov wrote: > On Sun, Aug 5, 2018 at 10:29 PM Marek Szyprowski > wrote: >> Hi Ravi, >> >> On 2018-08-03 18:53, Ravi Chandra Sadineni wrote: >>> Understood. I am trying to reproduce this issue locally. Wanted to >>&g

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-05 Thread Marek Szyprowski
n shipping > Snow is completely immaterial. Mainline is supposed to work equally > well on all devices. > > Thanks. > > -- > Dmitry > Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-03 Thread Marek Szyprowski
Hi All, On 2018-06-06 00:44, Ravi Chandra Sadineni wrote: > Remove the unnecessary check before calling pm_wakeup_event. If the > device is not wake enabled, this call is no-op anyway. > > Signed-off-by: Ravi Chandra Sadineni This patch breaks suspend/resume on Samsung Exynos5250 Snow

Re: [RFT v2 00/10] pinctrl: samsung: Remove ugly hack for sharing eint_wakeup_mask

2018-07-24 Thread Marek Szyprowski
s: EINT32-63 located at banks GPF1[0..7], GPF2[0..3], GPF3[0..3], GPF4[0..7] and GPF5[0..7]. They can be configured as wakeup sources in EXYNOS5433_EINT_WAKEUP_MASK1 (0x062C) PMU register. Handling of them can be added later when it will be really needed. Tested-by: Marek Szyprowski > Descript

Re: [PATCH v12 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-11 Thread Marek Szyprowski
e) >>>> This is suspicious. >>>> >>>> If you need a runtime suspend method, why do you think that it is not >>>> necessary >>>> to suspend the device during system-wide transitions? >>> Okay, so you suggest to put clock disabling i

Re: [PATCH] regulator: core: Don't link consumers on the same device

2018-07-09 Thread Marek Szyprowski
out attempts to add links so suppress them here. > > Reported-by: Marek Szyprowski > Signed-off-by: Mark Brown > --- > > Compile tested only. This patch doesn't help, because wm8994 creates separate struct device for each registered regulator, so you need to check the regulator p

[PATCH 1/2] mm/cma: remove unsupported gfp_mask parameter from cma_alloc()

2018-07-09 Thread Marek Szyprowski
already been an issue: see commit dd65a941f6ba ("arm64: dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag"). Signed-off-by: Marek Szyprowski --- arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- drivers/s390/char/vmcp.c | 2 +- drivers/staging/a

[PATCH 0/2] CMA: remove unsupported gfp mask parameter

2018-07-09 Thread Marek Szyprowski
/ Best regards Marek Szyprowski Samsung R Institute Poland Patch summary: Marek Szyprowski (2): mm/cma: remove unsupported gfp_mask parameter from cma_alloc() dma: remove unsupported gfp_mask parameter from dma_alloc_from_contiguous() arch/arm/mm/dma-mapping.c | 5

Re: Applied "regulator: core: Link consumer with regulator driver" to the regulator tree

2018-07-09 Thread Marek Szyprowski
ruct regulator *r; > + > + list_for_each_entry(r, >consumer_list, list) > + if (r->dev == regulator->dev) > + count++; > + > + if (count == 1) > + device_link_remove(regulator->dev, >

Re: [PATCH] mm: cma: honor __GFP_ZERO flag in cma_alloc()

2018-07-09 Thread Marek Szyprowski
Hi Christoph, On 2018-07-02 15:30, Christoph Hellwig wrote: > On Mon, Jul 02, 2018 at 03:23:34PM +0200, Marek Szyprowski wrote: >> What about clearing the allocated buffer? Should it be another bool >> parameter, >> done unconditionally or moved to the callers? > Please ke

Re: [PATCH] mm: cma: honor __GFP_ZERO flag in cma_alloc()

2018-07-09 Thread Marek Szyprowski
Hi Michal, On 2018-07-02 15:32, Michal Hocko wrote: > On Mon 02-07-18 15:23:34, Marek Szyprowski wrote: >> On 2018-06-13 15:39, Michal Hocko wrote: >>> On Wed 13-06-18 05:55:46, Christoph Hellwig wrote: >>>> On Wed, Jun 13, 2018 at 02:40:00PM +0200, Marek Szyprows

Re: [PATCH] dma: add support for reporting pause and resume separately

2018-07-06 Thread Marek Szyprowski
Hi Vinod, On 2018-07-06 08:00, Vinod wrote: > On 04-07-18, 13:38, Andy Shevchenko wrote: >> On Wed, Jul 4, 2018 at 10:00 AM, Vinod wrote: >>> Hi Marek, >>> >>> On 02-07-18, 15:08, Marek Szyprowski wrote: >>>> 'cmd_pause' DMA channel capability mea

Re: [PATCH] mm: cma: honor __GFP_ZERO flag in cma_alloc()

2018-07-02 Thread Marek Szyprowski
Hi Michal, On 2018-06-13 15:39, Michal Hocko wrote: > On Wed 13-06-18 05:55:46, Christoph Hellwig wrote: >> On Wed, Jun 13, 2018 at 02:40:00PM +0200, Marek Szyprowski wrote: >>> It is not only the matter of the spinlocks. GFP_ATOMIC is not supported >>> by the >&g

[PATCH] dma: add support for reporting pause and resume separately

2018-07-02 Thread Marek Szyprowski
driver, which has been updated to check the newly added capability. Existing 'cmd_pause' now only indicates that DMA engine support pausing given DMA channel. Signed-off-by: Marek Szyprowski --- This patch is a follow-up of the Vinod's advise from the following discussion: https://www.spinics.net/lists

[PATCH] dmaengine: pl330: report BURST residue granularity

2018-06-19 Thread Marek Szyprowski
The reported residue is already calculated in BURST unit granularity, so advertise this capability properly to other devices in the system. Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function") Signed-off-by: Marek Szyprowski --- drivers/dma/pl330.c | 2 +- 1 fi

  1   2   3   4   5   6   7   8   9   10   >