Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299336

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

From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject Re: [rtc-linux] Re: [PATCH v2 3/3] rtc: s5m: Make register configuration per S2MPS device to remove exceptions
Date 2015-12-30 13:30 +0100
Message-ID <qLo38-6zJ-3@gated-at.bofh.it> (permalink)
References <qLgRX-1Iu-7@gated-at.bofh.it> <qLgRX-1Iu-9@gated-at.bofh.it> <qLm1j-5j3-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2015-12-30 19:14 GMT+09:00 Alim Akhtar <alim.akhtar@samsung.com>:
>
> 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@samsung.com>
>>
> Tested for s2mps15 pmic on exynos7-espresso board. rtc and timer works as expected.
> Fill free to add
> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
>

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from  fields Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-30 05:50 +0100
  [PATCH v2 3/3] rtc: s5m: Make register configuration per S2MPS device  to remove exceptions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-30 05:50 +0100
    Re: [PATCH v2 3/3] rtc: s5m: Make register configuration per S2MPS  device to remove exceptions Alim Akhtar <alim.akhtar@samsung.com> - 2015-12-30 11:20 +0100
      Re: [rtc-linux] Re: [PATCH v2 3/3] rtc: s5m: Make register  configuration per S2MPS device to remove exceptions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-30 13:30 +0100
  [PATCH v2 2/3] rtc: s5m: Add separate field for storing auto-cleared  mask in register config Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-30 05:50 +0100
    Re: [PATCH v2 2/3] rtc: s5m: Add separate field for storing  auto-cleared mask in register config Alim Akhtar <alim.akhtar@samsung.com> - 2015-12-30 11:10 +0100
  Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix  from fields Alim Akhtar <alim.akhtar@samsung.com> - 2015-12-30 11:10 +0100

csiph-web