Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1222388rdb; Fri, 19 Jan 2024 11:52:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyjv5xPh3vQ/wAc6D/FWEXEte8jCOKaS18r+Y58QSinh1KHXhGZnrSdG2XKSPr0myHd5h5 X-Received: by 2002:a05:620a:5686:b0:783:6700:8c5 with SMTP id wg6-20020a05620a568600b00783670008c5mr666209qkn.3.1705693922411; Fri, 19 Jan 2024 11:52:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705693922; cv=pass; d=google.com; s=arc-20160816; b=h9nUBEBiNGbFHHdja6AoIQMO+Ajtj0QuIfdbShxgL3KmPJcyb0qZacT/4/17jyu+F/ 2Wbm1SZDvjLWwrbonmJN597CatBJJdWm6j0jeIS3XiScTq9kMnWBJF0XOzevDmLWoe9K sPRFkfvYiPj06hPoAVUUGGj8p1e+m0AKDjeBvUBUWavoZDKVgxtdtHBqua/16nf5vqDk BJzQSEAenDxpGy+RmZ2Btn8tMlrp4l1BrEUuYKudVgWa6AmmrVqDzghoItNCDMV3cyYh lKnpAgBeZh5nlIFKMSmdR0S8mn7Y0qt6d3luOgtfCHSo/QSbI8DQVfsvyBmh3AA/LwMq SBYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E0u1E8QZqYe8uNwNNAKLFtRgFdj1aE7r+jA1ID43EAI=; fh=54KuC9RxAB6UfsgoLw0roaTMTM0iwwlBHHlxs7w5zsk=; b=aT2JxVvzssgkPNIEuam8p/2MxwRrPW1yX7ookcG8mz5NwNtCYhBo4cUgjmAKCXzFel QtfEv11UwRAlIZduxIAgg9eafftdxvwTVZNwdPpw8ON71bSc8SAbgigBJ5ihGkIsxihD xV5BSgwTEzHWHvB9XW9LCk9T43xSBgZleXiSZcxyIHF1AvnXCbnN0fomE/7Bq3CInIt8 XIaZ+SZN0dVtPc/Io4Kg6ES/UURcIB98VT6XRd5Qr4jDVDrWuO1wdhAcAymf7s5vty12 iz4UarlRYPY2wPbQbADgqNM3EvM2ClDuoS3DGqtO3rJ9gsQsynhvLiG3uJXKiJlrjmkH jcOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MM2M331s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31526-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31526-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l3-20020a37f503000000b0077f6ff697c6si16505506qkk.164.2024.01.19.11.52.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 11:52:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31526-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MM2M331s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31526-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31526-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 284DC1C22D92 for ; Fri, 19 Jan 2024 19:52:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01D9756472; Fri, 19 Jan 2024 19:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MM2M331s" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 221265644C; Fri, 19 Jan 2024 19:51:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705693914; cv=none; b=qrYbkd/dK+sqOlp8YygoE6/LJF9QvGAIZfYRVUXs06175JW0N6Ah+f9//Ssm6E8DKiBXNDkGHsmLB32HgJFOWJOChRLA45OIp9Dnb0ogrIGg9m++L+wZ3nvnrDcYnt/E1yxOfRqswj7LsbYN1tOLZdhiBU2lRBvf020Do7X3VUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705693914; c=relaxed/simple; bh=V/giPsLnDjrj1zV7DERx2IXZKAyhH88rKKkf5QFcqUw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WP7ut4h4FsRUYabQ+8qfOMmAse6Rx7YKcu9NvvsSChjtVBPc8q2V/8yE5ER073PjvYh3+dVmj//KYf63qce1527hh/4/7EoIQ/Bej/dxAqhT78ArU7S58c2Oj21ef+00ujOigzTElyzdNFpp3XMlLTFjN/aZLxzN/jtD1KoEf+A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MM2M331s; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABB04C433F1; Fri, 19 Jan 2024 19:51:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705693913; bh=V/giPsLnDjrj1zV7DERx2IXZKAyhH88rKKkf5QFcqUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MM2M331sZCqze2pBHsSkXYXRwFFz+7F13kgvKu8biiY3cZoImBNdsLDtQVpOFlK1p +Szq70+Q4GmioBk5W1BC34gr/z4wheZ6OCJ2Bmcj7MBaoso/yTbf630iIPDj9643gS ilHqJeQdFLF8lvBudaYjWpyIlMBkHG5I9fWzg9lhd5daZHla2oHwkfXGEzGA84uEjt sDlfFUkV34VFBQSdTXkP/t02fnQ6BMWMP4ydsU5yVjCMUqzV0ZGGDRPXJb669zxPX0 sPOrTcK1LxKGpVfO2SmPe/pfILd08TaHie75ZHIS7U9FqYBXwgtefpOzyXsYVpEmFu TFrFSybHeB9PA== Date: Fri, 19 Jan 2024 13:51:51 -0600 From: Rob Herring To: Sam Ravnborg Cc: Dharma Balasubiramani , conor.dooley@microchip.com, bbrezillon@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, lee@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, linux-pwm@vger.kernel.org, linux4microchip@microchip.com Subject: Re: [PATCH v3 0/3] Convert Microchip's HLCDC Text based DT bindings to JSON schema Message-ID: <20240119195151.GB938671-robh@kernel.org> References: <20240118092612.117491-1-dharma.b@microchip.com> <20240118193040.GA223383@ravnborg.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240118193040.GA223383@ravnborg.org> On Thu, Jan 18, 2024 at 08:30:40PM +0100, Sam Ravnborg wrote: > Hi Dharma et al. > > On Thu, Jan 18, 2024 at 02:56:09PM +0530, Dharma Balasubiramani wrote: > > Converted the text bindings to YAML and validated them individually using following commands > > > > $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ > > $ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ > > > > changelogs are available in respective patches. > > > > Dharma Balasubiramani (3): > > dt-bindings: display: convert Atmel's HLCDC to DT schema > > dt-bindings: atmel,hlcdc: convert pwm bindings to json-schema > > dt-bindings: mfd: atmel,hlcdc: Convert to DT schema format > > I know this is a bit late to ask - sorry in advance. > > The binding describes the single IP block as a multi functional device, > but it is a single IP block that includes the display controller and a > simple pwm that can be used for contrast or backlight. > > If we ignore the fact that the current drivers for hlcdc uses an mfd > abstraction, is this then the optimal way to describe the HW? > > > In one of my stale git tree I converted atmel lcdc to DT, and here > I used: > > + "#pwm-cells": > + description: > + This PWM chip use the default 3 cells bindings > + defined in ../../pwm/pwm.yaml. > + const: 3 > + > + clocks: > + maxItems: 2 > + > + clock-names: > + maxItems: 2 > + items: > + - const: lcdc_clk > + - const: hclk > > This proved to be a simple way to describe the HW. > > To make the DT binding backward compatible you likely need to add a few > compatible that otherwise would have been left out - but that should do > the trick. > > The current atmel hlcdc driver that is split in three is IMO an > over-engineering, and the driver could benefit merging it all in one. > And the binding should not prevent this. I agree on all this, but a conversion is not really the time to redesign things. Trust me, I've wanted to on lots of conversions. It should be possible to simplify the driver side while keeping the DT as-is. Just make the display driver bind to the MFD node instead. After that, then one could look at flattening everything to 1 node. Rob