Re: [PATCH] pwm: Avoid double mutex lock on pwm_enable

2015-11-20 Thread Krzysztof Kozlowski
W dniu 21.11.2015 o 01:59, Anand Moon pisze:
> Commit d1cd21427747f15920cd726f5f67a07880e7dee4
> (pwm: Set enable state properly on failed call to enable)
> introduce double lock of mutex on pwm_enable
> 
> Changes fix the following debug lock warning.
> 
> [2.701720] WARNING: CPU: 3 PID: 0 at kernel/locking/mutex.c:526 
> __mutex_lock_slowpath+0x3bc/0x404()
> [2.701731] DEBUG_LOCKS_WARN_ON(in_interrupt())

Hi Anand!

Yeah, I am hitting this as well. Annoying. However your description is
inaccurate. Double lock of mutex does not cause warnings of sleeping or
locking in atomic context (if you build with debug sleep atomic you will
see different warning). More over you are partially reverting the commit
d1cd21427747 ("pwm: Set enable state properly on failed call to enable")
without proper explanation:
1. why this locking is inappropriate;
2. why it is safe to remove the mutex_lock().

Please find the real problem, fix the real problem and throughly explain
the real issue.

I was suspecting some weird changes in timers. For !irqsafe timer I
think it is safe to use mutexes... but apparently not. Maybe a work
should be scheduled from function called by timer?

Warning with debug atomic sleep:
[   16.047517] BUG: sleeping function called from invalid context at
../kernel/locking/mutex.c:617
[   16.054866] in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/0
[   16.061402] INFO: lockdep is turned off.
[   16.065281] Preemption disabled at:[<  (null)>]   (null)
[   16.070524]
[   16.072002] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.4.0-rc1-00040-g28c429565d4f #290
[   16.080150] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   16.086215] [] (unwind_backtrace) from []
(show_stack+0x10/0x14)
[   16.093938] [] (show_stack) from []
(dump_stack+0x70/0xbc)
[   16.101122] [] (dump_stack) from []
(mutex_lock_nested+0x24/0x474)
[   16.109009] [] (mutex_lock_nested) from []
(pwm_enable+0x20/0x7c)
[   16.116799] [] (pwm_enable) from []
(led_heartbeat_function+0xdc/0x140)
[   16.125119] [] (led_heartbeat_function) from []
(call_timer_fn+0x6c/0xf4)
[   16.133606] [] (call_timer_fn) from []
(run_timer_softirq+0x1a8/0x230)
[   16.141846] [] (run_timer_softirq) from []
(__do_softirq+0x134/0x2c0)
[   16.149982] [] (__do_softirq) from []
(irq_exit+0xd0/0x114)
[   16.157255] [] (irq_exit) from []
(__handle_domain_irq+0x70/0xe4)
[   16.165056] [] (__handle_domain_irq) from []
(gic_handle_irq+0x4c/0x94)
[   16.173376] [] (gic_handle_irq) from []
(__irq_svc+0x58/0x98)
[   16.180817] Exception stack(0xc08cdf58 to 0xc08cdfa0)
[   16.185823] df40:
   c0010dcc 
[   16.193997] df60: c08cdfa8  c05f57c4  c08ca520
c08ce4bc c08c7364 c08ce4b4
[   16.202141] df80: c09121ca  0001 c08cdfa8 c0010dcc
c0010dd0 600f0013 
[   16.210291] [] (__irq_svc) from []
(arch_cpu_idle+0x20/0x3c)
[   16.217661] [] (arch_cpu_idle) from []
(cpu_startup_entry+0x17c/0x26c)
[   16.225899] [] (cpu_startup_entry) from []
(start_kernel+0x368/0x3d0)

Best regards,
Krzysztof


> [2.701737] Modules linked in:
> [2.701748] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.0-rc1-xu4f #24
> [2.701753] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
> [2.701787] [] (unwind_backtrace) from [] 
> (show_stack+0x10/0x14)
> [2.701808] [] (show_stack) from [] 
> (dump_stack+0x84/0xc4)
> [2.701824] [] (dump_stack) from [] 
> (warn_slowpath_common+0x80/0xb0)
> [2.701836] [] (warn_slowpath_common) from [] 
> (warn_slowpath_fmt+0x30/0x40)
> [2.701849] [] (warn_slowpath_fmt) from [] 
> (__mutex_lock_slowpath+0x3bc/0x404)
> [2.701864] [] (__mutex_lock_slowpath) from [] 
> (mutex_lock+0xc/0x24)
> [2.701884] [] (mutex_lock) from [] 
> (pwm_enable+0x20/0x7c)
> [2.701903] [] (pwm_enable) from [] 
> (led_heartbeat_function+0x74/0x144)
> [2.701919] [] (led_heartbeat_function) from [] 
> (call_timer_fn+0x24/0x98)
> [2.701932] [] (call_timer_fn) from [] 
> (run_timer_softirq+0x160/0x21c)
> [2.701946] [] (run_timer_softirq) from [] 
> (__do_softirq+0x110/0x228)
> [2.701959] [] (__do_softirq) from [] 
> (irq_exit+0xc0/0xfc)
> [2.701976] [] (irq_exit) from [] 
> (__handle_domain_irq+0x80/0xec)
> [2.701990] [] (__handle_domain_irq) from [] 
> (gic_handle_irq+0x54/0x94)
> [2.702001] [] (gic_handle_irq) from [] 
> (__irq_svc+0x54/0x90)
> [2.702008] Exception stack(0xee8bdf88 to 0xee8bdfd0)
> [2.702019] df80:   0001   c001b720 
> ee8bc000 c0573354
> [2.702031] dfa0:   ee8bdfe0 c07f92e4 c08004b4 c08004bc 
> f0806640 ee8bdfd8
> [2.702039] dfc0: c0010180 c0010184 6013 
> [2.702053] [] (__irq_svc) from [] 
> (arch_cpu_idle+0x38/0x3c)
> [2.702073] [] (arch_cpu_idle) from [] 
> (cpu_startup_entry+0x1ec/0x270)
> [2.702086] [] (cpu_startup_entry) from [<4000956c>] (0x4000956c)
> [2.702093] ---[ end trace 539af70491f4f1a9 ]---
> 
> Signed-off-by: Anand Moon 
> ---
>  drivers/pwm

[PATCH] pwm: Avoid double mutex lock on pwm_enable

2015-11-20 Thread Anand Moon
Commit d1cd21427747f15920cd726f5f67a07880e7dee4
(pwm: Set enable state properly on failed call to enable)
introduce double lock of mutex on pwm_enable

Changes fix the following debug lock warning.

[2.701720] WARNING: CPU: 3 PID: 0 at kernel/locking/mutex.c:526 
__mutex_lock_slowpath+0x3bc/0x404()
[2.701731] DEBUG_LOCKS_WARN_ON(in_interrupt())
[2.701737] Modules linked in:
[2.701748] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.0-rc1-xu4f #24
[2.701753] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[2.701787] [] (unwind_backtrace) from [] 
(show_stack+0x10/0x14)
[2.701808] [] (show_stack) from [] 
(dump_stack+0x84/0xc4)
[2.701824] [] (dump_stack) from [] 
(warn_slowpath_common+0x80/0xb0)
[2.701836] [] (warn_slowpath_common) from [] 
(warn_slowpath_fmt+0x30/0x40)
[2.701849] [] (warn_slowpath_fmt) from [] 
(__mutex_lock_slowpath+0x3bc/0x404)
[2.701864] [] (__mutex_lock_slowpath) from [] 
(mutex_lock+0xc/0x24)
[2.701884] [] (mutex_lock) from [] 
(pwm_enable+0x20/0x7c)
[2.701903] [] (pwm_enable) from [] 
(led_heartbeat_function+0x74/0x144)
[2.701919] [] (led_heartbeat_function) from [] 
(call_timer_fn+0x24/0x98)
[2.701932] [] (call_timer_fn) from [] 
(run_timer_softirq+0x160/0x21c)
[2.701946] [] (run_timer_softirq) from [] 
(__do_softirq+0x110/0x228)
[2.701959] [] (__do_softirq) from [] 
(irq_exit+0xc0/0xfc)
[2.701976] [] (irq_exit) from [] 
(__handle_domain_irq+0x80/0xec)
[2.701990] [] (__handle_domain_irq) from [] 
(gic_handle_irq+0x54/0x94)
[2.702001] [] (gic_handle_irq) from [] 
(__irq_svc+0x54/0x90)
[2.702008] Exception stack(0xee8bdf88 to 0xee8bdfd0)
[2.702019] df80:   0001   c001b720 
ee8bc000 c0573354
[2.702031] dfa0:   ee8bdfe0 c07f92e4 c08004b4 c08004bc 
f0806640 ee8bdfd8
[2.702039] dfc0: c0010180 c0010184 6013 
[2.702053] [] (__irq_svc) from [] 
(arch_cpu_idle+0x38/0x3c)
[2.702073] [] (arch_cpu_idle) from [] 
(cpu_startup_entry+0x1ec/0x270)
[2.702086] [] (cpu_startup_entry) from [<4000956c>] (0x4000956c)
[2.702093] ---[ end trace 539af70491f4f1a9 ]---

Signed-off-by: Anand Moon 
---
 drivers/pwm/core.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index d24ca5f..b8f035a 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -506,16 +506,12 @@ int pwm_enable(struct pwm_device *pwm)
if (!pwm)
return -EINVAL;
 
-   mutex_lock(&pwm->lock);
-
if (!test_and_set_bit(PWMF_ENABLED, &pwm->flags)) {
err = pwm->chip->ops->enable(pwm->chip, pwm);
if (err)
clear_bit(PWMF_ENABLED, &pwm->flags);
}
 
-   mutex_unlock(&pwm->lock);
-
return err;
 }
 EXPORT_SYMBOL_GPL(pwm_enable);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-20 Thread Javier Martinez Canillas
Hello Inki,

On 11/20/2015 08:13 AM, Inki Dae wrote:
> 
> 
> 2015년 11월 20일 19:59에 Inki Dae 이(가) 쓴 글:
>> Hi Javier,
>>
>> 2015년 11월 20일 00:51에 Javier Martinez Canillas 이(가) 쓴 글:
>>> On 11/19/2015 11:55 AM, Javier Martinez Canillas wrote:
>>>>>>
>>>>>
>>>>> This series causes a boot failure on at least an Exynos5800 Peach Pi
>>>>> Chromebook (tested myself) and seems to be the cause of other Exynos
>>>>> boards failing to boot: http://kernelci.org/boot/?exynos&fail
>>>>>
>>>>> [snip]
>>>>>
>>>>>>   drm/exynos: add pm_runtime to Mixer
>>>>>>   drm/exynos: add pm_runtime to FIMD
>>>>>
>>>>> I had to revert these patches in order to get the machine in a bootable
>>>>> state again, the sha1 hash for these patches in next-20151119 are:
>>>>>
>>>>> 045febd5f813 drm/exynos: add pm_runtime to FIMD
>>>
>>> On a closer look, only reverting the FIMD patch is enough
>>> to make at least the Exynos5800 Peach Pi to boot again.
>>
>> Thanks for report.
>>
>> I assume that the issue is because above patch removed 'suspended' variable
>> for checking the suspend status in runtime so I revived it.
>>
>> I'm not sure that the change could resolve the issue. Could you test it
>> with the change again? I have no Exynos5800 Peach Pi board. :(
>>
>> For this, I pushed it to below exynos-drm/for-next branch,
>>  
>> https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/commit/?h=exynos-drm/for-next&id=e84f43e2b2c3388694b0b3a58c2c4447f1fbae7c
>>
>> If the issue is resolved by the change then I will modify other patches for
>> DECON series. And if really so, there may be a corner case we missed.
> 
> Oops, I found out one error at the boot log,
> http://storage.kernelci.org/next/next-20151120/arm-multi_v7_defconfig+CONFIG_LKDTM=y/lab-collabora/boot-exynos5800-peach-pi.html
> 
> The boot log says,
> [5.754493] vdd_ldo9: supplied by vdd_2v
> [5.765510] of_graph_get_next_endpoint(): no port node found in 
> /dp-controller@145B
>

This message is a red herring for the reported issue, the message is also
present when the machine boots and the display is brought correctly.
 
> Seems this error is because exynos5800-peach-pit.dts file doesn't have 
> 'ports' node in dp node.
>
> Below is dp node description of exynos5420-peach-pit.dts file.
> &dp {
>   status = "okay";
>   pinctrl-names = "default";
>   pinctrl-0 = <&dp_hpd_gpio>;
>   samsung,color-space = <0>;
>   samsung,dynamic-range = <0>;
>   samsung,ycbcr-coeff = <0>;
>   samsung,color-depth = <1>;
>   samsung,link-rate = <0x06>;
>   samsung,lane-count = <2>;
>   samsung,hpd-gpio = <&gpx2 6 GPIO_ACTIVE_HIGH>;
> 
>   ports {
>   port@0 {
>   dp_out: endpoint {
>   remote-endpoint = <&bridge_in>;
>   };
>   };
>   };
> };
> 
> And below is for exynos5800-peash-pit.dts,
> &dp {
>   status = "okay";
>   pinctrl-names = "default";
>   pinctrl-0 = <&dp_hpd_gpio>;
>   samsung,color-space = <0>;
>   samsung,dynamic-range = <0>;
>   samsung,ycbcr-coeff = <0>;
>   samsung,color-depth = <1>;
>   samsung,link-rate = <0x0a>;
>   samsung,lane-count = <2>;
>   samsung,hpd-gpio = <&gpx2 6 GPIO_ACTIVE_HIGH>;
>   panel = <&panel>;
> };
> 

The difference is because the Exynos5420 Peach Pit Display Port is not
attached directly to the display panel, there is an eDP/LVDS bridge chip
in the middle (PS8622) while the Exynos5800 Peach Pi doesn't have that.

The Exynos DP driver lookups for either a panel phandle or an OF graph
endpoint that points to a bridge chip and the bridge enpoint has a port
that points to the panel.

So the DT is correct but of_graph_get_next_endpoint() always prints an
error if the port so OF graph endpoints it seems can't be optional as
used in this driver. Maybe that message should be change to debug then?

Another option is to extend the DP driver DT binding to be more generic
supporting having a port to a panel besides a bridge, so we could have
something like this for Exynos5800 Peach and be consistent in both cases:

diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts 
b/arch/arm/boot/dts/exynos5800-peach-pi.dts
in

Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-20 Thread Javier Martinez Canillas
Hello Inki,

On 11/20/2015 07:59 AM, Inki Dae wrote:
> Hi Javier,
> 
> 2015년 11월 20일 00:51에 Javier Martinez Canillas 이(가) 쓴 글:
>> On 11/19/2015 11:55 AM, Javier Martinez Canillas wrote:
>

 This series causes a boot failure on at least an Exynos5800 Peach Pi
 Chromebook (tested myself) and seems to be the cause of other Exynos
 boards failing to boot: http://kernelci.org/boot/?exynos&fail

 [snip]

>   drm/exynos: add pm_runtime to Mixer
>   drm/exynos: add pm_runtime to FIMD

 I had to revert these patches in order to get the machine in a bootable
 state again, the sha1 hash for these patches in next-20151119 are:

 045febd5f813 drm/exynos: add pm_runtime to FIMD
>>
>> On a closer look, only reverting the FIMD patch is enough
>> to make at least the Exynos5800 Peach Pi to boot again.
> 
> Thanks for report.
>

Thanks to you for the quick answer and providing a fix.
 
> I assume that the issue is because above patch removed 'suspended' variable
> for checking the suspend status in runtime so I revived it.
>

It seems your assumption was correct...
 
> I'm not sure that the change could resolve the issue. Could you test it
> with the change again? I have no Exynos5800 Peach Pi board. :(
> 
> For this, I pushed it to below exynos-drm/for-next branch,
>   
> https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/commit/?h=exynos-drm/for-next&id=e84f43e2b2c3388694b0b3a58c2c4447f1fbae7c
> 
> If the issue is resolved by the change then I will modify other patches for
> DECON series. And if really so, there may be a corner case we missed.
>

... since I reverted the offending commit and cherry-picked the one
in your for-next branch and the machine booted again.
 
> Thanks,
> Inki Dae
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-20 Thread Inki Dae


2015년 11월 20일 19:59에 Inki Dae 이(가) 쓴 글:
> Hi Javier,
> 
> 2015년 11월 20일 00:51에 Javier Martinez Canillas 이(가) 쓴 글:
>> On 11/19/2015 11:55 AM, Javier Martinez Canillas wrote:
>>>>>
>>>>
>>>> This series causes a boot failure on at least an Exynos5800 Peach Pi
>>>> Chromebook (tested myself) and seems to be the cause of other Exynos
>>>> boards failing to boot: http://kernelci.org/boot/?exynos&fail
>>>>
>>>> [snip]
>>>>
>>>>>   drm/exynos: add pm_runtime to Mixer
>>>>>   drm/exynos: add pm_runtime to FIMD
>>>>
>>>> I had to revert these patches in order to get the machine in a bootable
>>>> state again, the sha1 hash for these patches in next-20151119 are:
>>>>
>>>> 045febd5f813 drm/exynos: add pm_runtime to FIMD
>>
>> On a closer look, only reverting the FIMD patch is enough
>> to make at least the Exynos5800 Peach Pi to boot again.
> 
> Thanks for report.
> 
> I assume that the issue is because above patch removed 'suspended' variable
> for checking the suspend status in runtime so I revived it.
> 
> I'm not sure that the change could resolve the issue. Could you test it
> with the change again? I have no Exynos5800 Peach Pi board. :(
> 
> For this, I pushed it to below exynos-drm/for-next branch,
>   
> https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/commit/?h=exynos-drm/for-next&id=e84f43e2b2c3388694b0b3a58c2c4447f1fbae7c
> 
> If the issue is resolved by the change then I will modify other patches for
> DECON series. And if really so, there may be a corner case we missed.

Oops, I found out one error at the boot log,
http://storage.kernelci.org/next/next-20151120/arm-multi_v7_defconfig+CONFIG_LKDTM=y/lab-collabora/boot-exynos5800-peach-pi.html

The boot log says,
[5.754493] vdd_ldo9: supplied by vdd_2v
[5.765510] of_graph_get_next_endpoint(): no port node found in 
/dp-controller@145B

Seems this error is because exynos5800-peach-pit.dts file doesn't have 'ports' 
node in dp node.

Below is dp node description of exynos5420-peach-pit.dts file.
&dp {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dp_hpd_gpio>;
samsung,color-space = <0>;
samsung,dynamic-range = <0>;
samsung,ycbcr-coeff = <0>;
samsung,color-depth = <1>;
samsung,link-rate = <0x06>;
samsung,lane-count = <2>;
samsung,hpd-gpio = <&gpx2 6 GPIO_ACTIVE_HIGH>;

ports {
port@0 {
dp_out: endpoint {
remote-endpoint = <&bridge_in>;
};
};
};
};

And below is for exynos5800-peash-pit.dts,
&dp {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dp_hpd_gpio>;
samsung,color-space = <0>;
samsung,dynamic-range = <0>;
samsung,ycbcr-coeff = <0>;
samsung,color-depth = <1>;
samsung,link-rate = <0x0a>;
samsung,lane-count = <2>;
samsung,hpd-gpio = <&gpx2 6 GPIO_ACTIVE_HIGH>;
panel = <&panel>;
};

Thanks,
Inki Dae

> 
> Thanks,
> Inki Dae
> 
>>
>> Best regards,
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-20 Thread Inki Dae
Hi Javier,

2015년 11월 20일 00:51에 Javier Martinez Canillas 이(가) 쓴 글:
> On 11/19/2015 11:55 AM, Javier Martinez Canillas wrote:

>>>
>>> This series causes a boot failure on at least an Exynos5800 Peach Pi
>>> Chromebook (tested myself) and seems to be the cause of other Exynos
>>> boards failing to boot: http://kernelci.org/boot/?exynos&fail
>>>
>>> [snip]
>>>
   drm/exynos: add pm_runtime to Mixer
   drm/exynos: add pm_runtime to FIMD
>>>
>>> I had to revert these patches in order to get the machine in a bootable
>>> state again, the sha1 hash for these patches in next-20151119 are:
>>>
>>> 045febd5f813 drm/exynos: add pm_runtime to FIMD
> 
> On a closer look, only reverting the FIMD patch is enough
> to make at least the Exynos5800 Peach Pi to boot again.

Thanks for report.

I assume that the issue is because above patch removed 'suspended' variable
for checking the suspend status in runtime so I revived it.

I'm not sure that the change could resolve the issue. Could you test it
with the change again? I have no Exynos5800 Peach Pi board. :(

For this, I pushed it to below exynos-drm/for-next branch,

https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/commit/?h=exynos-drm/for-next&id=e84f43e2b2c3388694b0b3a58c2c4447f1fbae7c

If the issue is resolved by the change then I will modify other patches for
DECON series. And if really so, there may be a corner case we missed.

Thanks,
Inki Dae

> 
> Best regards,
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH v2] mfd: sec-core: Rename MFD and regulator names differently

2015-11-20 Thread Alim Akhtar
Currently S2MPSXX multifunction device is named as *-pmic,
and these MFDs also supports regulator as a one of its MFD cell which
has the same name, because current name is confusing and we want to
sort it out.

We did discussed different approaches about how the MFD and it
cells need to be named here [1].
Based in the discussion this patch rename MFD regulator name as
*-regulator instead of current *-pmic.

This patch also changes the corresponding entries in the regulator driver
to keep git-bisect happy.

[1]-> https://lkml.org/lkml/2015/10/28/417

Suggested-by: Lee Jones 
Signed-off-by: Alim Akhtar 
Reviewed-by: Krzysztof Kozlowski 
Acked-by: Mark Brown 
Acked-by: Lee Jones 
---
Resending with collected Reviwed-by, Acked-by tags.

 drivers/mfd/sec-core.c  |8 
 drivers/regulator/s2mps11.c |8 
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 7c4e7be17f1e..c9802ba9be72 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -68,7 +68,7 @@ static const struct mfd_cell s5m8767_devs[] = {
 
 static const struct mfd_cell s2mps11_devs[] = {
{
-   .name = "s2mps11-pmic",
+   .name = "s2mps11-regulator",
}, {
.name = "s2mps14-rtc",
}, {
@@ -78,7 +78,7 @@ static const struct mfd_cell s2mps11_devs[] = {
 };
 
 static const struct mfd_cell s2mps13_devs[] = {
-   { .name = "s2mps13-pmic", },
+   { .name = "s2mps13-regulator", },
{ .name = "s2mps13-rtc", },
{
.name = "s2mps13-clk",
@@ -88,7 +88,7 @@ static const struct mfd_cell s2mps13_devs[] = {
 
 static const struct mfd_cell s2mps14_devs[] = {
{
-   .name = "s2mps14-pmic",
+   .name = "s2mps14-regulator",
}, {
.name = "s2mps14-rtc",
}, {
@@ -116,7 +116,7 @@ static const struct mfd_cell s2mpa01_devs[] = {
 
 static const struct mfd_cell s2mpu02_devs[] = {
{
-   .name = "s2mpu02-pmic",
+   .name = "s2mpu02-regulator",
},
 };
 
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index b2f3a28e720c..3242ffc0cb25 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1199,11 +1199,11 @@ out:
 }
 
 static const struct platform_device_id s2mps11_pmic_id[] = {
-   { "s2mps11-pmic", S2MPS11X},
-   { "s2mps13-pmic", S2MPS13X},
-   { "s2mps14-pmic", S2MPS14X},
+   { "s2mps11-regulator", S2MPS11X},
+   { "s2mps13-regulator", S2MPS13X},
+   { "s2mps14-regulator", S2MPS14X},
{ "s2mps15-regulator", S2MPS15X},
-   { "s2mpu02-pmic", S2MPU02},
+   { "s2mpu02-regulator", S2MPU02},
{ },
 };
 MODULE_DEVICE_TABLE(platform, s2mps11_pmic_id);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH v5 2/3] regulator: s2mps11: add support for S2MPS15 regulators

2015-11-20 Thread Alim Akhtar
From: Thomas Abraham 

The S2MPS15 PMIC is similar in functionality to S2MPS11/14 PMIC. It contains
27 LDO and 10 Buck regulators and allows programming these regulators via a
I2C interface. This patch adds initial support for LDO/Buck regulators of
S2MPS15 PMIC.

Signed-off-by: Thomas Abraham 
Signed-off-by: Alim Akhtar 
Reviewed-by: Krzysztof Kozlowski 
---
 drivers/regulator/Kconfig   |4 +-
 drivers/regulator/s2mps11.c |  135 ++-
 2 files changed, 136 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 8df0b0e62976..2805b014ae31 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -588,10 +588,10 @@ config REGULATOR_S2MPA01
 via I2C bus. S2MPA01 has 10 Bucks and 26 LDO outputs.
 
 config REGULATOR_S2MPS11
-   tristate "Samsung S2MPS11/S2MPS13/S2MPS14/S2MPU02 voltage regulator"
+   tristate "Samsung S2MPS11/13/14/15/S2MPU02 voltage regulator"
depends on MFD_SEC_CORE
help
-This driver supports a Samsung S2MPS11/S2MPS13/S2MPS14/S2MPU02 voltage
+This driver supports a Samsung S2MPS11/13/14/15/S2MPU02 voltage
 output regulator via I2C bus. The chip is comprised of high efficient
 Buck converters including Dual-Phase Buck converter, Buck-Boost
 converter, various LDOs.
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 72fc3c32db49..b2f3a28e720c 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /* The highest number of possible regulators for supported devices. */
@@ -661,6 +662,133 @@ static const struct regulator_desc s2mps14_regulators[] = 
{
S2MPS14_BUCK1235_START_SEL),
 };
 
+static struct regulator_ops s2mps15_reg_ldo_ops = {
+   .list_voltage   = regulator_list_voltage_linear_range,
+   .map_voltage= regulator_map_voltage_linear_range,
+   .is_enabled = regulator_is_enabled_regmap,
+   .enable = regulator_enable_regmap,
+   .disable= regulator_disable_regmap,
+   .get_voltage_sel= regulator_get_voltage_sel_regmap,
+   .set_voltage_sel= regulator_set_voltage_sel_regmap,
+};
+
+static struct regulator_ops s2mps15_reg_buck_ops = {
+   .list_voltage   = regulator_list_voltage_linear_range,
+   .map_voltage= regulator_map_voltage_linear_range,
+   .is_enabled = regulator_is_enabled_regmap,
+   .enable = regulator_enable_regmap,
+   .disable= regulator_disable_regmap,
+   .get_voltage_sel= regulator_get_voltage_sel_regmap,
+   .set_voltage_sel= regulator_set_voltage_sel_regmap,
+   .set_voltage_time_sel   = regulator_set_voltage_time_sel,
+};
+
+#define regulator_desc_s2mps15_ldo(num, range) {   \
+   .name   = "LDO"#num,\
+   .id = S2MPS15_LDO##num, \
+   .ops= &s2mps15_reg_ldo_ops, \
+   .type   = REGULATOR_VOLTAGE,\
+   .owner  = THIS_MODULE,  \
+   .linear_ranges  = range,\
+   .n_linear_ranges = ARRAY_SIZE(range),   \
+   .n_voltages = S2MPS15_LDO_N_VOLTAGES,   \
+   .vsel_reg   = S2MPS15_REG_L1CTRL + num - 1, \
+   .vsel_mask  = S2MPS15_LDO_VSEL_MASK,\
+   .enable_reg = S2MPS15_REG_L1CTRL + num - 1, \
+   .enable_mask= S2MPS15_ENABLE_MASK   \
+}
+
+#define regulator_desc_s2mps15_buck(num, range) {  \
+   .name   = "BUCK"#num,   \
+   .id = S2MPS15_BUCK##num,\
+   .ops= &s2mps15_reg_buck_ops,\
+   .type   = REGULATOR_VOLTAGE,\
+   .owner  = THIS_MODULE,  \
+   .linear_ranges  = range,\
+   .n_linear_ranges = ARRAY_SIZE(range),   \
+   .ramp_delay = 12500,\
+   .n_voltages = S2MPS15_BUCK_N_VOLTAGES,  \
+   .vsel_reg   = S2MPS15_REG_B1CTRL2 + ((num - 1) * 2),\
+   .vsel_mask  = S2MPS15_BUCK_VSEL_MASK,   \
+   .enable_reg = S2MPS15_REG_B1CTRL1 + ((num - 1) * 2),\
+   .enable_mask= S2MPS15_ENABLE_MASK   \
+}
+
+/* voltage range for s2mps15 LDO 3, 5, 15, 16, 18, 20, 23 and 27 */
+static const struct regulator_linear_range s2mps15_ldo_voltage_ranges1[] = {
+   REGULATOR_LINEAR_RANGE(100, 0xc, 0x38, 25000),
+};
+
+/* voltage range for s2mps15 

[RESEND PATCH v5 3/3] drivers/rtc/rtc-s5m.c: add support for S2MPS15 RTC

2015-11-20 Thread Alim Akhtar
RTC found in s2mps15 is almost same as one found on s2mps13
with few differences in RTC_UPDATE register fields, like:
1> Bit[4] and Bit[1] are reversed
   - On s2mps13
  WUDR -> bit[4], AUDR -> bit[1]
   - On s2mps15
  WUDR -> bit[1], AUDR -> bit[4]
2> In case of s2mps13, for alarm register, need to set both
   WDUR and ADUR high, whereas for s2mps15 only set AUDR to high.
3> On s2mps15, WUDR, RUDR and AUDR functions should never be used
   at the same time.

This patch add required changes to enable s2mps15 rtc timer.

Cc: Alexandre Belloni 
Signed-off-by: Alim Akhtar 
Reviewed-by: Krzysztof Kozlowski 
Acked-by: Alexandre Belloni 
Acked-by: Lee Jones 
---
 drivers/rtc/rtc-s5m.c   |   37 +
 include/linux/mfd/samsung/rtc.h |2 ++
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
index f2504b4eef34..0d68a85dd429 100644
--- a/drivers/rtc/rtc-s5m.c
+++ b/drivers/rtc/rtc-s5m.c
@@ -188,6 +188,7 @@ static inline int s5m_check_peding_alarm_interrupt(struct 
s5m_rtc_info *info,
ret = regmap_read(info->regmap, S5M_RTC_STATUS, &val);
val &= S5M_ALARM0_STATUS;
break;
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
ret = regmap_read(info->s5m87xx->regmap_pmic, S2MPS14_REG_ST2,
@@ -219,9 +220,22 @@ static inline int s5m8767_rtc_set_time_reg(struct 
s5m_rtc_info *info)
return ret;
}
 
-   data |= info->regs->rtc_udr_mask;
-   if (info->device_type == S5M8763X || info->device_type == S5M8767X)
-   data |= S5M_RTC_TIME_EN_MASK;
+   switch (info->device_type) {
+   case S5M8763X:
+   case S5M8767X:
+   data |= info->regs->rtc_udr_mask | S5M_RTC_TIME_EN_MASK;
+   case S2MPS15X:
+   /* As per UM, for write time register, set WUDR bit to high */
+   data |= S2MPS15_RTC_WUDR_MASK;
+   break;
+   case S2MPS14X:
+   case S2MPS13X:
+   data |= info->regs->rtc_udr_mask;
+   break;
+   default:
+   return -EINVAL;
+   }
+
 
ret = regmap_write(info->regmap, info->regs->rtc_udr_update, data);
if (ret < 0) {
@@ -252,6 +266,11 @@ static inline int s5m8767_rtc_set_alarm_reg(struct 
s5m_rtc_info *info)
case S5M8767X:
data &= ~S5M_RTC_TIME_EN_MASK;
break;
+   case S2MPS15X:
+   /* As per UM, for write alarm, set A_UDR(bit[4]) to high
+* rtc_udr_mask above sets bit[4]
+*/
+   break;
case S2MPS14X:
data |= S2MPS_RTC_RUDR_MASK;
break;
@@ -317,7 +336,8 @@ static int s5m_rtc_read_time(struct device *dev, struct 
rtc_time *tm)
u8 data[info->regs->regs_count];
int ret;
 
-   if (info->device_type == S2MPS14X || info->device_type == S2MPS13X) {
+   if (info->device_type == S2MPS15X || info->device_type == S2MPS14X ||
+   info->device_type == S2MPS13X) {
ret = regmap_update_bits(info->regmap,
info->regs->rtc_udr_update,
S2MPS_RTC_RUDR_MASK, S2MPS_RTC_RUDR_MASK);
@@ -339,6 +359,7 @@ static int s5m_rtc_read_time(struct device *dev, struct 
rtc_time *tm)
break;
 
case S5M8767X:
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
s5m8767_data_to_tm(data, tm, info->rtc_24hr_mode);
@@ -366,6 +387,7 @@ static int s5m_rtc_set_time(struct device *dev, struct 
rtc_time *tm)
s5m8763_tm_to_data(tm, data);
break;
case S5M8767X:
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
ret = s5m8767_tm_to_data(tm, data);
@@ -414,6 +436,7 @@ static int s5m_rtc_read_alarm(struct device *dev, struct 
rtc_wkalrm *alrm)
break;
 
case S5M8767X:
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
s5m8767_data_to_tm(data, &alrm->time, info->rtc_24hr_mode);
@@ -463,6 +486,7 @@ static int s5m_rtc_stop_alarm(struct s5m_rtc_info *info)
break;
 
case S5M8767X:
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
for (i = 0; i < info->regs->regs_count; i++)
@@ -508,6 +532,7 @@ static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
break;
 
case S5M8767X:
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
data[RTC_SEC] |= ALARM_ENABLE_MASK;
@@ -548,6 +573,7 @@ static int s5m_rtc_set_alarm(struct device *dev, struct 
rtc_wkalrm *alrm)
break;
 
case S5M8767X:
+   case S2MPS15X:
case S2MPS14X:
case S2MPS13X:
s5m8767_tm_to_data(&alrm->time, data);
@@ -631,6 +657,7 @@ static int s5m8767_rtc_ini

[RESEND PATCH v5 0/3] mfd: sec: add S2MPS15 PMIC support

2015-11-20 Thread Alim Akhtar
Hi Lee/Mark,

This a resend of series [0] that adds s2mps15 pmic support.
These patches have no changes, just collected some Reviewed-by and Acked-by 
tags.
[0] -> https://lkml.org/lkml/2015/10/30/44

Mark,
Can I have you acked-by for patch# 2/3? so that these can go in via MFD tree.

Alim Akhtar (1):
  drivers/rtc/rtc-s5m.c: add support for S2MPS15 RTC

Thomas Abraham (2):
  mfd: sec: Add support for S2MPS15 PMIC
  regulator: s2mps11: add support for S2MPS15 regulators

 drivers/mfd/sec-core.c  |   31 +++
 drivers/mfd/sec-irq.c   |8 ++
 drivers/regulator/Kconfig   |4 +-
 drivers/regulator/s2mps11.c |  135 +-
 drivers/rtc/rtc-s5m.c   |   37 +++-
 include/linux/mfd/samsung/core.h|1 +
 include/linux/mfd/samsung/rtc.h |2 +
 include/linux/mfd/samsung/s2mps15.h |  158 +++
 8 files changed, 369 insertions(+), 7 deletions(-)
 create mode 100644 include/linux/mfd/samsung/s2mps15.h

-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH v5 1/3] mfd: sec: Add support for S2MPS15 PMIC

2015-11-20 Thread Alim Akhtar
From: Thomas Abraham 

Add support for S2MPS15 PMIC which is similar to S2MPS11 PMIC. The S2MPS15
PMIC supports 27 LDO regulators, 10 buck regulators, RTC, three 32.768KHz
clock outputs and battery charger. This patch adds initial support for
LDO and buck regulators of S2MPS15 device.

Signed-off-by: Thomas Abraham 
Signed-off-by: Alim Akhtar 
[Alim: Added s2mps15_devs like rtc and clk and related changes]
Reviewed-by: Krzysztof Kozlowski 
Acked-by: Lee Jones 
---
 drivers/mfd/sec-core.c  |   31 +++
 drivers/mfd/sec-irq.c   |8 ++
 include/linux/mfd/samsung/core.h|1 +
 include/linux/mfd/samsung/s2mps15.h |  158 +++
 4 files changed, 198 insertions(+)
 create mode 100644 include/linux/mfd/samsung/s2mps15.h

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 989076d6cb83..7c4e7be17f1e 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -96,6 +97,17 @@ static const struct mfd_cell s2mps14_devs[] = {
}
 };
 
+static const struct mfd_cell s2mps15_devs[] = {
+   {
+   .name = "s2mps15-regulator",
+   }, {
+   .name = "s2mps15-rtc",
+   }, {
+   .name = "s2mps13-clk",
+   .of_compatible = "samsung,s2mps13-clk",
+   },
+};
+
 static const struct mfd_cell s2mpa01_devs[] = {
{
.name = "s2mpa01-pmic",
@@ -122,6 +134,9 @@ static const struct of_device_id sec_dt_match[] = {
.compatible = "samsung,s2mps14-pmic",
.data = (void *)S2MPS14X,
}, {
+   .compatible = "samsung,s2mps15-pmic",
+   .data = (void *)S2MPS15X,
+   }, {
.compatible = "samsung,s2mpa01-pmic",
.data = (void *)S2MPA01,
}, {
@@ -223,6 +238,15 @@ static const struct regmap_config s2mps14_regmap_config = {
.cache_type = REGCACHE_FLAT,
 };
 
+static const struct regmap_config s2mps15_regmap_config = {
+   .reg_bits = 8,
+   .val_bits = 8,
+
+   .max_register = S2MPS15_REG_LDODSCH4,
+   .volatile_reg = s2mps11_volatile,
+   .cache_type = REGCACHE_FLAT,
+};
+
 static const struct regmap_config s2mpu02_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
@@ -384,6 +408,9 @@ static int sec_pmic_probe(struct i2c_client *i2c,
case S2MPS14X:
regmap = &s2mps14_regmap_config;
break;
+   case S2MPS15X:
+   regmap = &s2mps15_regmap_config;
+   break;
case S5M8763X:
regmap = &s5m8763_regmap_config;
break;
@@ -442,6 +469,10 @@ static int sec_pmic_probe(struct i2c_client *i2c,
sec_devs = s2mps14_devs;
num_sec_devs = ARRAY_SIZE(s2mps14_devs);
break;
+   case S2MPS15X:
+   sec_devs = s2mps15_devs;
+   num_sec_devs = ARRAY_SIZE(s2mps15_devs);
+   break;
case S2MPU02:
sec_devs = s2mpu02_devs;
num_sec_devs = ARRAY_SIZE(s2mpu02_devs);
diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
index 806fa8dbb22d..d77de431cc50 100644
--- a/drivers/mfd/sec-irq.c
+++ b/drivers/mfd/sec-irq.c
@@ -407,6 +407,11 @@ static const struct regmap_irq_chip s2mps14_irq_chip = {
S2MPS1X_IRQ_CHIP_COMMON_DATA,
 };
 
+static const struct regmap_irq_chip s2mps15_irq_chip = {
+   .name = "s2mps15",
+   S2MPS1X_IRQ_CHIP_COMMON_DATA,
+};
+
 static const struct regmap_irq_chip s2mpu02_irq_chip = {
.name = "s2mpu02",
.irqs = s2mpu02_irqs,
@@ -466,6 +471,9 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
case S2MPS14X:
sec_irq_chip = &s2mps14_irq_chip;
break;
+   case S2MPS15X:
+   sec_irq_chip = &s2mps15_irq_chip;
+   break;
case S2MPU02:
sec_irq_chip = &s2mpu02_irq_chip;
break;
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index a06098639399..6bc4bcd488ac 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -44,6 +44,7 @@ enum sec_device_type {
S2MPS11X,
S2MPS13X,
S2MPS14X,
+   S2MPS15X,
S2MPU02,
 };
 
diff --git a/include/linux/mfd/samsung/s2mps15.h 
b/include/linux/mfd/samsung/s2mps15.h
new file mode 100644
index ..36d35287c3c0
--- /dev/null
+++ b/include/linux/mfd/samsung/s2mps15.h
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *  http://www.samsung.com
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * This program is di

Re: [PATCH v5 0/4] mfd: sec: add S2MPS15 PMIC support

2015-11-20 Thread Lee Jones
On Fri, 20 Nov 2015, Alim Akhtar wrote:
> On 11/20/2015 02:35 PM, Lee Jones wrote:
> >On Thu, 19 Nov 2015, Alim Akhtar wrote:
> >
> >>Hi Lee,
> >>Do I need to resend this series? This series still apply cleanly on
> >>top of v4.4-rc1.
> >>I can see 1/4 is already applied.
> >
> >Yes, rebase and resend please.
> >
> Ok will resend, but I will drop patch #1/4 as this is already applied.

Git should automatically do that when you rebase.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] drm/exynos: only run atomic_check() if crtc is active

2015-11-20 Thread Andrzej Hajda
On 11/17/2015 05:12 PM, Daniel Vetter wrote:

(...)
> 
> Check crtc_state->enable, skip if false. That's the "is this pipeline
> configured" knob. For plane/connector it's state->crtc, but with the same
> role.
> 
> I guess we could check that in the helpers, but we need to be careful to
> still call ->atomic_check for the disabling transition, in case userspace
> is asking for a vblank-synced flip that disables a plane but somehow
> that's not possible. I somewhat prefer to handle that all in drivers
> though.
> -Daniel
> 

Thanks for the explanation, Gustavo will you update your patch?

Regards
Andrzej

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 0/4] mfd: sec: add S2MPS15 PMIC support

2015-11-20 Thread Alim Akhtar

Hi Lee,

On 11/20/2015 02:35 PM, Lee Jones wrote:

On Thu, 19 Nov 2015, Alim Akhtar wrote:


Hi Lee,
Do I need to resend this series? This series still apply cleanly on
top of v4.4-rc1.
I can see 1/4 is already applied.


Yes, rebase and resend please.


Ok will resend, but I will drop patch #1/4 as this is already applied.


On Fri, Oct 30, 2015 at 11:55 AM, Alim Akhtar  wrote:

Samsung's S2MPS15 PMIC is targetted to be used with Samsung's Exynos7 SoC.
The S2MPS15 PMIC is similar in functionality to S2MPS11/14 PMIC. It contains
27 LDO and 10 Buck regulators, RTC, three 32.768 KHz clock outputs and allows
programming these blocks via a I2C interface. This patch series adds initial
support for LDO/Buck regulators of S2MPS15 PMIC.

Changes since v4:
* Dorpped Krzysztof reviewed-by and Lee Acked-by tags from patch 1/4,
   because of the new changes to DT bindings. Seeking a fresh review/ack tags.
* Removed samsung,s2mps15-clk compatible as we can reuse exsisting compatible 
of s2mps13.
* Added acked-by on patch 2/4
* Modified rtc driver as s2mps15 differs from s2mps14/13 etc, addressed 
Krzysztof
   concerns on rtc patch.
   There are some other improvement suggestion from Krzystof for the rtc, I 
feel that can be done
   as a sperate patch later.

Changes since v3:
* Changes regulator driver name from s2mps15-pmic -> s2mps15-regulator as 
disscussed here [2]
* Re-use the exsisting compatible/names for s2mps15 clock block.

Changes since v2:
* Addressed Lee Jones review comments.

Changes since v1:
* Added suggestion from Krzysztof [1].
* Added s2mps15's 32.768 clocks support.
* Added s2mps15's rtc support.

V1 of these patches (with a lesser features) were posted a year back,
since then there is not much progress on this, this is my attempt to
move things forward.

[1]-> https://lkml.org/lkml/2014/10/14/67
[2]-> https://lkml.org/lkml/2015/10/28/417

This series is based on linux-next-20151022.
This is tested on exynos7-espresso board.

Alim Akhtar (1):
   drivers/rtc/rtc-s5m.c: add support for S2MPS15 RTC

Thomas Abraham (3):
   dt-bindings: mfd: s2mps11: add documentation for s2mps15 PMIC
   mfd: sec: Add support for S2MPS15 PMIC
   regulator: s2mps11: add support for S2MPS15 regulators

  Documentation/devicetree/bindings/mfd/s2mps11.txt |   21 ++-
  drivers/mfd/sec-core.c|   31 
  drivers/mfd/sec-irq.c |8 ++
  drivers/regulator/Kconfig |4 +-
  drivers/regulator/s2mps11.c   |  135 +-
  drivers/rtc/rtc-s5m.c |   37 -
  include/linux/mfd/samsung/core.h  |1 +
  include/linux/mfd/samsung/rtc.h   |2 +
  include/linux/mfd/samsung/s2mps15.h   |  158 +
  9 files changed, 383 insertions(+), 14 deletions(-)
  create mode 100644 include/linux/mfd/samsung/s2mps15.h









--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 0/4] mfd: sec: add S2MPS15 PMIC support

2015-11-20 Thread Lee Jones
On Thu, 19 Nov 2015, Alim Akhtar wrote:

> Hi Lee,
> Do I need to resend this series? This series still apply cleanly on
> top of v4.4-rc1.
> I can see 1/4 is already applied.

Yes, rebase and resend please.

> On Fri, Oct 30, 2015 at 11:55 AM, Alim Akhtar  wrote:
> > Samsung's S2MPS15 PMIC is targetted to be used with Samsung's Exynos7 SoC.
> > The S2MPS15 PMIC is similar in functionality to S2MPS11/14 PMIC. It contains
> > 27 LDO and 10 Buck regulators, RTC, three 32.768 KHz clock outputs and 
> > allows
> > programming these blocks via a I2C interface. This patch series adds initial
> > support for LDO/Buck regulators of S2MPS15 PMIC.
> >
> > Changes since v4:
> > * Dorpped Krzysztof reviewed-by and Lee Acked-by tags from patch 1/4,
> >   because of the new changes to DT bindings. Seeking a fresh review/ack 
> > tags.
> > * Removed samsung,s2mps15-clk compatible as we can reuse exsisting 
> > compatible of s2mps13.
> > * Added acked-by on patch 2/4
> > * Modified rtc driver as s2mps15 differs from s2mps14/13 etc, addressed 
> > Krzysztof
> >   concerns on rtc patch.
> >   There are some other improvement suggestion from Krzystof for the rtc, I 
> > feel that can be done
> >   as a sperate patch later.
> >
> > Changes since v3:
> > * Changes regulator driver name from s2mps15-pmic -> s2mps15-regulator as 
> > disscussed here [2]
> > * Re-use the exsisting compatible/names for s2mps15 clock block.
> >
> > Changes since v2:
> > * Addressed Lee Jones review comments.
> >
> > Changes since v1:
> > * Added suggestion from Krzysztof [1].
> > * Added s2mps15's 32.768 clocks support.
> > * Added s2mps15's rtc support.
> >
> > V1 of these patches (with a lesser features) were posted a year back,
> > since then there is not much progress on this, this is my attempt to
> > move things forward.
> >
> > [1]-> https://lkml.org/lkml/2014/10/14/67
> > [2]-> https://lkml.org/lkml/2015/10/28/417
> >
> > This series is based on linux-next-20151022.
> > This is tested on exynos7-espresso board.
> >
> > Alim Akhtar (1):
> >   drivers/rtc/rtc-s5m.c: add support for S2MPS15 RTC
> >
> > Thomas Abraham (3):
> >   dt-bindings: mfd: s2mps11: add documentation for s2mps15 PMIC
> >   mfd: sec: Add support for S2MPS15 PMIC
> >   regulator: s2mps11: add support for S2MPS15 regulators
> >
> >  Documentation/devicetree/bindings/mfd/s2mps11.txt |   21 ++-
> >  drivers/mfd/sec-core.c|   31 
> >  drivers/mfd/sec-irq.c |8 ++
> >  drivers/regulator/Kconfig |4 +-
> >  drivers/regulator/s2mps11.c   |  135 +-
> >  drivers/rtc/rtc-s5m.c |   37 -
> >  include/linux/mfd/samsung/core.h  |1 +
> >  include/linux/mfd/samsung/rtc.h   |2 +
> >  include/linux/mfd/samsung/s2mps15.h   |  158 
> > +
> >  9 files changed, 383 insertions(+), 14 deletions(-)
> >  create mode 100644 include/linux/mfd/samsung/s2mps15.h
> >
> >
> 
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html