lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 6 Jul 2018 15:52:05 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.co.uk>
To:     Evgeniy Polyakov <zbr@...emap.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Daniel Mack <daniel@...que.org>, robh+dt@...nel.org,
        mark.rutland@....com, szabolcs.gyurko@....hu,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org, robert.jarzmik@...e.fr
Subject: Re: [PATCH v4 3/5] w1: core: match sub-nodes of bus masters in
 devicetree

Hi Greg & Evgeniy,

I suggest, that I take this patch and the DT bindings together
with the power-supply changes, once the bindings have been
reviewed by Rob (Herring). I will prepare an immutable branch,
that can be pulled into w1 as needed. Are you fine with this?

-- Sebastian

On Fri, Jul 06, 2018 at 07:35:50AM +0200, Daniel Mack wrote:
> Once a new slave device is detected, match it against all sub-nodes of the
> master bus controller. If a match is found, set the slave device's of_node
> pointer.
> 
> Signed-off-by: Daniel Mack <daniel@...que.org>
> ---
>  drivers/w1/w1.c    | 3 +++
>  include/linux/w1.h | 2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
> index caef0e0fd817..890c038c25f8 100644
> --- a/drivers/w1/w1.c
> +++ b/drivers/w1/w1.c
> @@ -26,6 +26,7 @@
>  #include <linux/kthread.h>
>  #include <linux/freezer.h>
>  #include <linux/hwmon.h>
> +#include <linux/of.h>
>  
>  #include <linux/atomic.h>
>  
> @@ -686,6 +687,8 @@ static int __w1_attach_slave_device(struct w1_slave *sl)
>  	sl->dev.bus = &w1_bus_type;
>  	sl->dev.release = &w1_slave_release;
>  	sl->dev.groups = w1_slave_groups;
> +	sl->dev.of_node = of_find_matching_node(sl->master->dev.of_node,
> +						sl->family->of_match_table);
>  
>  	dev_set_name(&sl->dev, "%02x-%012llx",
>  		 (unsigned int) sl->reg_num.family,
> diff --git a/include/linux/w1.h b/include/linux/w1.h
> index 694101f744c7..3111585c371f 100644
> --- a/include/linux/w1.h
> +++ b/include/linux/w1.h
> @@ -274,6 +274,8 @@ struct w1_family {
>  
>  	struct w1_family_ops	*fops;
>  
> +	const struct of_device_id *of_match_table;
> +
>  	atomic_t		refcnt;
>  };
>  
> -- 
> 2.17.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ