From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BEDDC7EE2E for ; Mon, 12 Jun 2023 12:36:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C5FF410E221; Mon, 12 Jun 2023 12:36:00 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9DA010E221 for ; Mon, 12 Jun 2023 12:35:58 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1E707628D8; Mon, 12 Jun 2023 12:35:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2FCAC433EF; Mon, 12 Jun 2023 12:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686573357; bh=E8SWGfhhO/WTyCRCg7ef75v0psa+Fv8WNgcRCRVbE7c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uYjHdO0mxHJnqti3qcAbIIOa4e5mzhY2LIybVENo6oDDQQhGYJ/FwC7mqNWunocOO K+KNn9P38gX1X1tq6EmsrFnN76pnszevVLnvV5XP85zAf7ZVWTptB5tXb9lp5G7oPW ma3yshqCLxTQbwIljfvU8oXxR6R44+DvVqnNStALeQDgdUaMem/f2zcrxuadpxq2HK 3zD3cyhMyRxvw3Ki4EPK4k2gViL78vqIXTPTuDD7IstybwQYbQATsmD4zvG/x2XSyE aKBaUJQHut/rTov1XOoGgZh9kU/aB2sQ9bYOHh4BowcF9oBGkO67Tr+ELYMhK3d5UW MhVy5ypGbgpZg== Date: Mon, 12 Jun 2023 14:35:54 +0200 From: Wolfram Sang To: Biju Das Subject: Re: [PATCH v5 01/11] i2c: Enhance i2c_new_ancillary_device API Message-ID: Mail-Followup-To: Wolfram Sang , Biju Das , Laurent Pinchart , Krzysztof Kozlowski , Geert Uytterhoeven , Rob Herring , Conor Dooley , Geert Uytterhoeven , Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter , Kieran Bingham , Mauro Carvalho Chehab , Hans Verkuil , Alessandro Zummo , Alexandre Belloni , Jonas Karlman , Jernej Skrabec , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Corey Minyard , Marek =?utf-8?B?QmVow7pu?= , Jiasheng Jiang , Antonio Borneo , Abhinav Kumar , Ahmad Fatoum , "dri-devel@lists.freedesktop.org" , "linux-i2c@vger.kernel.org" , "linux-media@vger.kernel.org" , Fabrizio Castro , "linux-renesas-soc@vger.kernel.org" , Mark Brown References: <20230531085941.GA27043@pendragon.ideasonboard.com> <20230608103929.GO5058@pendragon.ideasonboard.com> <20230608125019.GD26742@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f0x63eWuLaTHiCTt" Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Alexandre Belloni , Krzysztof Kozlowski , Geert Uytterhoeven , Antonio Borneo , "dri-devel@lists.freedesktop.org" , Laurent Pinchart , Andrzej Hajda , Marek =?utf-8?B?QmVow7pu?= , Robert Foss , Jonas Karlman , Kieran Bingham , Jernej Skrabec , Geert Uytterhoeven , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , "linux-media@vger.kernel.org" , Conor Dooley , Alessandro Zummo , Jiasheng Jiang , Abhinav Kumar , Fabrizio Castro , Rob Herring , Ahmad Fatoum , Mauro Carvalho Chehab , Neil Armstrong , "linux-renesas-soc@vger.kernel.org" , Mark Brown , Hans Verkuil , "linux-i2c@vger.kernel.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --f0x63eWuLaTHiCTt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Biju, > DT-Maintainers suggestion: > [1] > raa215300: pmic@12 { > compatible =3D "renesas,raa215300"; > reg =3D <0x12>, <0x6f>; > reg-names =3D "main", "rtc"; >=20 > clocks =3D <&x2>; > clock-names =3D "xin"; > /* Add Optional shared IRQ resource and share it to child and handle it = both in parent and child */ > }; Would this binding allow to not use the RTC if the second reg is missing? What are the advantages of not enabling RTC? Saving power? >=20 > Laurent/Wolfram suggestion to split it into two nodes and get rid of this= patch: > [2] > raa215300: pmic @12 { > compatible =3D "renesas,raa215300"; > reg =3D <0x12>; > =09 > /* Add Optional shared IRQ */ > renesas,raa215300-rtc =3D <&rtc_raa215300>; /* Parse the handle and Ena= ble RTC , if present.*/ Thinking more about this: DT is hardware description, so the RTC should always be described in DT. If the RTC is actually activated is more a configuration thing, or? Brainstorming: maybe the PMIC driver could try to find the node with reg =3D=3D 0x6f and see if firmware has enabled it or not? > }; >=20 > rtc_raa215300: rtc@6f { > compatible =3D "renesas,raa215300-isl1208"; > reg =3D <0x6f>; >=20 > /* Add Optional shared IRQ */ > clocks =3D <&x2>; > clock-names =3D "xin"; > renesas,raa215300-pmic =3D <&pmic>; /* Parse the handle to get PMIC ver= sion to check Oscillator bit is inverted or not */ > }; I have been scratching my head around this and wondered about one thing. The RTC driver needs to know if the oscillator bit is inverted. AFAIU this depends on the version of the PMIC (which includes the RTC). So, can't we simply encode the version in the compatible string? > compatible =3D "renesas,raa215300-isl1208-01"; > compatible =3D "renesas,raa215300-isl1208-a0"; I dunno the exact versions, but you probably get the idea. Happy hacking, Wolfram --f0x63eWuLaTHiCTt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmSHESoACgkQFA3kzBSg Kbbizg/9EyCvB6UWNWtdYTQm38cVu9D6N4BufNeSiQKz3aZIJSLNkiZE0HRcswKt 1VolBkD1cc9UhdRwqDdQ3qqSgQuNRpAzRDt7An+KTGvHvDGMEkHanUYbeMQtQ+qo e5lMvvkgsEOfYPPbQNbIbxgEeqIpgxjjF/WWOOhgDfhOHA+9Eovo0zCZDonMCZyR tOVop5peN9Y2YZ/NNVaf1itzyvOIoHA7k9p2N30tccxB9lC2DnPb6OBHi42N75sX aPVivdOgOTIKvxzDbNpQkPD3aQZi58C6aanlxl7q6+9U7JV9s2kgsn+6vTHtj8/V up4jXMJKnJ2ysL/pxGSa1kSoK0k3R3ue2TuffFin+HkzeCvxd9Vu1iLS6+6ayYZc cFpymAjLBAnzCj8cMzX8dppuh8n5CyBfU8Aa1kYo8YYuQOIhWafe6vR4u9GsEMEC 4W+atOq+FAS/AYDXyt5bFJlAmEVVhidyBwiKMAfFTZXPYi50SxbjkIJG+BIujG82 TJYR9/9EwGmKfctXV8mOqLENpuxStM5vClPe4pIOh3o4jwhG6wV7AMf1SzdORdHc 0IpvcfhZDQ8Wr3pY2RNleFdriB1H2ztzfjj+e+tOqo1avi7396MWo96evPD+c5Q4 3LFaOs0FclTFOs8qBa6SL6uwj5sGI0sMKd21hUwGKgn0mgpdKlc= =qQlV -----END PGP SIGNATURE----- --f0x63eWuLaTHiCTt--