Re: [PATCH v4] i2c: designware: Do not require clock when SSCN and FFCN are provided

2016-01-06 Thread Loc Ho
Hi All,

>> The current driver uses input clock source frequency to calculate
>> values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not
>> currently have a good way to provide the frequency information.
>> Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used
>> to directly provide these values. So, the clock information should
>> no longer be required during probing.
>>
>> However, since clk can be invalid, additional checks must be done where
>> we are making use of it.
>>
>> Signed-off-by: Mika Westerberg 
>> Signed-off-by: Suravee Suthikulpanit 
>> Tested-by: Loc Ho 
>> ---
>>
>> Note: This has been tested on AMD Seattle RevB for both DT and ACPI.
>>
>> Changes from V3 (https://lkml.org/lkml/2015/12/22/596):
>> * Add i2c_dw_plat_prepare_clk() per Andy's suggestion
>> * Add tested-by Loc Ho.
>
> The changes from V3 are big enough that I'd appreciate a new Tested-by
> tag.

I had tested this via this mixes of test cases:

a. NO APD driver + this patch ==> HCNT/LCNT as expected
b. with APD driver + this patch ==> HCNT/LCNT as expected
c. with APD driver + this patch + double the frequency APD driver ==>
HCNT/LCNT as expected
d. with APD driver + this patch + double the frequency APD driver +
comment out the ACPI parameter retrieve ==> HCNT/LCNT changed as
expected

Therefore, you can add my - Tested-by: Loc Ho 

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


Re: [PATCH v4] i2c: designware: Do not require clock when SSCN and FFCN are provided

2016-01-06 Thread Suravee Suthikulpanit

Hi,

On 01/06/2016 06:31 PM, Loc Ho wrote:

Hi All,


The current driver uses input clock source frequency to calculate
values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not
currently have a good way to provide the frequency information.
Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used
to directly provide these values. So, the clock information should
no longer be required during probing.

However, since clk can be invalid, additional checks must be done where
we are making use of it.

Signed-off-by: Mika Westerberg 
Signed-off-by: Suravee Suthikulpanit 
Tested-by: Loc Ho 
---

Note: This has been tested on AMD Seattle RevB for both DT and ACPI.

Changes from V3 (https://lkml.org/lkml/2015/12/22/596):
 * Add i2c_dw_plat_prepare_clk() per Andy's suggestion
 * Add tested-by Loc Ho.


The changes from V3 are big enough that I'd appreciate a new Tested-by
tag.


I had tested this via this mixes of test cases:

a. NO APD driver + this patch ==> HCNT/LCNT as expected
b. with APD driver + this patch ==> HCNT/LCNT as expected
c. with APD driver + this patch + double the frequency APD driver ==>
HCNT/LCNT as expected
d. with APD driver + this patch + double the frequency APD driver +
comment out the ACPI parameter retrieve ==> HCNT/LCNT changed as
expected

Therefore, you can add my - Tested-by: Loc Ho 

-Loc



Thanks Loc,

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


Re: [PATCH v4] i2c: designware: Do not require clock when SSCN and FFCN are provided

2016-01-05 Thread Loc Ho
Hi,

>> The current driver uses input clock source frequency to calculate
>> values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not
>> currently have a good way to provide the frequency information.
>> Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used
>> to directly provide these values. So, the clock information should
>> no longer be required during probing.
>>
>> However, since clk can be invalid, additional checks must be done where
>> we are making use of it.
>>
>> Signed-off-by: Mika Westerberg 
>> Signed-off-by: Suravee Suthikulpanit 
>> Tested-by: Loc Ho 
>> ---
>>
>> Note: This has been tested on AMD Seattle RevB for both DT and ACPI.
>>
>> Changes from V3 (https://lkml.org/lkml/2015/12/22/596):
>> * Add i2c_dw_plat_prepare_clk() per Andy's suggestion
>> * Add tested-by Loc Ho.
>
> The changes from V3 are big enough that I'd appreciate a new Tested-by
> tag.
>

Will let you know when I have moment to give this a try on X-Gene.

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


Re: [PATCH v4] i2c: designware: Do not require clock when SSCN and FFCN are provided

2016-01-04 Thread Wolfram Sang
On Mon, Jan 04, 2016 at 09:17:35AM -0600, Suravee Suthikulpanit wrote:
> The current driver uses input clock source frequency to calculate
> values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not
> currently have a good way to provide the frequency information.
> Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used
> to directly provide these values. So, the clock information should
> no longer be required during probing.
> 
> However, since clk can be invalid, additional checks must be done where
> we are making use of it.
> 
> Signed-off-by: Mika Westerberg 
> Signed-off-by: Suravee Suthikulpanit 
> Tested-by: Loc Ho  
> ---
> 
> Note: This has been tested on AMD Seattle RevB for both DT and ACPI.
> 
> Changes from V3 (https://lkml.org/lkml/2015/12/22/596):
> * Add i2c_dw_plat_prepare_clk() per Andy's suggestion
> * Add tested-by Loc Ho.

The changes from V3 are big enough that I'd appreciate a new Tested-by
tag.



signature.asc
Description: Digital signature