Em Thu, 5 Nov 2020 10:01:05 +0200 Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> escreveu: > Hi Mauro, > > Thank you for the review. > > On Thu, Nov 05, 2020 at 08:19:50AM +0100, Mauro Carvalho Chehab wrote: > > Hi, > > > > Em Wed, 7 Oct 2020 11:44:21 +0300 > > Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> escreveu: > > > > > Add register definitions of the MIPI CCS 1.1 standard. > > > > > > The CCS driver makes extended use of device's capability registers that > > > are dependent on CCS version. This involves having an in-memory data > > > structure for limit and capability information, creating that data > > > structure and accessing it. > > > > > > The register definitions as well as the definitions of this data structure > > > are generated from a text file using a Perl script. Do the generation here > > > and so avoid making manual, error-prone changes to the several generated > > > files. > > > > I understand the reason behind using a perl script to parse some > > text file in order to generate register's definition files, > > but I can't see what's the sense of storing the perl script and > > such texts together with the Kernel building system, re-generating them > > every time. > > > > I mean: register definitions is something that it is supposed to be > > stable, and nothing something that will change on every Kernel > > compilation. > > > > How often are you expecting changes at ccs-regs.txt? > > When there's a new version of the standard, or a bug is found. At least. So > not very often. So, it should likely take a couple of years before any changes on it. > After pushing the set to a branch in my linuxtv.org tree, I also noticed > that some architectures are built by kbuild bot without Perl interpreter > being present. Well, kbuild bot is doing the wrong thing here: it means that it is not testing documentation - as building it requires perl ;-) > This suggests that Perl is not currently universally > required for building the kernel albeit there seems to be some PowerPC > hardware (?) related driver needing it to be built. I doubt that Perl is a requirement for building the Kernel itself. Adding such requirement could cause troubles on some embedded distros, like Yocto, OpenWrt, etc, whose have a distinct toolchain that needs to be compiled on some early step. If this were something that would require dynamic changes on every single compilation, it would make sense to add such extra dependency, but this is not the case here. > I was thinking of putting the files produced by the script into a new patch > and leaving the script and the text file in the directory. The files would > be rebuilt when a specific environment variable is set. This would in line > with what crypto drivers are doing. I would, instead, place the script and instructions about how to use it inside Documentation/driver-api/media. Thanks, Mauro