From: Javier Martinez Canillas <javier@dowhile0.org> To: John Crispin <blogic@openwrt.org> Cc: Mark Brown <broonie@kernel.org>, Steven Liu <steven.liu@mediatek.com>, Linux Kernel <linux-kernel@vger.kernel.org>, Henry Chen <henryc.chen@mediatek.com>, Liam Girdwood <lgirdwood@gmail.com>, linux-mediatek@lists.infradead.org, Matthias Brugger <matthias.bgg@gmail.com>, Chen Zhong <chen.zhong@mediatek.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH V2 2/2] regulator: mt6323: Add support for MT6323 regulator Date: Mon, 25 Jan 2016 10:19:15 -0300 [thread overview] Message-ID: <CABxcv=m32FLmLzuGC-KFmZ5q-8TmC1FrhdOw+WB-d_L53gg_tg@mail.gmail.com> (raw) In-Reply-To: <56A61F78.6070703@openwrt.org> Hello John, On Mon, Jan 25, 2016 at 10:13 AM, John Crispin <blogic@openwrt.org> wrote: > > > On 25/01/2016 13:35, Mark Brown wrote: >> On Mon, Jan 25, 2016 at 01:19:46PM +0100, John Crispin wrote: >>> On 25/01/2016 13:11, Javier Martinez Canillas wrote: >> >>>> You don't have a .of_match table but according the DT bindings, the >>>> compatible string "mediatek,mt6323-regulator" should be used so there >>>> should be a OF match table or the vendor prefix of the compatible >>>> string won't be used for matching (i.e: fallbacks to the driver .name >>>> for match). >> >>> the driver is probed via drivers/mfd/mt6397-core.c and does not require >>> the OF match table. It loads fine just like the mt6397 driver. >> >> That's fine but you shouldn't have the compatible string in your binding >> document since it's not actually used or needed. >> > Hi, > > correct me if i am wrong but if we remove the compatible string from the > binding document, then we will also have to remove it from the dts and > then the kernel won't be able to match the node to the driver and thus > the regulator phandle derefs will fail. > The kernel doesn't need to match the compatible since the MFD driver register the device explicitly with mfd_add_devices(). In fact, the kernel is currently not matching the compatible, it is only matching because you provided a .of_compatible is provided in the mfd_cell. If you wan't subdevices for a MFD to be registered automatically by OF and the compatible matched like other buses, then your MFD driver needs to call of_platform_populate() instead mfd_add_devices(). > John Best regards, Javier
WARNING: multiple messages have this Message-ID (diff)
From: javier@dowhile0.org (Javier Martinez Canillas) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 2/2] regulator: mt6323: Add support for MT6323 regulator Date: Mon, 25 Jan 2016 10:19:15 -0300 [thread overview] Message-ID: <CABxcv=m32FLmLzuGC-KFmZ5q-8TmC1FrhdOw+WB-d_L53gg_tg@mail.gmail.com> (raw) In-Reply-To: <56A61F78.6070703@openwrt.org> Hello John, On Mon, Jan 25, 2016 at 10:13 AM, John Crispin <blogic@openwrt.org> wrote: > > > On 25/01/2016 13:35, Mark Brown wrote: >> On Mon, Jan 25, 2016 at 01:19:46PM +0100, John Crispin wrote: >>> On 25/01/2016 13:11, Javier Martinez Canillas wrote: >> >>>> You don't have a .of_match table but according the DT bindings, the >>>> compatible string "mediatek,mt6323-regulator" should be used so there >>>> should be a OF match table or the vendor prefix of the compatible >>>> string won't be used for matching (i.e: fallbacks to the driver .name >>>> for match). >> >>> the driver is probed via drivers/mfd/mt6397-core.c and does not require >>> the OF match table. It loads fine just like the mt6397 driver. >> >> That's fine but you shouldn't have the compatible string in your binding >> document since it's not actually used or needed. >> > Hi, > > correct me if i am wrong but if we remove the compatible string from the > binding document, then we will also have to remove it from the dts and > then the kernel won't be able to match the node to the driver and thus > the regulator phandle derefs will fail. > The kernel doesn't need to match the compatible since the MFD driver register the device explicitly with mfd_add_devices(). In fact, the kernel is currently not matching the compatible, it is only matching because you provided a .of_compatible is provided in the mfd_cell. If you wan't subdevices for a MFD to be registered automatically by OF and the compatible matched like other buses, then your MFD driver needs to call of_platform_populate() instead mfd_add_devices(). > John Best regards, Javier
next prev parent reply other threads:[~2016-01-25 13:19 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-25 10:40 [PATCH V2 1/2] dt-bindings: regulator: Add document for MT6323 regulator John Crispin 2016-01-25 10:40 ` John Crispin 2016-01-25 10:40 ` [PATCH V2 2/2] regulator: mt6323: Add support " John Crispin 2016-01-25 10:40 ` John Crispin 2016-01-25 12:11 ` Javier Martinez Canillas 2016-01-25 12:11 ` Javier Martinez Canillas 2016-01-25 12:11 ` Javier Martinez Canillas 2016-01-25 12:19 ` John Crispin 2016-01-25 12:19 ` John Crispin 2016-01-25 12:19 ` John Crispin 2016-01-25 12:30 ` Javier Martinez Canillas 2016-01-25 12:30 ` Javier Martinez Canillas 2016-01-25 12:30 ` Javier Martinez Canillas [not found] ` <CABxcv=kC3tOrfJvCCaXcMSO4ufBXc_GoWeGBcX56k1RV-BX=ow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-01-25 12:33 ` John Crispin 2016-01-25 12:35 ` Mark Brown 2016-01-25 12:35 ` Mark Brown 2016-01-25 12:35 ` Mark Brown 2016-01-25 13:13 ` John Crispin 2016-01-25 13:13 ` John Crispin 2016-01-25 13:13 ` John Crispin 2016-01-25 13:19 ` Javier Martinez Canillas [this message] 2016-01-25 13:19 ` Javier Martinez Canillas 2016-01-25 13:19 ` Javier Martinez Canillas 2016-01-25 13:25 ` Javier Martinez Canillas 2016-01-25 13:25 ` Javier Martinez Canillas 2016-01-25 13:25 ` Javier Martinez Canillas 2016-01-25 13:46 ` John Crispin 2016-01-25 13:46 ` John Crispin 2016-01-25 13:46 ` John Crispin 2016-01-25 14:01 ` Javier Martinez Canillas 2016-01-25 14:01 ` Javier Martinez Canillas 2016-01-25 14:01 ` Javier Martinez Canillas 2016-01-25 14:02 ` John Crispin 2016-01-25 14:02 ` John Crispin 2016-01-25 14:02 ` John Crispin 2016-01-25 11:37 ` [PATCH V2 1/2] dt-bindings: regulator: Add document " Mark Brown 2016-01-25 11:37 ` Mark Brown 2016-01-25 11:37 ` Mark Brown 2016-01-25 12:05 ` John Crispin 2016-01-25 12:05 ` John Crispin 2016-01-25 12:05 ` John Crispin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CABxcv=m32FLmLzuGC-KFmZ5q-8TmC1FrhdOw+WB-d_L53gg_tg@mail.gmail.com' \ --to=javier@dowhile0.org \ --cc=blogic@openwrt.org \ --cc=broonie@kernel.org \ --cc=chen.zhong@mediatek.com \ --cc=henryc.chen@mediatek.com \ --cc=lgirdwood@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=matthias.bgg@gmail.com \ --cc=steven.liu@mediatek.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.