lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 3/5] reset: stm32: use the reset-simple driver
From
Date
Hi,

On 16/08/17 13:52, Eugeniy Paltsev wrote:
> Hi Philipp,
>
> On Wed, 2017-08-16 at 11:46 +0200, Philipp Zabel wrote:
>> The reset-simple driver can be used without changes.
>>
>> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
>> [snip]
>>
>> --- a/drivers/reset/reset-simple.c
>> +++ b/drivers/reset/reset-simple.c
>> @@ -120,6 +120,7 @@ static const struct reset_simple_devdata
>> reset_simple_active_low = {
>>
>> static const struct of_device_id reset_simple_dt_ids[] = {
>> { .compatible = "altr,rst-mgr", .data =
>> &reset_simple_socfpga },
>> + { .compatible = "st,stm32-rcc", },
>> { .compatible = "allwinner,sun6i-a31-clock-reset",
>> .data = &reset_simple_active_low },
>> { /* sentinel */ },
>
> What about adding generic compatible strings for future use?

Exactly ;-) (see my previous email)
But we still need the pre-existing strings in here, of course.

> I mean next:
>
> --------------------->8---------------------
>
> static const struct of_device_id reset_simple_dt_ids[] = {
> { .compatible = "reset-simple-active-low",
> .data = &reset_simple_active_low },
> { .compatible = "reset-simple-active-high",
> .data = &reset_simple_active_high },

Either that or maybe even better define a "simple-reset" string and add
standard properties like "active-low".

Cheers,
Andre.

> /* ... */
> { /* sentinel */ },
> };
>
> static const struct reset_simple_devdata reset_simple_active_high = {
> .active_low = false,
> };
>
> static const struct reset_simple_devdata reset_simple_active_low = {
> .active_low = true,
> };
>
> --------------------->8---------------------
>

\
 
 \ /
  Last update: 2017-08-16 15:04    [W:0.099 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site