[PATCH v4] mfd: max77693: Add muic of_compatible in mfd_cell

2017-08-23 Thread Maciej Purski
This patch adds muic of_compatible in order to use the muic device driver in device tree. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- v2: - added muic to documentation v3: - removed duplication v4: - fixed commit message Documentation/devicetree/bindings/mfd/max77693.t

Re: [PATCH 1/2] regulator: core: Add coupled regulators mechanism

2017-09-19 Thread Maciej Purski
On 09/19/2017 03:09 PM, Mark Brown wrote: On Mon, Sep 18, 2017 at 10:39:51AM +0200, Maciej Purski wrote: On Odroid XU3/4 and other Exynos5422 based boards there is a case, that different devices on the board are supplied by different regulators with non-fixed voltages. If one of these devices

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

2017-09-18 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 <m.pur...@samsung.com> --- Documentation/devicetree/bindings/regulator/regulator.txt | 3 +++ 1 file changed, 3 inse

[PATCH 0/2] Add coupled regulators mechanism

2017-09-18 Thread Maciej Purski
This feature is required to enable support for generic CPUfreq and devfreq drivers for the mentioned boards. Best regards, Maciej Purski Maciej Purski (2): regulator: core: Add coupled regulators mechanism regulator: bindings: Add properties for coupled regulators .../devicetree/bindin

[PATCH 1/2] regulator: core: Add coupled regulators mechanism

2017-09-18 Thread Maciej Purski
the device tree. On each voltage change the core should find the best voltages which suit all consumers' demands and max_spread. Then set them for a coupled regulator also. This feature is required to enable support for generic CPUfreq and devfreq drivers for the mentioned boards. Signed-off-by: Maciej

[PATCH] mfd: max77693: Add muic of_compatible in mfd_cell

2017-08-21 Thread Maciej Purski
This patch adds muic of_compatible in order to use the muic device driver in device tree. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/mfd/max77693.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c

[PATCH] extcon: max77693: Allow MHL attach notifier

2017-08-21 Thread Maciej Purski
Without this patch extcon couldn't notify attaching MHL cable. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/extcon/extcon-max77693.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c

[PATCH v3] mfd: max77693: Add muic of_compatible in mfd_cell

2017-08-22 Thread Maciej Purski
This patch adds muic of_compatible in order to use the muic device driver in device tree. v2: - added muic to documentation v3: - removed duplication Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- Documentation/devicetree/bindings/mfd/max77693.txt | 6 ++ drivers/mfd/max7

[PATCH v2] mfd: max77693: Add muic of_compatible in mfd_cell

2017-08-22 Thread Maciej Purski
This patch adds muic of_compatible in order to use the muic device driver in device tree. v2: - added muic to documentation Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- Documentation/devicetree/bindings/mfd/max77693.txt | 6 ++ drivers/mfd/max7

[RESEND PATCH v4] mfd: max77693: Add muic of_compatible in mfd_cell

2017-09-05 Thread Maciej Purski
This patch adds muic of_compatible in order to use the muic device driver in device tree. Signed-off-by: Maciej Purski <m.pur...@samsung.com> Reviewed-by: Chanwoo Choi <cw00.c...@samsung.com> Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Acked-by: Rob Herring <r...@kern

Re: [2/3] iio: adc: ina2xx: Adhere to documented ABI, use Ohm instead of uOhm

2017-10-09 Thread Maciej Purski
On 10/01/2017 09:48 PM, Stefan Brüns wrote: According to the ABI documentation, the shunt resistor value should be specificied in Ohm. As this is also used/documented for the MAX9611, use the same for the INA2xx driver. This poses an ABI break for anyone actually altering the shunt value

Re: [PATCH 3/3] iio: adc: ina2xx: Allow setting Shunt Voltage PGA gain and Bus Voltage range

2017-10-09 Thread Maciej Purski
essary. Signed-off-by: Stefan Brüns <stefan.bru...@rwth-aachen.de> cc'd Maciej Purski who is working to improve the current calibration elements - I'd like you both to review each others patches if possible as the ABI is getting complex in here! I think what you have here won't interfere with M

[RFC PATCH v2 3/3] regulator: core: Balance coupled regulators voltages

2017-10-18 Thread Maciej Purski
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. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/regulator/core.c

[RFC PATCH v2 1/3] regulator: bindings: Add properties for coupled regulators

2017-10-18 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 <m.pur...@samsung.com> --- Documentation/devicetree/bindings/regulator/regulator.txt | 4 1 file changed, 4 inse

[RFC PATCH v2 2/3] regulator: core: Parse coupled regulators properties

2017-10-18 Thread Maciej Purski
the 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

[RFC PATCH v2 0/3] Add coupled regulators mechanism

2017-10-18 Thread Maciej Purski
st enumerate locks, then sort them and remove double entries 3. Always lock all coupled regulators and their parents - to avoid deadlock on common parent, introduce so called reentrant locks (lock which might be taken multiple times by the same process). Best regards, Maciej Purski

[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: Maciej Purski

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

2017-11-22 Thread Maciej Purski
are applied for both iio and hwmon ina2xx drivers. Best 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 +--- dri

[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 <m.pur...@samsung.com> --- drivers/hwmon/ina2xx.c | 87 +- 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c

[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 <m.pur...@samsung.com> --- 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/

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/bridge/sil-s

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/bridge/sil-sii8620.c | 49 1 file chang

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/bridge/sil-sii8620.c | 53 ++-- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/brid

[PATCH v4] component: add debugfs support

2017-11-30 Thread Maciej Purski
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 <m.pur...@samsung.

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

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 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 <m.pur...@samsung.com> --- Changes in v4: - fix comments Changes in v3: - remove variable current_lsb and calculate it on each read of current and

[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 <m.pur...@samsung.com> --- Changes in v3: - remove variable current_lsb and calculate it on each read of current and power scale value - update co

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 master

[PATCH] 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: Maciej Purski

[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: Maciej Purski

Re: [2/3] iio: adc: ina2xx: Adhere to documented ABI, use Ohm instead of uOhm

2017-11-02 Thread Maciej Purski
On 10/14/2017 08:27 PM, Stefan Bruens wrote: On Montag, 9. Oktober 2017 11:29:43 CEST Maciej Purski wrote: On 10/01/2017 09:48 PM, Stefan Brüns wrote: According to the ABI documentation, the shunt resistor value should be specificied in Ohm. As this is also used/documented for the MAX9611

Re: [2/3] iio: adc: ina2xx: Adhere to documented ABI, use Ohm instead of uOhm

2017-11-08 Thread Maciej Purski
On 11/06/2017 11:21 AM, Stefan Brüns wrote: On Thursday, November 2, 2017 10:04:01 AM CET Maciej Purski wrote: On 10/14/2017 08:27 PM, Stefan Bruens wrote: On Montag, 9. Oktober 2017 11:29:43 CEST Maciej Purski wrote: On 10/01/2017 09:48 PM, Stefan Brüns wrote: According to the ABI

[PATCH v5] component: add debugfs support

2017-12-01 Thread Maciej Purski
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 <m.pur...@samsung.

[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 <m.pur...@samsung.com> --- Changes in v2: - rebase on top of the latest next - remove a redundant variable - power_lsb_uW - fix comments --- drive

[PATCH v3 0/4] Add coupled regulators mechanism

2017-12-07 Thread Maciej Purski
ts suppliers are additionally locked. Best regards, Maciej Purski --- Changes in v3: - move dts parsing code to of_regulator.c, in order to the so, add a new commit in which of_regulator_find_by_node() is moved to of_regulator.c as well - improve error messages - move max_spread variable to

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

2017-12-07 Thread Maciej Purski
of 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 <m.pur...@samsung.com> --- drivers/regulator/core.c

[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 <m.pur...@samsung.com> --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file changed, 5 inse

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

2017-12-07 Thread Maciej Purski
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 <m.pur...@samsung.com> --- d

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

2017-12-07 Thread Maciej Purski
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. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- d

Re: [RFC PATCH v2 1/3] regulator: bindings: Add properties for coupled regulators

2017-10-25 Thread Maciej Purski
On 10/25/2017 02:59 PM, Rob Herring wrote: On Wed, Oct 25, 2017 at 2:31 AM, Maciej Purski <m.pur...@samsung.com> wrote: On 10/24/2017 08:58 PM, Rob Herring wrote: On Wed, Oct 18, 2017 at 02:47:00PM +0200, Maciej Purski wrote: Some regulators require keeping their voltage spread

Re: [RFC PATCH v2 1/3] regulator: bindings: Add properties for coupled regulators

2017-10-25 Thread Maciej Purski
On 10/24/2017 08:58 PM, Rob Herring wrote: On Wed, Oct 18, 2017 at 02:47:00PM +0200, Maciej Purski wrote: Some regulators require keeping their voltage spread below defined max_spread. Add properties to provide information on regulators' coupling. Signed-off-by: Maciej Purski <m.

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

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.

[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

[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 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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- arch/arm/boot/dts/exynos5250.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- .../bindings/display/bridge/toshiba,tc35876

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/gpu/drm/bridge/Kconfig| 7 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridg

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

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- .../devicetree/bindings/display/panel/boe,hv070wsa-100.txt |

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 16 1 file c

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/gpu/drm/panel/panel-s

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 27 +-- 1 file chang

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 24 +++

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 39 1

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

[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 <a.ha...@samsung.com> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- arch/arm/boot/dts/exynos5250.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/

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

[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

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

2018-06-04 Thread Maciej Purski
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 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator

Re: Regression in Linux next again

2018-06-04 Thread Maciej Purski
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: core

[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

Re: Regression in Linux next again

2018-05-30 Thread Maciej Purski
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 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

[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] drm/bridge/sii8620: fix display of packed pixel modes in MHL2

2018-01-23 Thread Maciej Purski
-by: Maciej Purski <m.pur...@samsung.com> --- 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/g

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

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

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/bridge/sil-sii8620.

[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 <m.pur...@samsung.com> --- Changes in v2: - simplify is_packing_required() function

[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 <m.pur...@samsung.com> --- drivers/media/platform/exynos-gsc/gsc-core.c | 55 ++-- drivers/media/platform/exyn

[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 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 <m.pur...@samsung.com> --- drivers/gpu/drm/exynos/exynos_hdmi.c | 97 ++-- 1 file changed, 27 inse

[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 <m.pur...@samsung.com> --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 45 - drivers/media/platform/s5

[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 <m.pur...@samsung.com> --- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 6 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c

[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 <m.pur...@samsung.com> --- drivers/clk/clk-bulk.c | 16 drivers/clk/clk-devres.c | 37 +--- include/linux/clk.h

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 50 --- 1 file changed, 15 inse

[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 <m.pur...@samsung.com> --- d

[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 <m.pur...@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 41 +++-- 1 file changed, 14 inse

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 you have any

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(_list_mutex); + regulator_resolve_coupling(rdev); + mutex_unlock(_list_mutex); + I'd really expect us to be failing to probe if we run into an error

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

2018-01-22 Thread Maciej Purski
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 <m.pur...@samsung.com> --- drivers/regulator/core.c

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

2018-01-22 Thread Maciej Purski
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 <m.pur...@samsung.com> --- drivers/regulator/core.c

[PATCH v4 0/7] Add coupled regulators mechanism

2018-01-22 Thread Maciej Purski
ts suppliers are additionally locked. 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

[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 <r...@kernel.org> Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- Documentation/devicetree/bindin

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

2018-01-22 Thread Maciej Purski
regulators. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- 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/d

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

2018-01-22 Thread Maciej Purski
of 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 <m.pur...@samsung.com> --- drivers/regulator/core.c

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

2018-01-22 Thread Maciej Purski
. 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 <m.pur...@samsung.com> --- drivers/regulator/core.c | 92 1 file changed, 92 insertions(+) diff

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

2018-01-22 Thread Maciej Purski
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 regulators match. Signed-off-by: Maciej Pur

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 <broo...@kernel.org> [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 qui

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't

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

2018-03-09 Thread Maciej Purski
be forbidden is simultaneous coupling and supplying between a pair of regulators. The idea is based on clk core. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/regulator/core.c | 132 +++ include/linux/regulator/driver.h | 2 + 2 files c

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

2018-03-09 Thread Maciej Purski
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 <m.pur...@samsung.com> --- drivers/regulator/core.c

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

2018-03-09 Thread Maciej Purski
be forbidden is simultaneous coupling and supplying between a pair of regulators. The idea is based on clk core. Signed-off-by: Maciej Purski <m.pur...@samsung.com> --- drivers/regulator/core.c | 132 +++ include/linux/regulator/driver.h | 2 + 2 files c

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

2018-03-09 Thread Maciej Purski
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 <m.pur...@samsung.com> --- drivers/regulator/core.c

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

2018-03-09 Thread Maciej Purski
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 regulators match. Signed-off-by: Maciej Pur

[PATCH v6 0/5] Add coupled regulators mechanism

2018-03-09 Thread Maciej Purski
tions except coupling with a supply. 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: - re

  1   2   3   >