[PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode

Sebastian Reichel posted 7 patches 11 months, 2 weeks ago
There is a newer version of this series
[PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Sebastian Reichel 11 months, 2 weeks ago
In order to remove .of_node from the power_supply_config struct,
use .fwnode instead.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/usb/common/usb-conn-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
--- a/drivers/usb/common/usb-conn-gpio.c
+++ b/drivers/usb/common/usb-conn-gpio.c
@@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
 	struct device *dev = info->dev;
 	struct power_supply_desc *desc = &info->desc;
 	struct power_supply_config cfg = {
-		.of_node = dev->of_node,
+		.fwnode = dev_fwnode(dev),
 	};
 
 	desc->name = "usb-charger";

-- 
2.47.2
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by AngeloGioacchino Del Regno 11 months, 2 weeks ago
Il 25/02/25 00:21, Sebastian Reichel ha scritto:
> In order to remove .of_node from the power_supply_config struct,
> use .fwnode instead.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Greg Kroah-Hartman 11 months, 2 weeks ago
On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
> In order to remove .of_node from the power_supply_config struct,
> use .fwnode instead.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  drivers/usb/common/usb-conn-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
> index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
> --- a/drivers/usb/common/usb-conn-gpio.c
> +++ b/drivers/usb/common/usb-conn-gpio.c
> @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
>  	struct device *dev = info->dev;
>  	struct power_supply_desc *desc = &info->desc;
>  	struct power_supply_config cfg = {
> -		.of_node = dev->of_node,
> +		.fwnode = dev_fwnode(dev),
>  	};
>  
>  	desc->name = "usb-charger";
> 
> -- 
> 2.47.2

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Sebastian Reichel 11 months, 1 week ago
Hello Greg,

On Tue, Feb 25, 2025 at 04:32:50AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
> > In order to remove .of_node from the power_supply_config struct,
> > use .fwnode instead.
> > 
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > ---
> >  drivers/usb/common/usb-conn-gpio.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
> > index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
> > --- a/drivers/usb/common/usb-conn-gpio.c
> > +++ b/drivers/usb/common/usb-conn-gpio.c
> > @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
> >  	struct device *dev = info->dev;
> >  	struct power_supply_desc *desc = &info->desc;
> >  	struct power_supply_config cfg = {
> > -		.of_node = dev->of_node,
> > +		.fwnode = dev_fwnode(dev),
> >  	};
> >  
> >  	desc->name = "usb-charger";
> > 
> > -- 
> > 2.47.2
> 
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Please just merge this patch through the USB tree.

There are no dependencies and I will send a new version for the
later patches, but they won't make it to 6.15 as I want enough
time in linux-next for them. This patch is rather simple and
getting it merged now means we avoid immutable branches or
merging through the wrong tree in the 6.16 cycle.

Thanks,

-- Sebastian
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Greg Kroah-Hartman 11 months, 1 week ago
On Sat, Mar 08, 2025 at 02:10:29AM +0100, Sebastian Reichel wrote:
> Hello Greg,
> 
> On Tue, Feb 25, 2025 at 04:32:50AM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
> > > In order to remove .of_node from the power_supply_config struct,
> > > use .fwnode instead.
> > > 
> > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > > ---
> > >  drivers/usb/common/usb-conn-gpio.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
> > > index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
> > > --- a/drivers/usb/common/usb-conn-gpio.c
> > > +++ b/drivers/usb/common/usb-conn-gpio.c
> > > @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
> > >  	struct device *dev = info->dev;
> > >  	struct power_supply_desc *desc = &info->desc;
> > >  	struct power_supply_config cfg = {
> > > -		.of_node = dev->of_node,
> > > +		.fwnode = dev_fwnode(dev),
> > >  	};
> > >  
> > >  	desc->name = "usb-charger";
> > > 
> > > -- 
> > > 2.47.2
> > 
> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Please just merge this patch through the USB tree.
> 
> There are no dependencies and I will send a new version for the
> later patches, but they won't make it to 6.15 as I want enough
> time in linux-next for them. This patch is rather simple and
> getting it merged now means we avoid immutable branches or
> merging through the wrong tree in the 6.16 cycle.

Attempting to merge a single patch out of a series is hard with our
current tools, you know that.  Please resend just the single patch if
you want that applied.

thanks,

greg k-h
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Konrad Dybcio 11 months, 1 week ago
On 8.03.2025 6:57 AM, Greg Kroah-Hartman wrote:
> On Sat, Mar 08, 2025 at 02:10:29AM +0100, Sebastian Reichel wrote:
>> Hello Greg,
>>
>> On Tue, Feb 25, 2025 at 04:32:50AM +0100, Greg Kroah-Hartman wrote:
>>> On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
>>>> In order to remove .of_node from the power_supply_config struct,
>>>> use .fwnode instead.
>>>>
>>>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>>>> ---
>>>>  drivers/usb/common/usb-conn-gpio.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
>>>> index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
>>>> --- a/drivers/usb/common/usb-conn-gpio.c
>>>> +++ b/drivers/usb/common/usb-conn-gpio.c
>>>> @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
>>>>  	struct device *dev = info->dev;
>>>>  	struct power_supply_desc *desc = &info->desc;
>>>>  	struct power_supply_config cfg = {
>>>> -		.of_node = dev->of_node,
>>>> +		.fwnode = dev_fwnode(dev),
>>>>  	};
>>>>  
>>>>  	desc->name = "usb-charger";
>>>>
>>>> -- 
>>>> 2.47.2
>>>
>>> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>
>> Please just merge this patch through the USB tree.
>>
>> There are no dependencies and I will send a new version for the
>> later patches, but they won't make it to 6.15 as I want enough
>> time in linux-next for them. This patch is rather simple and
>> getting it merged now means we avoid immutable branches or
>> merging through the wrong tree in the 6.16 cycle.
> 
> Attempting to merge a single patch out of a series is hard with our
> current tools, you know that.  Please resend just the single patch if
> you want that applied.

b4 shazam <msgid> -P 3

to apply the third patch (such as this one) in a thread

unless you use some other set of tools..

Konrad
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Sebastian Reichel 11 months, 1 week ago
Hi,

On Sat, Mar 08, 2025 at 10:34:45AM +0100, Konrad Dybcio wrote:
> On 8.03.2025 6:57 AM, Greg Kroah-Hartman wrote:
> > On Sat, Mar 08, 2025 at 02:10:29AM +0100, Sebastian Reichel wrote:
> >> On Tue, Feb 25, 2025 at 04:32:50AM +0100, Greg Kroah-Hartman wrote:
> >>> On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
> >>>> In order to remove .of_node from the power_supply_config struct,
> >>>> use .fwnode instead.
> >>>>
> >>>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> >>>> ---
> >>>>  drivers/usb/common/usb-conn-gpio.c | 2 +-
> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
> >>>> index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
> >>>> --- a/drivers/usb/common/usb-conn-gpio.c
> >>>> +++ b/drivers/usb/common/usb-conn-gpio.c
> >>>> @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
> >>>>  	struct device *dev = info->dev;
> >>>>  	struct power_supply_desc *desc = &info->desc;
> >>>>  	struct power_supply_config cfg = {
> >>>> -		.of_node = dev->of_node,
> >>>> +		.fwnode = dev_fwnode(dev),
> >>>>  	};
> >>>>  
> >>>>  	desc->name = "usb-charger";
> >>>>
> >>>> -- 
> >>>> 2.47.2
> >>>
> >>> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>
> >> Please just merge this patch through the USB tree.
> >>
> >> There are no dependencies and I will send a new version for the
> >> later patches, but they won't make it to 6.15 as I want enough
> >> time in linux-next for them. This patch is rather simple and
> >> getting it merged now means we avoid immutable branches or
> >> merging through the wrong tree in the 6.16 cycle.
> > 
> > Attempting to merge a single patch out of a series is hard with our
> > current tools, you know that.

Sorry, I did not know your tooling has issues with that. AFAIK most
maintainers are using b4 nowadays, which makes it really easy. Might
be I am biased because I mostly work on ARM stuff where series often
have patches for the driver and the device tree and thus merging
partial patch series is basically the norm.

> > Please resend just the single patch if you want that applied.
> 
> b4 shazam <msgid> -P 3
> 
> to apply the third patch (such as this one) in a thread
> unless you use some other set of tools..

Exactly.

But I can send this patch separately of course.

Greetings,

-- Sebastian
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Greg Kroah-Hartman 11 months, 1 week ago
On Sat, Mar 08, 2025 at 05:33:05PM +0100, Sebastian Reichel wrote:
> Hi,
> 
> On Sat, Mar 08, 2025 at 10:34:45AM +0100, Konrad Dybcio wrote:
> > On 8.03.2025 6:57 AM, Greg Kroah-Hartman wrote:
> > > On Sat, Mar 08, 2025 at 02:10:29AM +0100, Sebastian Reichel wrote:
> > >> On Tue, Feb 25, 2025 at 04:32:50AM +0100, Greg Kroah-Hartman wrote:
> > >>> On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
> > >>>> In order to remove .of_node from the power_supply_config struct,
> > >>>> use .fwnode instead.
> > >>>>
> > >>>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > >>>> ---
> > >>>>  drivers/usb/common/usb-conn-gpio.c | 2 +-
> > >>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> > >>>>
> > >>>> diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
> > >>>> index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
> > >>>> --- a/drivers/usb/common/usb-conn-gpio.c
> > >>>> +++ b/drivers/usb/common/usb-conn-gpio.c
> > >>>> @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
> > >>>>  	struct device *dev = info->dev;
> > >>>>  	struct power_supply_desc *desc = &info->desc;
> > >>>>  	struct power_supply_config cfg = {
> > >>>> -		.of_node = dev->of_node,
> > >>>> +		.fwnode = dev_fwnode(dev),
> > >>>>  	};
> > >>>>  
> > >>>>  	desc->name = "usb-charger";
> > >>>>
> > >>>> -- 
> > >>>> 2.47.2
> > >>>
> > >>> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >>
> > >> Please just merge this patch through the USB tree.
> > >>
> > >> There are no dependencies and I will send a new version for the
> > >> later patches, but they won't make it to 6.15 as I want enough
> > >> time in linux-next for them. This patch is rather simple and
> > >> getting it merged now means we avoid immutable branches or
> > >> merging through the wrong tree in the 6.16 cycle.
> > > 
> > > Attempting to merge a single patch out of a series is hard with our
> > > current tools, you know that.
> 
> Sorry, I did not know your tooling has issues with that. AFAIK most
> maintainers are using b4 nowadays, which makes it really easy. Might
> be I am biased because I mostly work on ARM stuff where series often
> have patches for the driver and the device tree and thus merging
> partial patch series is basically the norm.

I do use b4, but it wants to suck the whole series down.  If I want to
pick an individual one out, I have to manually cut the message-id out
of the email and type out the command and pick the individual commit
out (or use the -P 3 as was said).

But that's a world away from me just hitting a single key in my email
client to suck down the whole thread and apply it to my tree.

For those of us who have to apply a lot of patches, automation is key.
When sending a patch series that wants to be split across multiple
trees, that makes it harder for everyone.

Anyway, I can take this as is, I've spent more time typing this than it
would have taken me to dig out just the single email.  Give me a few
days to catch up with it...

thanks,

greg k-h
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Konrad Dybcio 11 months, 1 week ago
On 8.03.2025 6:27 PM, Greg Kroah-Hartman wrote:
> On Sat, Mar 08, 2025 at 05:33:05PM +0100, Sebastian Reichel wrote:
>> Hi,
>>
>> On Sat, Mar 08, 2025 at 10:34:45AM +0100, Konrad Dybcio wrote:
>>> On 8.03.2025 6:57 AM, Greg Kroah-Hartman wrote:
>>>> On Sat, Mar 08, 2025 at 02:10:29AM +0100, Sebastian Reichel wrote:
>>>>> On Tue, Feb 25, 2025 at 04:32:50AM +0100, Greg Kroah-Hartman wrote:
>>>>>> On Tue, Feb 25, 2025 at 12:21:36AM +0100, Sebastian Reichel wrote:
>>>>>>> In order to remove .of_node from the power_supply_config struct,
>>>>>>> use .fwnode instead.
>>>>>>>
>>>>>>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>>>>>>> ---
>>>>>>>  drivers/usb/common/usb-conn-gpio.c | 2 +-
>>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
>>>>>>> index aa710b50791b0282be0a6a26cffdd981b794acaa..1e36be2a28fd5ca5e1495b7923e4d3e25d7cedef 100644
>>>>>>> --- a/drivers/usb/common/usb-conn-gpio.c
>>>>>>> +++ b/drivers/usb/common/usb-conn-gpio.c
>>>>>>> @@ -158,7 +158,7 @@ static int usb_conn_psy_register(struct usb_conn_info *info)
>>>>>>>  	struct device *dev = info->dev;
>>>>>>>  	struct power_supply_desc *desc = &info->desc;
>>>>>>>  	struct power_supply_config cfg = {
>>>>>>> -		.of_node = dev->of_node,
>>>>>>> +		.fwnode = dev_fwnode(dev),
>>>>>>>  	};
>>>>>>>  
>>>>>>>  	desc->name = "usb-charger";
>>>>>>>
>>>>>>> -- 
>>>>>>> 2.47.2
>>>>>>
>>>>>> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>>>
>>>>> Please just merge this patch through the USB tree.
>>>>>
>>>>> There are no dependencies and I will send a new version for the
>>>>> later patches, but they won't make it to 6.15 as I want enough
>>>>> time in linux-next for them. This patch is rather simple and
>>>>> getting it merged now means we avoid immutable branches or
>>>>> merging through the wrong tree in the 6.16 cycle.
>>>>
>>>> Attempting to merge a single patch out of a series is hard with our
>>>> current tools, you know that.
>>
>> Sorry, I did not know your tooling has issues with that. AFAIK most
>> maintainers are using b4 nowadays, which makes it really easy. Might
>> be I am biased because I mostly work on ARM stuff where series often
>> have patches for the driver and the device tree and thus merging
>> partial patch series is basically the norm.
> 
> I do use b4, but it wants to suck the whole series down.  If I want to
> pick an individual one out, I have to manually cut the message-id out
> of the email and type out the command and pick the individual commit
> out (or use the -P 3 as was said).
> 
> But that's a world away from me just hitting a single key in my email
> client to suck down the whole thread and apply it to my tree.
> 
> For those of us who have to apply a lot of patches, automation is key.
> When sending a patch series that wants to be split across multiple
> trees, that makes it harder for everyone.
> 
> Anyway, I can take this as is, I've spent more time typing this than it
> would have taken me to dig out just the single email.  Give me a few
> days to catch up with it...

Maybe +Konstantin has a better idea, but

b4 shazam <msgid> --single-message

works too, provided you use the very msgid of the patch (i.e. not a reply
to it or so) and should be easy to add a keybind for

Konrad
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Konstantin Ryabitsev 10 months, 3 weeks ago
On Sat, Mar 08, 2025 at 07:27:28PM +0100, Konrad Dybcio wrote:
> > I do use b4, but it wants to suck the whole series down.  If I want to
> > pick an individual one out, I have to manually cut the message-id out
> > of the email and type out the command and pick the individual commit
> > out (or use the -P 3 as was said).
> > 
> > But that's a world away from me just hitting a single key in my email
> > client to suck down the whole thread and apply it to my tree.

Would it help to have an "interactive cherry-pick mode" where it grabs the
whole thread but before it applies it to your tree, it lets you pick the
subset of the patches you want? So, instead of passing -P 3,4, you have a file
open in your $EDITOR where you can just delete the patches you don't want?

-K
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Greg Kroah-Hartman 10 months ago
On Fri, Mar 21, 2025 at 12:36:53PM -0400, Konstantin Ryabitsev wrote:
> On Sat, Mar 08, 2025 at 07:27:28PM +0100, Konrad Dybcio wrote:
> > > I do use b4, but it wants to suck the whole series down.  If I want to
> > > pick an individual one out, I have to manually cut the message-id out
> > > of the email and type out the command and pick the individual commit
> > > out (or use the -P 3 as was said).
> > > 
> > > But that's a world away from me just hitting a single key in my email
> > > client to suck down the whole thread and apply it to my tree.
> 
> Would it help to have an "interactive cherry-pick mode" where it grabs the
> whole thread but before it applies it to your tree, it lets you pick the
> subset of the patches you want? So, instead of passing -P 3,4, you have a file
> open in your $EDITOR where you can just delete the patches you don't want?

Sure, that would be nice, but don't do it just for me, I can live with
having people resend patches to me :)

thanks,

greg k-h
Re: [PATCH 3/7] usb: common: usb-conn-gpio: switch psy_cfg from of_node to fwnode
Posted by Greg Kroah-Hartman 10 months, 3 weeks ago
On Fri, Mar 21, 2025 at 12:36:53PM -0400, Konstantin Ryabitsev wrote:
> On Sat, Mar 08, 2025 at 07:27:28PM +0100, Konrad Dybcio wrote:
> > > I do use b4, but it wants to suck the whole series down.  If I want to
> > > pick an individual one out, I have to manually cut the message-id out
> > > of the email and type out the command and pick the individual commit
> > > out (or use the -P 3 as was said).
> > > 
> > > But that's a world away from me just hitting a single key in my email
> > > client to suck down the whole thread and apply it to my tree.
> 
> Would it help to have an "interactive cherry-pick mode" where it grabs the
> whole thread but before it applies it to your tree, it lets you pick the
> subset of the patches you want? So, instead of passing -P 3,4, you have a file
> open in your $EDITOR where you can just delete the patches you don't want?

Yes it would!