From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754542AbdDNUcY (ORCPT ); Fri, 14 Apr 2017 16:32:24 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:34023 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbdDNUcV (ORCPT ); Fri, 14 Apr 2017 16:32:21 -0400 Date: Fri, 14 Apr 2017 22:32:16 +0200 From: Pavel Machek To: Philipp Zabel Cc: Sakari Ailus , Steve Longerbeam , robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com, linux@armlinux.org.uk, mchehab@kernel.org, hverkuil@xs4all.nl, nick@shmanahar.org, markus.heiser@darmarIT.de, laurent.pinchart+renesas@ideasonboard.com, bparrot@ti.com, geert@linux-m68k.org, arnd@arndb.de, sudipm.mukherjee@gmail.com, minghsiu.tsai@mediatek.com, tiffany.lin@mediatek.com, jean-christophe.trotin@st.com, horms+renesas@verge.net.au, niklas.soderlund+renesas@ragnatech.se, robert.jarzmik@free.fr, songjun.wu@microchip.com, andrew-ct.chen@mediatek.com, gregkh@linuxfoundation.org, shuah@kernel.org, sakari.ailus@linux.intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Sascha Hauer , Steve Longerbeam Subject: Re: [PATCH v6 17/39] platform: add video-multiplexer subdevice driver Message-ID: <20170414203216.GA10920@amd> References: <1490661656-10318-1-git-send-email-steve_longerbeam@mentor.com> <1490661656-10318-18-git-send-email-steve_longerbeam@mentor.com> <20170404124732.GD3288@valkosipuli.retiisi.org.uk> <1492091578.2383.39.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <1492091578.2383.39.camel@pengutronix.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > The MUX framework is already in linux-next. Could you use that instead = of > > adding new driver + bindings that are not compliant with the MUX framew= ork? > > I don't think it'd be much of a change in terms of code, using the MUX > > framework appears quite simple. >=20 > It is not quite clear to me how to design the DT bindings for this. Just > splitting the video-multiplexer driver from the mux-mmio / mux-gpio > would make it necessary to keep the video-multiplexer node to describe > the of-graph bindings. But then we have two different nodes in the DT > that describe the same hardware: >=20 > mux: mux { > compatible =3D "mux-gpio"; > mux-gpios =3D <&gpio 0>, <&gpio 1>; > #mux-control-cells =3D <0>; > } >=20 > video-multiplexer { > compatible =3D "video-multiplexer" > mux-controls =3D <&mux>; >=20 > ports { > /* ... */ > } > } >=20 > It would feel more natural to have the ports in the mux node, but then > how would the video-multiplexer driver be instanciated, and how would it > get to the of-graph nodes? Device tree representation and code used to implement the muxing driver should be pretty independend, no? Yes, one piece of hardware should have one entry in the device tree, so it should be something like: video-multiplexer { compatible =3D "video-multiplexer-gpio"=09 mux-gpios =3D <&gpio 0>, <&gpio 1>; #mux-control-cells =3D <0>; mux-controls =3D <&mux>; =20 ports { /* ... */ } } You should be able to use code in drivers/mux as a library... Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAljxMdAACgkQMOfwapXb+vLEHQCfWVAmS+aFu+FrMuB4vnHxF+Hg RJ8AoJBhFp27Yf8CDq79Nr5TQe7qd1C2 =zNjt -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH v6 17/39] platform: add video-multiplexer subdevice driver Date: Fri, 14 Apr 2017 22:32:16 +0200 Message-ID: <20170414203216.GA10920@amd> References: <1490661656-10318-1-git-send-email-steve_longerbeam@mentor.com> <1490661656-10318-18-git-send-email-steve_longerbeam@mentor.com> <20170404124732.GD3288@valkosipuli.retiisi.org.uk> <1492091578.2383.39.camel@pengutronix.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Return-path: Content-Disposition: inline In-Reply-To: <1492091578.2383.39.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Philipp Zabel Cc: Sakari Ailus , Steve Longerbeam , robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, fabio.estevam-3arQi8VN3Tc@public.gmane.org, linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org, mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org, nick-gcszYUEDH4VrovVCs/uTlw@public.gmane.org, markus.heiser-O6JHGLzbNUwb1SvskN2V4Q@public.gmane.org, laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org, bparrot-l0cyMroinI0@public.gmane.org, geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, tiffany.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, jean-christophe.trotin-qxv4g6HH51o@public.gmane.org, horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org, niklas.soderlund+renesas-1zkq55x86MTxsAP9Fp7wbw@public.gmane.org, robert.jarzmik-GANU6spQydw@public.gmane.org, songjun.wu-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org, andrew-ct.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, shuah-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.orglinux- List-Id: devicetree@vger.kernel.org --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > The MUX framework is already in linux-next. Could you use that instead = of > > adding new driver + bindings that are not compliant with the MUX framew= ork? > > I don't think it'd be much of a change in terms of code, using the MUX > > framework appears quite simple. >=20 > It is not quite clear to me how to design the DT bindings for this. Just > splitting the video-multiplexer driver from the mux-mmio / mux-gpio > would make it necessary to keep the video-multiplexer node to describe > the of-graph bindings. But then we have two different nodes in the DT > that describe the same hardware: >=20 > mux: mux { > compatible =3D "mux-gpio"; > mux-gpios =3D <&gpio 0>, <&gpio 1>; > #mux-control-cells =3D <0>; > } >=20 > video-multiplexer { > compatible =3D "video-multiplexer" > mux-controls =3D <&mux>; >=20 > ports { > /* ... */ > } > } >=20 > It would feel more natural to have the ports in the mux node, but then > how would the video-multiplexer driver be instanciated, and how would it > get to the of-graph nodes? Device tree representation and code used to implement the muxing driver should be pretty independend, no? Yes, one piece of hardware should have one entry in the device tree, so it should be something like: video-multiplexer { compatible =3D "video-multiplexer-gpio"=09 mux-gpios =3D <&gpio 0>, <&gpio 1>; #mux-control-cells =3D <0>; mux-controls =3D <&mux>; =20 ports { /* ... */ } } You should be able to use code in drivers/mux as a library... Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAljxMdAACgkQMOfwapXb+vLEHQCfWVAmS+aFu+FrMuB4vnHxF+Hg RJ8AoJBhFp27Yf8CDq79Nr5TQe7qd1C2 =zNjt -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: pavel@ucw.cz (Pavel Machek) Date: Fri, 14 Apr 2017 22:32:16 +0200 Subject: [PATCH v6 17/39] platform: add video-multiplexer subdevice driver In-Reply-To: <1492091578.2383.39.camel@pengutronix.de> References: <1490661656-10318-1-git-send-email-steve_longerbeam@mentor.com> <1490661656-10318-18-git-send-email-steve_longerbeam@mentor.com> <20170404124732.GD3288@valkosipuli.retiisi.org.uk> <1492091578.2383.39.camel@pengutronix.de> Message-ID: <20170414203216.GA10920@amd> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi! > > The MUX framework is already in linux-next. Could you use that instead of > > adding new driver + bindings that are not compliant with the MUX framework? > > I don't think it'd be much of a change in terms of code, using the MUX > > framework appears quite simple. > > It is not quite clear to me how to design the DT bindings for this. Just > splitting the video-multiplexer driver from the mux-mmio / mux-gpio > would make it necessary to keep the video-multiplexer node to describe > the of-graph bindings. But then we have two different nodes in the DT > that describe the same hardware: > > mux: mux { > compatible = "mux-gpio"; > mux-gpios = <&gpio 0>, <&gpio 1>; > #mux-control-cells = <0>; > } > > video-multiplexer { > compatible = "video-multiplexer" > mux-controls = <&mux>; > > ports { > /* ... */ > } > } > > It would feel more natural to have the ports in the mux node, but then > how would the video-multiplexer driver be instanciated, and how would it > get to the of-graph nodes? Device tree representation and code used to implement the muxing driver should be pretty independend, no? Yes, one piece of hardware should have one entry in the device tree, so it should be something like: video-multiplexer { compatible = "video-multiplexer-gpio" mux-gpios = <&gpio 0>, <&gpio 1>; #mux-control-cells = <0>; mux-controls = <&mux>; ports { /* ... */ } } You should be able to use code in drivers/mux as a library... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: