Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1805096imm; Fri, 6 Jul 2018 06:53:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc8NC0fC8rjbyI+jJ49OfMwo6LiOFYZ0CTkD0YcEyewnhnd4sKkhWYiR7qAsCgKbEnVfcHA X-Received: by 2002:a17:902:74c2:: with SMTP id f2-v6mr10319412plt.260.1530885231250; Fri, 06 Jul 2018 06:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530885231; cv=none; d=google.com; s=arc-20160816; b=uWbEi+5SwrsabhTt4xqldiLoOAJHhgeMAZ5mCVWWw7lAUseJ44Pyw+i7FnApNukuKw QhmIaFB1owXWv26SQKomNTwqnM/6DOwGNIoJq9zy4uslrA6AO2/RMmPdtc0TycJ79CtH 7XDooMY7sACQMnu7tcueotgoCP65F/izmt7HKtNm3VWXN/UxfQH497w1WEI02ffrYXNy 3K/ADGhs7rl9MxjgY8VkwmSPbINxiVTalVs2+tfxSmeQoApodAP6lH/f207TRZs6lf0O sCCob7/YwVkwb5/J+eXKxVVxo5a/1i+jwUi/Oir+9JGPu1bZN5TtGAnCI5PdLQ5xsizT qcbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=M8OL7uYvCZCClfRk9rBYXtlxxynIyYGx+ekUVJwpWGI=; b=QKj9rXzfygIp1dBKgmGYkdyJ5xF9ZUGQjRkU8ic8AaP4Fj/F3U67qRo2O8enRlPh8X cvR1lVTYtXdazogn6slz9j+V4BzrG4kSR/2P+4rOjyPRAWPrIgPGC8Njjig+I1/mKcsw wLLE/n+D9t2xHVTb9zX3mPa2csN1aEOgu8ft7iI5U/QYMVmXgERrFUXtLzeqRT8uGLqD RZVgEfJeX2PwQQF+AOYqSgTw+pgleTSqcWn6WJ5wA4Fgm7joE+uclENSSVcmYNM8uZv3 e8BuaY/FanxudsHko2QOAWgzTfz6epV46dOSEjoSf+1C/054s0NSRBxaMq0s9z3q+ovA wtRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p83-v6si8760491pfa.180.2018.07.06.06.53.35; Fri, 06 Jul 2018 06:53:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754001AbeGFNwL (ORCPT + 99 others); Fri, 6 Jul 2018 09:52:11 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48866 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075AbeGFNwJ (ORCPT ); Fri, 6 Jul 2018 09:52:09 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 737AC26096C Date: Fri, 6 Jul 2018 15:52:05 +0200 From: Sebastian Reichel To: Evgeniy Polyakov , Greg Kroah-Hartman Cc: Daniel Mack , robh+dt@kernel.org, mark.rutland@arm.com, szabolcs.gyurko@tlt.hu, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, robert.jarzmik@free.fr Subject: Re: [PATCH v4 3/5] w1: core: match sub-nodes of bus masters in devicetree Message-ID: <20180706135205.dkcrhbmaak2iteyw@earth.universe> References: <20180706053552.11438-1-daniel@zonque.org> <20180706053552.11438-4-daniel@zonque.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jr34mizs65dijvag" Content-Disposition: inline In-Reply-To: <20180706053552.11438-4-daniel@zonque.org> User-Agent: NeoMutt/20180512 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jr34mizs65dijvag Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Daniel Mack > --- > drivers/w1/w1.c | 3 +++ > include/linux/w1.h | 2 ++ > 2 files changed, 5 insertions(+) >=20 > 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 > #include > #include > +#include > =20 > #include > =20 > @@ -686,6 +687,8 @@ static int __w1_attach_slave_device(struct w1_slave *= sl) > sl->dev.bus =3D &w1_bus_type; > sl->dev.release =3D &w1_slave_release; > sl->dev.groups =3D w1_slave_groups; > + sl->dev.of_node =3D of_find_matching_node(sl->master->dev.of_node, > + sl->family->of_match_table); > =20 > 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 { > =20 > struct w1_family_ops *fops; > =20 > + const struct of_device_id *of_match_table; > + > atomic_t refcnt; > }; > =20 > --=20 > 2.17.1 >=20 --jr34mizs65dijvag Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAls/dAUACgkQ2O7X88g7 +po/Gw/+Jzss71qx02l0mYdd3zWj50h8YdC+iQ6kVQJEPqFGbEeh0wArZw1dZ84k HNRlFpwHstfMyIkp1+BF1Snv6sYg5MuAkFhQCLrQac7oFiYGLBGdLx8LBYhbwgW5 qZhlPftWHbe9lkWZhw//V3hajzYFJS/9PBuTlJh50WsFU3wfgdMUwmezk6idKVHX SJw7JdK2j5Y/p/IjhJwLWsd2pkZ3/mFPW3Ut2/XSeV4gkqWoEzr5XqNu8KjXBMoA P1Oipc8tikjqYZ2TyRln/xwBOpOe3fXmqFvXkLc6AjFdtS61Exw68EmKd2jr+QuH qHUA1rjnNmmMZ3BENMvMgPjQRyuR/flRMR6bN0U9BW08s2NwF0UowWyCRUX4Gxcg TYsdQn4Rftc8yDtzWw0EgdS4Hkr+yVzZzob0lstMdaeiAQ3i0krs+I4Btq/g5uXk OcUP6MJ50q0KpCTbFXF7ISIdmyoJdx4y1AF4jDqj9stfUwqpPzRq0duotaS9YAPE 3zt5mSgJpZYjThmdiYK5OBC1OVBISLrsUL1UCKyU768lAnqmXob1hhUSodQlpSPa 5J+j7JhVIEMqjP1VEArw8aG7CM8VXKsHyK3bkkmiQc4Alu2YANiZuKDHy1hdnA/J XcXIyFhCPyh6VrrVndjCn2DwG3All1Kexz0WzZ81PKi0/lVuq9Q= =/Cs2 -----END PGP SIGNATURE----- --jr34mizs65dijvag--