u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request
@ 2021-12-01 19:44 Sean Anderson
  2021-12-01 19:44 ` [PATCH 2/2] clk: cdce9xxx: Add maintainer Sean Anderson
  2021-12-01 20:08 ` [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Tom Rini
  0 siblings, 2 replies; 7+ messages in thread
From: Sean Anderson @ 2021-12-01 19:44 UTC (permalink / raw)
  To: u-boot; +Cc: Lukasz Majewski, Tero Kristo, Tom Rini, Sean Anderson

This xlate function just performs some checking. We can do this in
request() instead and use the default xlate.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/clk/clk-cdce9xx.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
index 6634b7b799..c15e9f210e 100644
--- a/drivers/clk/clk-cdce9xx.c
+++ b/drivers/clk/clk-cdce9xx.c
@@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, u8 addr, u8 val)
 	return ret;
 }
 
-static int cdce9xx_clk_of_xlate(struct clk *clk,
-				struct ofnode_phandle_args *args)
+static int cdce9xx_clk_of_request(struct clk *clk)
 {
 	struct cdce9xx_clk_data *data = dev_get_priv(clk->dev);
 
-	if (args->args_count != 1)
+	if (clk->id > data->chip->num_outputs)
 		return -EINVAL;
 
-	if (args->args[0] > data->chip->num_outputs)
-		return -EINVAL;
-
-	clk->id = args->args[0];
-
 	return 0;
 }
 
@@ -241,7 +235,7 @@ static const struct udevice_id cdce9xx_clk_of_match[] = {
 };
 
 static const struct clk_ops cdce9xx_clk_ops = {
-	.of_xlate = cdce9xx_clk_of_xlate,
+	.request = cdce9xx_clk_request,
 	.get_rate = cdce9xx_clk_get_rate,
 	.set_rate = cdce9xx_clk_set_rate,
 };
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] clk: cdce9xxx: Add maintainer
  2021-12-01 19:44 [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Sean Anderson
@ 2021-12-01 19:44 ` Sean Anderson
  2021-12-01 19:45   ` Sean Anderson
  2021-12-01 20:08 ` [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Tom Rini
  1 sibling, 1 reply; 7+ messages in thread
From: Sean Anderson @ 2021-12-01 19:44 UTC (permalink / raw)
  To: u-boot; +Cc: Lukasz Majewski, Tero Kristo, Tom Rini, Sean Anderson

This adds an entry in MAINTAINERS for the cdce9xx driver, since it was not
added when the driver was submitted.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
Tero, if you don't want to maintain this I'll resubmit this patch with the
orphaned status. Alternatively, perhaps Tom wants to maintain this driver since
it is used exclusively by boards he maintains.

 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6db5354322..2946a96c04 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -658,6 +658,12 @@ M:	Simon Glass <sjg@chromium.org>
 S:	Maintained
 F:	tools/buildman/
 
+CDCE9XX CLOCK:
+M:	Tero Kristo <t-kristo@ti.com>
+S:	Maintained
+F:	doc/device-tree-bindings/clock/ti,cdce9xx.txt
+F:	drivers/clk/clk-cdce9xx.c
+
 CFI FLASH
 M:	Stefan Roese <sr@denx.de>
 S:	Maintained
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] clk: cdce9xxx: Add maintainer
  2021-12-01 19:44 ` [PATCH 2/2] clk: cdce9xxx: Add maintainer Sean Anderson
@ 2021-12-01 19:45   ` Sean Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Anderson @ 2021-12-01 19:45 UTC (permalink / raw)
  To: u-boot; +Cc: Lukasz Majewski, Tero Kristo, Tom Rini

On 12/1/21 2:44 PM, Sean Anderson wrote:
> This adds an entry in MAINTAINERS for the cdce9xx driver, since it was not
> added when the driver was submitted.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> Tero, if you don't want to maintain this I'll resubmit this patch with the
> orphaned status. Alternatively, perhaps Tom wants to maintain this driver since
> it is used exclusively by boards he maintains.

Well, it looks like Tero's email bounced, so it will have to be either Tom or orphaned.

--Sean

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request
  2021-12-01 19:44 [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Sean Anderson
  2021-12-01 19:44 ` [PATCH 2/2] clk: cdce9xxx: Add maintainer Sean Anderson
@ 2021-12-01 20:08 ` Tom Rini
  2021-12-01 20:10   ` Sean Anderson
  1 sibling, 1 reply; 7+ messages in thread
From: Tom Rini @ 2021-12-01 20:08 UTC (permalink / raw)
  To: Sean Anderson, Tero Kristo; +Cc: u-boot, Lukasz Majewski

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

On Wed, Dec 01, 2021 at 02:44:02PM -0500, Sean Anderson wrote:

> This xlate function just performs some checking. We can do this in
> request() instead and use the default xlate.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> 
>  drivers/clk/clk-cdce9xx.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
> index 6634b7b799..c15e9f210e 100644
> --- a/drivers/clk/clk-cdce9xx.c
> +++ b/drivers/clk/clk-cdce9xx.c
> @@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, u8 addr, u8 val)
>  	return ret;
>  }
>  
> -static int cdce9xx_clk_of_xlate(struct clk *clk,
> -				struct ofnode_phandle_args *args)
> +static int cdce9xx_clk_of_request(struct clk *clk)
>  {
>  	struct cdce9xx_clk_data *data = dev_get_priv(clk->dev);
>  
> -	if (args->args_count != 1)
> +	if (clk->id > data->chip->num_outputs)
>  		return -EINVAL;
>  
> -	if (args->args[0] > data->chip->num_outputs)
> -		return -EINVAL;
> -
> -	clk->id = args->args[0];
> -
>  	return 0;
>  }
>  
> @@ -241,7 +235,7 @@ static const struct udevice_id cdce9xx_clk_of_match[] = {
>  };
>  
>  static const struct clk_ops cdce9xx_clk_ops = {
> -	.of_xlate = cdce9xx_clk_of_xlate,
> +	.request = cdce9xx_clk_request,
>  	.get_rate = cdce9xx_clk_get_rate,
>  	.set_rate = cdce9xx_clk_set_rate,
>  };

Adding Tero...

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request
  2021-12-01 20:08 ` [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Tom Rini
@ 2021-12-01 20:10   ` Sean Anderson
  2021-12-03  8:18     ` Tero Kristo
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Anderson @ 2021-12-01 20:10 UTC (permalink / raw)
  To: Tom Rini, Tero Kristo; +Cc: u-boot, Lukasz Majewski

On 12/1/21 3:08 PM, Tom Rini wrote:
> On Wed, Dec 01, 2021 at 02:44:02PM -0500, Sean Anderson wrote:
> 
>> This xlate function just performs some checking. We can do this in
>> request() instead and use the default xlate.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>>
>>   drivers/clk/clk-cdce9xx.c | 12 +++---------
>>   1 file changed, 3 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
>> index 6634b7b799..c15e9f210e 100644
>> --- a/drivers/clk/clk-cdce9xx.c
>> +++ b/drivers/clk/clk-cdce9xx.c
>> @@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, u8 addr, u8 val)
>>   	return ret;
>>   }
>>   
>> -static int cdce9xx_clk_of_xlate(struct clk *clk,
>> -				struct ofnode_phandle_args *args)
>> +static int cdce9xx_clk_of_request(struct clk *clk)
>>   {
>>   	struct cdce9xx_clk_data *data = dev_get_priv(clk->dev);
>>   
>> -	if (args->args_count != 1)
>> +	if (clk->id > data->chip->num_outputs)
>>   		return -EINVAL;
>>   
>> -	if (args->args[0] > data->chip->num_outputs)
>> -		return -EINVAL;
>> -
>> -	clk->id = args->args[0];
>> -
>>   	return 0;
>>   }
>>   
>> @@ -241,7 +235,7 @@ static const struct udevice_id cdce9xx_clk_of_match[] = {
>>   };
>>   
>>   static const struct clk_ops cdce9xx_clk_ops = {
>> -	.of_xlate = cdce9xx_clk_of_xlate,
>> +	.request = cdce9xx_clk_request,
>>   	.get_rate = cdce9xx_clk_get_rate,
>>   	.set_rate = cdce9xx_clk_set_rate,
>>   };
> 
> Adding Tero...
> 

Thanks. Perhaps .mailmap should be updated?

--Sean

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request
  2021-12-01 20:10   ` Sean Anderson
@ 2021-12-03  8:18     ` Tero Kristo
  2021-12-15 16:47       ` Sean Anderson
  0 siblings, 1 reply; 7+ messages in thread
From: Tero Kristo @ 2021-12-03  8:18 UTC (permalink / raw)
  To: Sean Anderson, Tom Rini; +Cc: u-boot, Lukasz Majewski

On 01/12/2021 22:10, Sean Anderson wrote:
> On 12/1/21 3:08 PM, Tom Rini wrote:
>> On Wed, Dec 01, 2021 at 02:44:02PM -0500, Sean Anderson wrote:
>>
>>> This xlate function just performs some checking. We can do this in
>>> request() instead and use the default xlate.
>>>
>>> Signed-off-by: Sean Anderson <seanga2@gmail.com>

Hi Sean,

Did you compile this? I see...

>>> ---
>>>
>>>   drivers/clk/clk-cdce9xx.c | 12 +++---------
>>>   1 file changed, 3 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
>>> index 6634b7b799..c15e9f210e 100644
>>> --- a/drivers/clk/clk-cdce9xx.c
>>> +++ b/drivers/clk/clk-cdce9xx.c
>>> @@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, 
>>> u8 addr, u8 val)
>>>       return ret;
>>>   }
>>> -static int cdce9xx_clk_of_xlate(struct clk *clk,
>>> -                struct ofnode_phandle_args *args)
>>> +static int cdce9xx_clk_of_request(struct clk *clk)

cdce9xx_clk_of_request here...

>>>   {
>>>       struct cdce9xx_clk_data *data = dev_get_priv(clk->dev);
>>> -    if (args->args_count != 1)
>>> +    if (clk->id > data->chip->num_outputs)
>>>           return -EINVAL;
>>> -    if (args->args[0] > data->chip->num_outputs)
>>> -        return -EINVAL;
>>> -
>>> -    clk->id = args->args[0];
>>> -
>>>       return 0;
>>>   }
>>> @@ -241,7 +235,7 @@ static const struct udevice_id 
>>> cdce9xx_clk_of_match[] = {
>>>   };
>>>   static const struct clk_ops cdce9xx_clk_ops = {
>>> -    .of_xlate = cdce9xx_clk_of_xlate,
>>> +    .request = cdce9xx_clk_request,

but cdce9xx_clk_request here.

Other than that, looks fine to me.

-Tero

>>>       .get_rate = cdce9xx_clk_get_rate,
>>>       .set_rate = cdce9xx_clk_set_rate,
>>>   };
>>
>> Adding Tero...
>>
> 
> Thanks. Perhaps .mailmap should be updated?
> 
> --Sean


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request
  2021-12-03  8:18     ` Tero Kristo
@ 2021-12-15 16:47       ` Sean Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Anderson @ 2021-12-15 16:47 UTC (permalink / raw)
  To: Tero Kristo, Tom Rini; +Cc: u-boot, Lukasz Majewski

On 12/3/21 3:18 AM, Tero Kristo wrote:
> On 01/12/2021 22:10, Sean Anderson wrote:
>> On 12/1/21 3:08 PM, Tom Rini wrote:
>>> On Wed, Dec 01, 2021 at 02:44:02PM -0500, Sean Anderson wrote:
>>>
>>>> This xlate function just performs some checking. We can do this in
>>>> request() instead and use the default xlate.
>>>>
>>>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> 
> Hi Sean,
> 
> Did you compile this? I see...
> 
>>>> ---
>>>>
>>>>   drivers/clk/clk-cdce9xx.c | 12 +++---------
>>>>   1 file changed, 3 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
>>>> index 6634b7b799..c15e9f210e 100644
>>>> --- a/drivers/clk/clk-cdce9xx.c
>>>> +++ b/drivers/clk/clk-cdce9xx.c
>>>> @@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, u8 addr, u8 val)
>>>>       return ret;
>>>>   }
>>>> -static int cdce9xx_clk_of_xlate(struct clk *clk,
>>>> -                struct ofnode_phandle_args *args)
>>>> +static int cdce9xx_clk_of_request(struct clk *clk)
> 
> cdce9xx_clk_of_request here...
> 
>>>>   {
>>>>       struct cdce9xx_clk_data *data = dev_get_priv(clk->dev);
>>>> -    if (args->args_count != 1)
>>>> +    if (clk->id > data->chip->num_outputs)
>>>>           return -EINVAL;
>>>> -    if (args->args[0] > data->chip->num_outputs)
>>>> -        return -EINVAL;
>>>> -
>>>> -    clk->id = args->args[0];
>>>> -
>>>>       return 0;
>>>>   }
>>>> @@ -241,7 +235,7 @@ static const struct udevice_id cdce9xx_clk_of_match[] = {
>>>>   };
>>>>   static const struct clk_ops cdce9xx_clk_ops = {
>>>> -    .of_xlate = cdce9xx_clk_of_xlate,
>>>> +    .request = cdce9xx_clk_request,
> 
> but cdce9xx_clk_request here.
> 
> Other than that, looks fine to me.

Oops. Thanks for catching that.

Resubmitted after compile-testing :)

--Sean


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-12-15 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 19:44 [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Sean Anderson
2021-12-01 19:44 ` [PATCH 2/2] clk: cdce9xxx: Add maintainer Sean Anderson
2021-12-01 19:45   ` Sean Anderson
2021-12-01 20:08 ` [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Tom Rini
2021-12-01 20:10   ` Sean Anderson
2021-12-03  8:18     ` Tero Kristo
2021-12-15 16:47       ` Sean Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).