2023-10-17 09:39:13

by Kris Chaplin

[permalink] [raw]
Subject: w1: coding-style - naming for master/slave for new driver and dt binding

Hello Krzystof,

During review of my dt-bindings patches for a new w1 driver
(https://lkml.org/lkml/2023/10/13/959), there was mention that the use
of 'master' is not considered great terminology nowadays.  Are there any
plans to replace the usage of master/slave in w1 as mentioned in
Documentation/process/coding-style.rst ?  As we are in the final stages
of our W1 soft IP development, I believe there is a small window in
which we can align on our new IP name if appropriate, prior to my next
round of patch submission for amd,axi-w1-master and get the binding to
match.

If there is a preferred choice from the example alternatives in the
docs, I can look to see if we can align the naming and update my next
patch round accordingly - however if the guidance is to keep to the
specification-defined terminology (pre-2020) then we can do so.

regards
Kris


2023-10-17 13:14:34

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: w1: coding-style - naming for master/slave for new driver and dt binding

On Tue, Oct 17, 2023 at 10:38:49AM +0100, Kris Chaplin wrote:
> Hello Krzystof,
>
> During review of my dt-bindings patches for a new w1 driver
> (https://lkml.org/lkml/2023/10/13/959), there was mention that the use of
> 'master' is not considered great terminology nowadays.? Are there any plans
> to replace the usage of master/slave in w1 as mentioned in
> Documentation/process/coding-style.rst ?? As we are in the final stages of
> our W1 soft IP development, I believe there is a small window in which we
> can align on our new IP name if appropriate, prior to my next round of patch
> submission for amd,axi-w1-master and get the binding to match.

For new stuff, please use new terminology, but there's no need to change
existing code if you aren't going to be touching it.

thanks,

greg k-h

2023-10-17 13:57:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: w1: coding-style - naming for master/slave for new driver and dt binding

On 17/10/2023 11:38, Kris Chaplin wrote:
> Hello Krzystof,
>
> During review of my dt-bindings patches for a new w1 driver
> (https://lkml.org/lkml/2023/10/13/959), there was mention that the use
> of 'master' is not considered great terminology nowadays.  Are there any
> plans to replace the usage of master/slave in w1 as mentioned in
> Documentation/process/coding-style.rst ?

I am not aware of any plans to rework/rename existing code in w1.

>  As we are in the final stages
> of our W1 soft IP development, I believe there is a small window in
> which we can align on our new IP name if appropriate, prior to my next
> round of patch submission for amd,axi-w1-master and get the binding to
> match.

Naming of your products is little concern to us. How you name it, it is
your call.

The naming used in Linux matters.

>
> If there is a preferred choice from the example alternatives in the
> docs, I can look to see if we can align the naming and update my next
> patch round accordingly - however if the guidance is to keep to the
> specification-defined terminology (pre-2020) then we can do so.

The first diagram on
https://www.analog.com/en/technical-articles/guide-to-1wire-communication.html
suggests to use master->host and slave->device naming.

https://www.analog.com/en/product-category/1wire-devices.html also uses
"host" term.

Best regards,
Krzysztof