Re: [rtc-linux] Re: [PATCH v2 3/3] rtc: s5m: Make register configuration per S2MPS device to remove exceptions

From: Krzysztof Kozlowski
Date: Wed Dec 30 2015 - 07:26:17 EST


2015-12-30 19:14 GMT+09:00 Alim Akhtar <alim.akhtar@xxxxxxxxxxx>:
>
> Hi Krzysztof,
>
> On 12/30/2015 10:17 AM, Krzysztof Kozlowski wrote:
>>
>> Before updating time and alarm the driver must set appropriate mask in
>> UDR register. For that purpose the driver uses common register
>> configuration and a lot of exceptions per device in the code. The
>> exceptions are not obvious, for example except the change in the logic
>> sometimes the fields are swapped (WUDR and AUDR between S2MPS14 and
>> S2MPS15). This leads to quite complicated code.
>>
>> Try to make it more obvious by:
>> 1. Documenting the UDR masks for devices and operations.
>> 2. Adding fields in register configuration structure for each operation
>> (read time, write time and alarm).
>> 3. Splitting the configuration per S2MPS13, S2MPS14 and S2MPS15 thus
>> removing exceptions for them.
>>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
>>
> Tested for s2mps15 pmic on exynos7-espresso board. rtc and timer works as expected.
> Fill free to add
> Reviewed-by: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
> Tested-by: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
>

Thank you, I really appreciate this!

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/