Message ID | 20200917165301.23100-1-krzk@kernel.org |
---|---|
Headers | show |
Series | gpio: add common dtschema | expand |
On Thu, Sep 17, 2020 at 06:52:58PM +0200, Krzysztof Kozlowski wrote: > Include the common GPIO schema in GPIO controllers to be sure all common > properties are properly validated. Acked-by: Mark Brown <broonie@kernel.org>
Hi Krzysztof, On Fri, Sep 18, 2020 at 09:52:57AM +0200, Krzysztof Kozlowski wrote: > On Thu, 17 Sep 2020 at 22:10, Laurent Pinchart wrote: > > On Thu, Sep 17, 2020 at 06:52:49PM +0200, Krzysztof Kozlowski wrote: > > > Convert parts of gpio.txt bindings into common dtschema file for GPIO > > > controllers. > > > > How about deleting the part that has been converted from gpio.txt ? > > I did not move everything from the gpio.txt and it is really nicely > explained there. I think to leave it as it works as a overview/guide > better than YAML. I'm just a bit worried that duplicating some of the information in two places will lead to them becoming out of sync, but maybe the risk isn't that high. > > > The schema enforces proper naming of GPIO controller nodes and GPIO > > > hogs. > > > > > > The schema should be included by specific GPIO controllers bindings. > > > > Instead of including it manually, could we use a conditional select: to > > apply the schema automatically when a gpio-controller property is > > present ? > > You mean the same way as generic schema for GPIO controllers work? > This could be done but the point is to enforce the GPIO controller > bindings in GPIO controllers, so also in cases when someone forgets to > add "gpio-controller" property. Although, if given GPIO controller > schema requires "gpio-controller" then indeed select would work... You could just make gpio-controller mandatory in the schema, and get everything else automatically selected based on that, without needing a manual $ref.
On Thu, Sep 17, 2020 at 06:52:56PM +0200, Krzysztof Kozlowski wrote: > Include the common GPIO schema in GPIO controllers to be sure all common > properties are properly validated. > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> > > --- For the Cirrus/Wolfson bits: Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Thanks, Charles