[PATCH] commands: of_display_timings: Add simple-panel support

Sascha Hauer s.hauer at pengutronix.de
Wed May 2 03:49:56 PDT 2018


Hi Stefan,

On Fri, Apr 20, 2018 at 01:01:01PM +0200, Stefan Riedmueller wrote:
> Display timings can now be set with simple-panel method which selects
> the required timings by the compatible of the simple panel devicetree
> node.
> 
> This patch adds an option to set simple panel timings with the
> of_display_timings command by setting the compatible of the display node.
> The options -P and -c were implemented. The -P option requires the display
> node path as argument and the -c option requires the compatible to set.
> 
> This has one downside. The available simple panel timings cannot be
> listed since the timings are defined in the kernel. Account for this in the
> help text.
> 
> Signed-off-by: Stefan Riedmueller <s.riedmueller at phytec.de>
> ---
>  commands/of_display_timings.c | 65 ++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 61 insertions(+), 4 deletions(-)

This patch seems to be a way to manipulate a device tree property in the
Linux device tree. How about adding a new option to the of_property
command which would register a of_fixup instead of doing the operation
now?

Like this:

of_property -f -s /path/to/node compatible vendor,foo-display

> +		case 'c':
> +			compatible = optarg;
> +			break;
>  		case 'S':
>  			timingpath = xzalloc(strlen(optarg) + 1);
>  			strcpy(timingpath, optarg);

xstrdup() is what you want here.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list