Re: [PATCH] regulator: core: Pass max_uV value to regulator_set_voltage_rdev

2018-10-01 Thread Maciej Purski
Hi all, unfortunately, I don't work at kernel anymore. That would be great, if you could take over those patches and finish the work. Best regards, Maciej On 09/29/2018 02:44 AM, Dmitry Osipenko wrote: > On 9/29/18 3:27 AM, Tony Lindgren wrote: >> * Dmitry Osipenko [180928 23:55]: >>> On 9/29/1

[PATCH] regulator: core: Pass max_uV value to regulator_set_voltage_rdev

2018-06-18 Thread Maciej Purski
If the regulator is not coupled, balance_voltage() should preserve its desired max uV, instead of setting the exact value like in coupled regulators case. Remove debugs, which are not necessary for now. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 26

Re: [PATCH v2] regulator: core: Enable voltage balancing

2018-06-18 Thread Maciej Purski
On 06/15/2018 01:29 PM, Tony Lindgren wrote: > Hi, > > * Maciej Purski [180613 10:39]: >> Call regulator_balance_voltage() instead of set_voltage_rdev() >> in set_voltage_unlocked() and in enabling and disabling functions, >> but only if the regulator is coupled.

Re: [PATCH 5/7] regulator: core: Lock dependent regulators

2018-06-18 Thread Maciej Purski
On 06/04/2018 04:20 PM, Lucas Stach wrote: > Hi Maciej, > > Am Montag, den 04.06.2018, 15:59 +0200 schrieb Maciej Purski: >> Implementing coupled regulators adds a new dependency between >> regulators. Therefore, the current locking model should be changed. >> C

[PATCH v2] regulator: core: Enable voltage balancing

2018-06-13 Thread Maciej Purski
Call regulator_balance_voltage() instead of set_voltage_rdev() in set_voltage_unlocked() and in enabling and disabling functions, but only if the regulator is coupled. Signed-off-by: Maciej Purski --- Changes in v2: - fix compile errors - make debug messages more informative --- drivers

[PATCH 5/7] regulator: core: Lock dependent regulators

2018-06-04 Thread Maciej Purski
with the one, that is being changed. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 75 +--- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0b366c5..7c57268 100644

[PATCH 4/7] regulator: core: Implement voltage balancing algorithm

2018-06-04 Thread Maciej Purski
which is about to change its voltage, is not coupled, method regulator_get_optimal_voltage() should simply return the lowest voltage fulfilling consumers' demands. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 183 +++ 1 file changed, 183 inserti

[PATCH 6/7] regulator: core: Lock dependent regulators on regulator_enable()

2018-06-04 Thread Maciej Purski
Since regulator_enable() might now call regulator_balance_voltage(), it should also lock its coupled regulators and suppliers. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/core.c b

[PATCH 3/7] regulator: core: Use re-entrant locks

2018-06-04 Thread Maciej Purski
Re-entrant locks were implemented in previous patches. They should substitute all mutex_lock() and mutex_unlock() calls on regulators' mutexes. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dr

[PATCH 7/7] regulator: core: Enable voltage balancing

2018-06-04 Thread Maciej Purski
Call regulator_balance_voltage() instead of set_voltage_rdev() in set_voltage_unlocked() and in enabling and disabling functions, but only if the regulator is coupled. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 24 +++- 1 file changed, 23 insertions(+), 1

Re: Regression in Linux next again

2018-06-04 Thread Maciej Purski
at if you could try to find out, which patch causes failure. They should be appliable on the current next. Thanks, Maciej Purski Maciej Purski (7): regulator: core: Add debug messages regulator: core: Add regulator_set_voltage_rdev() regulator: core: Use re-entrant locks regulator:

[PATCH 2/7] regulator: core: Add regulator_set_voltage_rdev()

2018-06-04 Thread Maciej Purski
Refactor regulator_set_voltage_unlocked() by taking code related to regulator_dev and creating a new function regulator_set_voltage_rdev(), which operates only on struct regulator_dev. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 40 1

[PATCH 1/7] regulator: core: Add debug messages

2018-06-04 Thread Maciej Purski
Add debug messages on voltage setting and enabling path in order to debug the coupled regulators problem. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6ed568b

Re: Regression in Linux next again

2018-05-30 Thread Maciej Purski
can revert it and in the next version I'll fix the build error and split the last patch even more, so we could perform a more precise bisection. I'd be grateful if you could push it on your test coupled branch and Tony could test it again before merging it with next again. Best regards, Maciej Purski

[PATCH v2 02/10] drm/exynos: move pm_runtime_get_sync() to exynos_dsi_init()

2018-05-30 Thread Maciej Purski
In order to allow bridge drivers to use DSI transfers in their pre_enable callbacks, pm_runtime_get_sync() should be performed before exynos_dsi_enable(). DSIM_STATE_ENABLED flag now should not guard from calling dsi_host_transfer() before enabling. Signed-off-by: Maciej Purski --- drivers/gpu

[PATCH 12/12] ARM: dts: exynos5250-arndale: add dsi and panel nodes

2018-05-28 Thread Maciej Purski
The patch adds bridge and panel nodes. It adds also DSI properties specific for arndale board. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- arch/arm/boot/dts/exynos5250-arndale.dts | 39 1 file changed, 39 insertions(+) diff --git a/arch/arm

[PATCH 11/12] ARM: dts: exynos5250-arndale: add display regulators

2018-05-28 Thread Maciej Purski
The patch adds fixed regulators used by DSI/LVDS bridge and panel. Regulators are named according to schematics. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- arch/arm/boot/dts/exynos5250-arndale.dts | 24 1 file changed, 24 insertions(+) diff --git a

[PATCH 10/12] ARM: dts: exynos5250: add DSI node

2018-05-28 Thread Maciej Purski
The patch adds common part of DSI node for Exynos5250 platforms. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- arch/arm/boot/dts/exynos5250.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250

[PATCH 06/12] drm/panel: add support for BOE HV070WSA-100 panel to simple-panel

2018-05-28 Thread Maciej Purski
The patch adds support for BOE HV070WSA-100 WSVGA 7.01 inch panel in panel-simple driver. The panel is used in Exynos5250-arndale boards. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- drivers/gpu/drm/panel/panel-simple.c | 25 + 1 file changed, 25

[PATCH 04/12] drm/exynos: add non-panel path to exynos_dsi_enable()

2018-05-28 Thread Maciej Purski
As DSIM can now have a bridge connected as a peripheral, it should be possible to successfully enable exynos_dsi, when there is no panel provided. Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 27 +-- 1 file changed, 13 insertions(+), 14

[PATCH 05/12] panel/hv070wsa-100: add DT bindings

2018-05-28 Thread Maciej Purski
The patch adds bindings to BOE HV070-WSA WSVGA panel. Bindings are compatible with simple panel bindings. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- .../devicetree/bindings/display/panel/boe,hv070wsa-100.txt | 7 +++ 1 file changed, 7 insertions(+) create mode

[PATCH 01/12] drm/exynos: rename "bridge_node" to "mic_bridge_node"

2018-05-28 Thread Maciej Purski
When adding support for peripheral out bridges, the "bridge" name becomes imprecise as it refers to a different device than the "out_bridge". Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 16 1 file changed, 8 insertions(+),

[PATCH 07/12] dt-bindings: tc358754: add DT bindings

2018-05-28 Thread Maciej Purski
The patch adds bindings to Toshiba DSI/LVDS bridge TC358764. Bindings describe power supplies, reset gpio and video interfaces. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- .../bindings/display/bridge/toshiba,tc358764.txt | 42 ++ 1 file changed, 42

[PATCH 08/12] drm/bridge: tc358764: Add DSI to LVDS bridge driver

2018-05-28 Thread Maciej Purski
Add a drm_bridge driver for the Toshiba TC358764 DSI to LVDS bridge. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/Kconfig| 7 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358764.c | 547

[PATCH 03/12] drm/exynos: move connector creation to attach callback

2018-05-28 Thread Maciej Purski
The current implementation assumes that the only possible peripheral device for DSIM is a panel. Using an output bridge should also be possible. If an output bridge in available, don't create a new connector. Instead add bridge to DSIM encdoer in dsi_host_attach(). Signed-off-by: Maciej P

[PATCH 09/12] ARM: dts: exynos5250: add mipi-phy node

2018-05-28 Thread Maciej Purski
The patch adds phy node, required by MIPI devices. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- arch/arm/boot/dts/exynos5250.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 2daf505

[PATCH 02/12] drm/exynos: move pm_runtime_get_sync() to exynos_dsi_init()

2018-05-28 Thread Maciej Purski
In order to allow bridge drivers to use DSI transfers in their pre_enable callbacks, pm_runtime_get_sync() should be performed before exynos_dsi_enable(). DSIM_STATE_ENABLED flag now should not guard from calling dsi_host_transfer() before enabling. Signed-off-by: Maciej Purski --- drivers/gpu

[PATCH 00/12] Add TOSHIBA TC358764 DSI/LVDS bridge driver

2018-05-28 Thread Maciej Purski
-arndale.dtsi. Best regards, Maciej Purski Maciej Purski (12): drm/exynos: rename "bridge_node" to "mic_bridge_node" drm/exynos: move pm_runtime_get_sync() to exynos_dsi_init() drm/exynos: move connector creation to attach callback drm/exynos: add non-panel path to exynos_

[PATCH v7 4/6] regulator: core: Resolve coupled regulators

2018-04-23 Thread Maciej Purski
data inconsistency occurs. If some coupled regulators are not yet registered, don't fail to register, but try to resolve them in late init call. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 100 +++ 1 file changed, 100 insertions(+)

[PATCH v7 1/6] regulator: core: Make locks re-entrant

2018-04-23 Thread Maciej Purski
forbidden is simultaneous coupling and supplying between a pair of regulators. The idea is based on clk core. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 132 +++ include/linux/regulator/driver.h | 2 + 2 files changed, 93 insertions(+), 41

[PATCH v7 3/6] regulator: core: Parse coupled regulators properties

2018-04-23 Thread Maciej Purski
of the structure, number of coupled regulators and counter of currently resolved regulators. Add of_functions to parse all data needed in regulator coupling. Provide method to check DTS data consistency. Check if each coupled regulator's max_spread is equal and if their lists of regulat

[PATCH v7 6/6] regulator: core: Change voltage setting path

2018-04-23 Thread Maciej Purski
has not been registered. Add function for locking coupled regulators and supplies. Extract a new function regulator_set_voltage_rdev() from regulator_set_voltage_unlocked(), which is called when setting voltage of a single regulator. Signed-off-by: Maciej Purski ---

[PATCH v7 2/6] regulator: bindings: Add properties for coupled regulators

2018-04-23 Thread Maciej Purski
Some regulators require keeping their voltage spread below defined max_spread. Add properties to provide information on regulators' coupling. Signed-off-by: Maciej Purski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file chang

[PATCH v7 5/6] regulator: core: Add voltage balancing mechanism

2018-04-23 Thread Maciej Purski
which is about to change its voltage, is not coupled, method regulator_get_optimal_voltage() should simply return the lowest voltage fulfilling consumers' demands. Coupling should be checked only if the system is in PM_SUSPEND_ON state. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 192 +++

[PATCH v7 0/6] Add coupled regulators mechanism

2018-04-23 Thread Maciej Purski
ue, now set to 10) - change algorithm to be more readable - introduce better locking - add more comments - split first patch into two - update commit messages - change sequence of the patches Maciej Purski (6): regulator: core: Make locks re-entrant regulator: bindings: Add properties for c

Re: [PATCH v6 0/5] Add coupled regulators mechanism

2018-03-12 Thread Maciej Purski
On 03/09/2018 04:58 PM, Tony Lindgren wrote: * Mark Brown [180309 12:43]: On Fri, Mar 09, 2018 at 01:22:02PM +0100, Maciej Purski wrote: I would like to kindly ask Fabio Estevam and Tony Lindgren to test the patch series on their boards. I gave it a quick try and this set still causes at

Re: [PATCH v6 0/5] Add coupled regulators mechanism

2018-03-12 Thread Maciej Purski
On 03/09/2018 01:56 PM, Mark Brown wrote: On Fri, Mar 09, 2018 at 01:50:20PM +0100, Maciej Purski wrote: On 03/09/2018 01:42 PM, Mark Brown wrote: Is it possible to respin this in terms of the test/coupled branch in my git tree? There were a bunch of build fixes that got sent and I don&#

Re: [PATCH v6 0/5] Add coupled regulators mechanism

2018-03-09 Thread Maciej Purski
On 03/09/2018 01:42 PM, Mark Brown wrote: On Fri, Mar 09, 2018 at 01:22:02PM +0100, Maciej Purski wrote: I would like to kindly ask Fabio Estevam and Tony Lindgren to test the patch series on their boards. That'd be great, yeah - I can run some tests with kernelci as well, thoug

[PATCH v6 3/6] regulator: core: Parse coupled regulators properties

2018-03-09 Thread Maciej Purski
of the structure, number of coupled regulators and counter of currently resolved regulators. Add of_functions to parse all data needed in regulator coupling. Provide method to check DTS data consistency. Check if each coupled regulator's max_spread is equal and if their lists of regulat

[PATCH v6 0/5] Add coupled regulators mechanism

2018-03-09 Thread Maciej Purski
y. I would like to kindly ask Fabio Estevam and Tony Lindgren to test the patch series on their boards. Best regards, Maciej Purski --- Changes in v6: - change locking model - fix build errors on non-of architectures - update bindings Changes in v5: - rebase against current Mark Brown&#x

[PATCH v6 4/6] regulator: core: Resolve coupled regulators

2018-03-09 Thread Maciej Purski
data inconsistency occurs. If some coupled regulators are not yet registered, don't fail to register, but try to resolve them in late init call. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 100 +++ 1 file changed, 100 insertions(+)

[PATCH v6 5/6] regulator: core: Add voltage balancing mechanism

2018-03-09 Thread Maciej Purski
which is about to change its voltage, is not coupled, method regulator_get_optimal_voltage() should simply return the lowest voltage fulfilling consumers' demands. Coupling should be checked only if the system is in PM_SUSPEND_ON state. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 192 +++

[PATCH v6 1/6] regulator: core: Make locks re-entrant

2018-03-09 Thread Maciej Purski
forbidden is simultaneous coupling and supplying between a pair of regulators. The idea is based on clk core. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 132 +++ include/linux/regulator/driver.h | 2 + 2 files changed, 93 insertions(+), 41

[PATCH v6 6/6] regulator: core: Change voltage setting path

2018-03-09 Thread Maciej Purski
has not been registered. Add function for locking coupled regulators and supplies. Extract a new function regulator_set_voltage_rdev() from regulator_set_voltage_unlocked(), which is called when setting voltage of a single regulator. Signed-off-by: Maciej Purski ---

[PATCH v6 2/6] regulator: bindings: Add properties for coupled regulators

2018-03-09 Thread Maciej Purski
Some regulators require keeping their voltage spread below defined max_spread. Add properties to provide information on regulators' coupling. Signed-off-by: Maciej Purski --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file changed, 5 insertions(+) diff --

[PATCH v6 1/6] regulator: core: Make locks re-entrant

2018-03-09 Thread Maciej Purski
forbidden is simultaneous coupling and supplying between a pair of regulators. The idea is based on clk core. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 132 +++ include/linux/regulator/driver.h | 2 + 2 files changed, 93 insertions(+), 41

Re: Regulator regression in next-20180305

2018-03-07 Thread Maciej Purski
On 03/07/2018 03:10 PM, Mark Brown wrote: On Wed, Mar 07, 2018 at 01:57:12PM +0100, Maciej Purski wrote: I'm trying to figure out what is so special about these boards. The only strange thing, that I haven't noticed at first, is that all regulators share a common supply - dummy reg

Re: Regulator regression in next-20180305

2018-03-07 Thread Maciej Purski
pply(struct regulator_dev *rdev) { int i; - for (i = 0; rdev; rdev = rdev_get_supply(rdev), i++) + for (i = 1000; rdev; rdev = rdev_get_supply(rdev), i++) mutex_lock_nested(&rdev->mutex, i); } Best regards, Maciej Purski

Re: [PATCH v5 0/5] Add coupled regulators mechanism

2018-03-05 Thread Maciej Purski
Hi Fabio, thank you for your response. Could you tell me on which board precisely (on which DTS) has this issue occurred? Also, I don't understand, did you boot successfully and you got only a lockdep warning or you encountered an actual deadlock? Best regards, Maciej Purski On 03/05

[PATCH] regulator: core: Fix build errors

2018-03-05 Thread Maciej Purski
Build errors detected by kbuild test robot occur on non-of architectures. This patch fixes this behavior as well as using plain integer instead of NULL in of_count_phandle_with_args(). Fixes: 0c55103 ("regulator: core: Parse coupled regulators properties") Signed-off-by: Mac

[PATCH v5 5/5] regulator: core: Change voltage setting path

2018-03-02 Thread Maciej Purski
has not been registered. Add function for locking coupled regulators. Extract a new function regulator_set_voltage_rdev() from regulator_set_voltage_unlocked(), which is called when setting voltage of a single regulator. Signed-off-by: Maciej Purski ---

[PATCH v5 4/5] regulator: core: Add voltage balancing mechanism

2018-03-02 Thread Maciej Purski
which is about to change its voltage, is not coupled, method regulator_get_optimal_voltage() should simply return the lowest voltage fulfilling consumers' demands. Coupling should be checked only if the system is in PM_SUSPEND_ON state. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 192 +++

[PATCH v5 0/5] Add coupled regulators mechanism

2018-03-02 Thread Maciej Purski
The current assumption is that an uncoupled regulator is a special case of a coupled one, so they should share a common voltage setting path. Best regards, Maciej Purski --- Changes in v5: - rebase against current Mark Brown's regulators next Changes in v4: - make paths for coup

[PATCH v5 3/5] regulator: core: Resolve coupled regulators

2018-03-02 Thread Maciej Purski
data inconsistency occurs. If some coupled regulators are not yet registered, don't fail to register, but try to resolve them in late init call. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 92 1 file changed, 92 insertions(+)

[PATCH v5 1/5] regulator: bindings: Add properties for coupled regulators

2018-03-02 Thread Maciej Purski
Some regulators require keeping their voltage spread below defined max_spread. Add properties to provide information on regulators' coupling. Reviewed-by: Rob Herring Signed-off-by: Maciej Purski --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file chang

[PATCH v5 2/5] regulator: core: Parse coupled regulators properties

2018-03-02 Thread Maciej Purski
of the structure, number of coupled regulators and counter of currently resolved regulators. Add of_functions to parse all data needed in regulator coupling. Provide method to check DTS data consistency. Check if each coupled regulator's max_spread is equal and if their lists of regulat

[PATCH 3/8] drm/exynos/decon: Use clk bulk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 50 --- 1 file changed, 15 insertions(+), 35 deletions(-)

[PATCH 5/8] drm/exynos: mic: Use clk bulk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 41 +++-- 1 file changed, 14 insertions(+), 27 deletions(-)

[PATCH 4/8] drm/exynos/dsi: Use clk bulk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. In order to achieve consistency with other drivers, define clock names in driver's variants structures. Signed-off-by: Maciej Purski --- drivers/gpu/

[PATCH 7/8] [media] exynos-gsc: Use clk bulk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. Signed-off-by: Maciej Purski --- drivers/media/platform/exynos-gsc/gsc-core.c | 55 ++-- drivers/media/platform/exynos-gsc/gsc-core.h | 2

[PATCH 6/8] drm/exynos/hdmi: Use clk bulk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 97 ++-- 1 file changed, 27 insertions(+), 70 deletions(-)

[PATCH 0/8] Use clk bulk API in exynos5433 drivers

2018-02-19 Thread Maciej Purski
Hi all, the main goal of this patchset is to simplify clk management code in exynos5433 drivers by using clk bulk API. In order to achieve that, patch #1 adds a new function to clk core, which dynamically allocates clk_bulk_data array and fills its id fields. Best regards, Maciej Purski Maciej

[PATCH 8/8] [media] s5p-mfc: Use clk bulk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. Signed-off-by: Maciej Purski --- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 6 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c

[PATCH 2/8] media: s5p-jpeg: Use bulk clk API

2018-02-19 Thread Maciej Purski
Using bulk clk functions simplifies the driver's code. Use devm_clk_bulk functions instead of iterating over an array of clks. Signed-off-by: Maciej Purski --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 45 - drivers/media/platform/s5p-jpeg/jpeg-core.h | 2

[PATCH 1/8] clk: Add clk_bulk_alloc functions

2018-02-19 Thread Maciej Purski
by clk_bulk_alloc() function. Add a managed version of clk_bulk_alloc(). Signed-off-by: Maciej Purski --- drivers/clk/clk-bulk.c | 16 drivers/clk/clk-devres.c | 37 +--- include/linux/clk.h | 64 3 files

[PATCH v2] drm/bridge/sii8620: fix display modes validation

2018-02-02 Thread Maciej Purski
Current implementation of mode_valid() and mode_fixup() callbacks handle packed pixel modes improperly. Fix it by using proper maximum clock values from the documentation. Signed-off-by: Maciej Purski --- Changes in v2: - simplify is_packing_required() function - fix uninitialized variable

[PATCH] drm/bridge/sii8620: fix display of packed pixel modes in MHL2

2018-01-23 Thread Maciej Purski
Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/sil-sii8620.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c index 1718c2e..e13708d 100644 --- a/drivers/gpu/drm/bridge/sil

[PATCH] drm/bridge/sii8620: fix display modes validation

2018-01-23 Thread Maciej Purski
Current implementation of mode_valid() and mode_fixup() callbacks handle packed pixel modes improperly. Fix it by using proper maximum clock values from the documentation. Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/sil-sii8620.c | 90 1 file

[PATCH v2] drm/bridge/sii8620: fix HDMI cable connection to dongle

2018-01-23 Thread Maciej Purski
MHL1, MHL2 and MHL3 using various vendors' dongles both in DVI and HDMI mode. Signed-off-by: Maciej Purski --- Changes in v2: - handle MHL1 and MHL2 initialization sequence - rename hpd_plugged() function to identify_sink(), as it is now used in different contexts - fix commit me

[PATCH v4 1/7] regulator: core: Move of_find_regulator_by_node() to of_regulator.c

2018-01-22 Thread Maciej Purski
parsing coupled regulators properties. Declare of_find_regulator_by_node() function in internal.h as well as regulator_class and dev_to_rdev(), as they are needed by of_find_regulator_by_node(). Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 23

[PATCH v4 5/7] regulator: core: Resolve coupled regulators

2018-01-22 Thread Maciej Purski
data inconsistency occurs. If some coupled regulators are not yet registered, don't fail to register, but try to resolve them in late init call. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 92 1 file changed, 92 insertions(+)

[PATCH v4 4/7] regulator: core: Parse coupled regulators properties

2018-01-22 Thread Maciej Purski
of the structure, number of coupled regulators and counter of currently resolved regulators. Add of_functions to parse all data needed in regulator coupling. Provide method to check DTS data consistency. Check if each coupled regulator's max_spread is equal and if their lists of regulat

[PATCH v4 2/7] regulator: core: Refactor regulator_list_voltage()

2018-01-22 Thread Maciej Purski
regulators. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ab6652e..1118527 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2448,10

[PATCH v4 6/7] regulator: core: Add voltage balancing mechanism

2018-01-22 Thread Maciej Purski
which is about to change its voltage, is not coupled, method regulator_get_optimal_voltage() should simply return the lowest voltage fulfilling consumers' demands. Coupling should be checked only if the system is in PM_SUSPEND_ON state. Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 192 +++

[PATCH v4 7/7] regulator: core: Change voltage setting path

2018-01-22 Thread Maciej Purski
has not been registered. Add function for locking coupled regulators. Extract a new function regulator_set_voltage_rdev() from regulator_set_voltage_unlocked(), which is called when setting voltage of a single regulator. Signed-off-by: Maciej Purski ---

[PATCH v4 3/7] regulator: bindings: Add properties for coupled regulators

2018-01-22 Thread Maciej Purski
Some regulators require keeping their voltage spread below defined max_spread. Add properties to provide information on regulators' coupling. Reviewed-by: Rob Herring Signed-off-by: Maciej Purski --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file chang

[PATCH v4 0/7] Add coupled regulators mechanism

2018-01-22 Thread Maciej Purski
The current assumption is that an uncoupled regulator is a special case of a coupled one, so they should share a common voltage setting path. Best regards, Maciej Purski --- Changes in v4: - make paths for coupled and uncoupled regulators common - coupling descriptors are now always pres

Re: [PATCH v3 4/4] regulator: core: Balance coupled regulators voltages

2017-12-21 Thread Maciej Purski
On 12/15/2017 04:19 PM, Mark Brown wrote: On Wed, Dec 13, 2017 at 10:25:00AM +0100, Maciej Purski wrote: shared. To that end I'd adjust the code so that we always have a coupling descriptor and then handle the case where there's only one regulator described in there. Do yo

Re: [PATCH v3 3/4] regulator: core: Parse coupled regulators properties

2017-12-21 Thread Maciej Purski
On 12/12/2017 12:35 PM, Mark Brown wrote: On Thu, Dec 07, 2017 at 10:46:14AM +0100, Maciej Purski wrote: (...) + mutex_lock(®ulator_list_mutex); + regulator_resolve_coupling(rdev); + mutex_unlock(®ulator_list_mutex); + I'd really expect us to be failing to probe if w

[PATCH v4] iio: adc: ina2xx: Make calibration register value fixed

2017-12-18 Thread Maciej Purski
226) power_lsb = 20 * current_lsb (ina 219) This is a part of the patchset: https://lkml.org/lkml/2017/11/22/394 Signed-off-by: Maciej Purski --- Changes in v4: - fix comments Changes in v3: - remove variable current_lsb and calculate it on each read of current and power scale value - update

[PATCH v3] iio: adc: ina2xx: Make calibration register value fixed

2017-12-15 Thread Maciej Purski
226) power_lsb = 20 * current_lsb (ina 219) This is a part of the patchset: https://lkml.org/lkml/2017/11/22/394 Signed-off-by: Maciej Purski --- Changes in v3: - remove variable current_lsb and calculate it on each read of current and power scale value - update comments Changes in v2

Re: [PATCH v3 4/4] regulator: core: Balance coupled regulators voltages

2017-12-13 Thread Maciej Purski
On 12/12/2017 12:54 PM, Mark Brown wrote: On Thu, Dec 07, 2017 at 10:46:15AM +0100, Maciej Purski wrote: @@ -2447,10 +2482,9 @@ static int _regulator_is_enabled(struct regulator_dev *rdev) return rdev->desc->ops->is_enabled(rdev); } -static int _regulator_list_volta

[PATCH v2] iio: adc: ina2xx: Make calibration register value fixed

2017-12-07 Thread Maciej Purski
226) power_lsb = 20 * current_lsb (ina 219) This is a part of the patchset: https://lkml.org/lkml/2017/11/22/394 Signed-off-by: Maciej Purski --- Changes in v2: - rebase on top of the latest next - remove a redundant variable - power_lsb_uW - fix comments --- drivers/iio/adc/ina2xx-adc.c | 58

[PATCH v3 1/4] regulator: core: Move of_find_regulator_by_node() to of_regulator.c

2017-12-07 Thread Maciej Purski
parsing coupled regulators properties. Declare of_find_regulator_by_node() function in internal.h as well as regulator_class and dev_to_rdev(), as they are needed by of_find_regulator_by_node(). Signed-off-by: Maciej Purski --- drivers/regulator/core.c | 23 +-- drivers

[PATCH v3 2/4] regulator: bindings: Add properties for coupled regulators

2017-12-07 Thread Maciej Purski
Some regulators require keeping their voltage spread below defined max_spread. Add properties to provide information on regulators' coupling. Signed-off-by: Maciej Purski --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file changed, 5 insertions(+) diff --

[PATCH v3 3/4] regulator: core: Parse coupled regulators properties

2017-12-07 Thread Maciej Purski
coupled regulators are already initialized, so it should be done only once per coupled regulators group by the last regulator initialized. Check if coupled regulators phandles arrays match for all coupled regulators and if their max_spread values are the same. Signed-off-by: Maciej Purski

[PATCH v3 4/4] regulator: core: Balance coupled regulators voltages

2017-12-07 Thread Maciej Purski
max_spread constraint fulfilled all the time. Function regulator_coupled_get_optimal_voltage() should find the best possible change for the regulator, which doesn't break max_spread constraint. In function regulator_balance_coupled_voltage() optimize number of steps by finding highest voltage difference on each iteration. Signe

[PATCH v3 0/4] Add coupled regulators mechanism

2017-12-07 Thread Maciej Purski
dd more comments - split first patch into two - update commit messages - change sequence of the patches Maciej Purski (4): regulator: core: Move of_find_regulator_by_node() to of_regulator.c regulator: bindings: Add properties for coupled regulators regulator: core: Parse coupled regulator

[PATCH v5] component: add debugfs support

2017-12-01 Thread Maciej Purski
Remove it on a master deletion. Show a list of devices required by the given master and their status (registered or not). This provides an easy way to check, which device has failed to register if the given master device is not available in the system. Signed-off-by: Maciej Purski --- Cha

Re: [PATCH v4] component: add debugfs support

2017-11-30 Thread Maciej Purski
On 11/30/2017 01:54 PM, Russell King - ARM Linux wrote: On Thu, Nov 30, 2017 at 01:48:32PM +0100, Maciej Purski wrote: Currently there is no information in any vfs about which devices a master component consists of, what makes debugging hard if one of the component devices fails to register

[PATCH v4] component: add debugfs support

2017-11-30 Thread Maciej Purski
Remove it on a master deletion. Show a list of devices required by the given master and their status (registered or not). This provides an easy way to check, which device has failed to register if the given master device is not available in the system. Signed-off-by: Maciej Purski --- Changes in

[PATCH 1/2] drm/bridge/sii8620: remove HSIC initialization

2017-11-29 Thread Maciej Purski
HSIC initialization was taken from the vendor code. HSIC in MHL circuit is not connected, so it is not possible to test it. Tests prove that without HSIC the device works well. Therefore it can be removed. Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/sil-sii8620.c | 38

[PATCH 2/2] drm/bridge/sii8620: fix HDMI cable connection to dongle

2017-11-29 Thread Maciej Purski
MHL bridge is usually connected to TV via MHL dongle. Currently plugging HDMI cable to dongle is handled improperly. This patch fixes it. Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/sil-sii8620.c | 49 1 file changed, 27 insertions(+), 22

[PATCH] drm/bridge/sii8620: start MHL transmission after HDMI signal detection

2017-11-29 Thread Maciej Purski
lines in irq_scdt() function without waiting for infoframe interrupt. Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/sil-sii8620.c | 53 ++-- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm

[PATCH v3] component: add debugfs support

2017-11-24 Thread Maciej Purski
Add 'component' directory to debugfs. Create a new file for each master, when a master is added. Remove it on a master deletion. Show a list of devices matched with master and indicate if master's components were successfully added and if the whole master is bound. Signed-off-by

[PATCH 1/2] iio: adc: ina2xx: Make calibration register value fixed

2017-11-22 Thread Maciej Purski
226) power_lsb = 20 * current_lsb (ina 219) Signed-off-by: Maciej Purski --- drivers/iio/adc/ina2xx-adc.c | 59 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 84a4387

[PATCH 2/2] hwmon: (ina2xx) Make calibration register value fixed

2017-11-22 Thread Maciej Purski
226) power_lsb = 20 * current_lsb (ina 219) Signed-off-by: Maciej Purski --- drivers/hwmon/ina2xx.c | 87 +- 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index 62e38fa..e362a93

[PATCH 0/2] Make calibration register value fixed for ina2xx drivers

2017-11-22 Thread Maciej Purski
regards, Maciej Purski Maciej Purski (2): iio: adc: ina2xx: Make calibration register value fixed hwmon: (ina2xx) Make calibration register value fixed drivers/hwmon/ina2xx.c | 87 +--- drivers/iio/adc/ina2xx-adc.c | 59

Re: [PATCH v2] component: add debugfs support

2017-11-16 Thread Maciej Purski
On 11/15/2017 03:01 PM, Greg Kroah-Hartman wrote: On Wed, Nov 15, 2017 at 01:05:26PM +0100, Maciej Purski wrote: Add 'component' directory to debugfs. Create a new file for each master, when a master is added. Remove it on a master deletion. Show a list of devices matched with

[PATCH v2] component: add debugfs support

2017-11-15 Thread Maciej Purski
Add 'component' directory to debugfs. Create a new file for each master, when a master is added. Remove it on a master deletion. Show a list of devices matched with master and indicate if master's components were successfully added and if the whole master is bound. Signed-off-by

  1   2   >