From mboxrd@z Thu Jan 1 00:00:00 1970 From: moinejf@free.fr (Jean-Francois Moine) Date: Sun, 9 Feb 2014 10:22:19 +0100 Subject: [PATCH RFC 0/2] drivers/base: simplify simple DT-based components In-Reply-To: <20140207202351.GH26684@n2100.arm.linux.org.uk> References: <20140207202351.GH26684@n2100.arm.linux.org.uk> Message-ID: <20140209102219.3ab40b5e@armhf> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, 7 Feb 2014 20:23:51 +0000 Russell King - ARM Linux wrote: > Here's my changes to the TDA998x driver to add support for the component > helper. The TDA998x driver retains support for the old way so that > drivers can be transitioned. For any one DRM "card" the transition to I rewrote the tda998x as a simple encoder+connector (i.e. not a slave_encoder) with your component helper, and the code is much clearer and simpler: the DRM driver has nothing to do except to know that the tda998x is a component and to set the possible_crtcs. AFAIK, only the tilcdc drm driver is using the tda998x as a slave_encoder. It does a (encoder+connector) conversion to (slave_encoder). Then, in your changes in the TDA998x, you do a (slave_encoder) translation to (encoder+connector). This seems rather complicated! I think it would be easier to use your component helper and rewrite (remove?) tilcdc_slave.c. > And yes, I'm thinking that maybe moving compare_of() into the component > support so that drivers can share this generic function may be a good > idea. This function exists already in drivers/of/platform.c as of_dev_node_match(). It just needs to be exported. -- Ken ar c'henta? | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Francois Moine Subject: Re: [PATCH RFC 0/2] drivers/base: simplify simple DT-based components Date: Sun, 9 Feb 2014 10:22:19 +0100 Message-ID: <20140209102219.3ab40b5e@armhf> References: <20140207202351.GH26684@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20140207202351.GH26684@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: driverdev-devel-bounces@linuxdriverproject.org To: Russell King - ARM Linux , Rob Clark Cc: devel@driverdev.osuosl.org, Daniel Vetter , Takashi Iwai , dri-devel@lists.freedesktop.org, Sascha Hauer , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org T24gRnJpLCA3IEZlYiAyMDE0IDIwOjIzOjUxICswMDAwClJ1c3NlbGwgS2luZyAtIEFSTSBMaW51 eCA8bGludXhAYXJtLmxpbnV4Lm9yZy51az4gd3JvdGU6Cgo+IEhlcmUncyBteSBjaGFuZ2VzIHRv IHRoZSBUREE5OTh4IGRyaXZlciB0byBhZGQgc3VwcG9ydCBmb3IgdGhlIGNvbXBvbmVudAo+IGhl bHBlci4gIFRoZSBUREE5OTh4IGRyaXZlciByZXRhaW5zIHN1cHBvcnQgZm9yIHRoZSBvbGQgd2F5 IHNvIHRoYXQKPiBkcml2ZXJzIGNhbiBiZSB0cmFuc2l0aW9uZWQuICBGb3IgYW55IG9uZSBEUk0g ImNhcmQiIHRoZSB0cmFuc2l0aW9uIHRvCgpJIHJld3JvdGUgdGhlIHRkYTk5OHggYXMgYSBzaW1w bGUgZW5jb2Rlcitjb25uZWN0b3IgKGkuZS4gbm90IGEKc2xhdmVfZW5jb2Rlcikgd2l0aCB5b3Vy IGNvbXBvbmVudCBoZWxwZXIsIGFuZCB0aGUgY29kZSBpcyBtdWNoIGNsZWFyZXIKYW5kIHNpbXBs ZXI6IHRoZSBEUk0gZHJpdmVyIGhhcyBub3RoaW5nIHRvIGRvIGV4Y2VwdCB0byBrbm93IHRoYXQg dGhlCnRkYTk5OHggaXMgYSBjb21wb25lbnQgYW5kIHRvIHNldCB0aGUgcG9zc2libGVfY3J0Y3Mu CgpBRkFJSywgb25seSB0aGUgdGlsY2RjIGRybSBkcml2ZXIgaXMgdXNpbmcgdGhlIHRkYTk5OHgg YXMgYQpzbGF2ZV9lbmNvZGVyLiBJdCBkb2VzIGEgKGVuY29kZXIrY29ubmVjdG9yKSBjb252ZXJz aW9uIHRvCihzbGF2ZV9lbmNvZGVyKS4gVGhlbiwgaW4geW91ciBjaGFuZ2VzIGluIHRoZSBUREE5 OTh4LCB5b3UgZG8gYQooc2xhdmVfZW5jb2RlcikgdHJhbnNsYXRpb24gdG8gKGVuY29kZXIrY29u bmVjdG9yKS4KVGhpcyBzZWVtcyByYXRoZXIgY29tcGxpY2F0ZWQhCgpJIHRoaW5rIGl0IHdvdWxk IGJlIGVhc2llciB0byB1c2UgeW91ciBjb21wb25lbnQgaGVscGVyIGFuZCByZXdyaXRlCihyZW1v dmU/KSB0aWxjZGNfc2xhdmUuYy4KCj4gQW5kIHllcywgSSdtIHRoaW5raW5nIHRoYXQgbWF5YmUg bW92aW5nIGNvbXBhcmVfb2YoKSBpbnRvIHRoZSBjb21wb25lbnQKPiBzdXBwb3J0IHNvIHRoYXQg ZHJpdmVycyBjYW4gc2hhcmUgdGhpcyBnZW5lcmljIGZ1bmN0aW9uIG1heSBiZSBhIGdvb2QKPiBp ZGVhLgoKVGhpcyBmdW5jdGlvbiBleGlzdHMgYWxyZWFkeSBpbiBkcml2ZXJzL29mL3BsYXRmb3Jt LmMgYXMKb2ZfZGV2X25vZGVfbWF0Y2goKS4gSXQganVzdCBuZWVkcyB0byBiZSBleHBvcnRlZC4K Ci0tIApLZW4gYXIgYydoZW50YcOxCXwJICAgICAgKiogQnJlaXpoIGhhIExpbnV4IGF0YXYhICoq CkplZgkJfAkJaHR0cDovL21vaW5lamYuZnJlZS5mci8KX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX18KZGV2ZWwgbWFpbGluZyBsaXN0CmRldmVsQGxpbnV4ZHJp dmVycHJvamVjdC5vcmcKaHR0cDovL2RyaXZlcmRldi5saW51eGRyaXZlcnByb2plY3Qub3JnL21h aWxtYW4vbGlzdGluZm8vZHJpdmVyZGV2LWRldmVsCg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp1-g21.free.fr ([212.27.42.1]:40871 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751511AbaBIJV5 convert rfc822-to-8bit (ORCPT ); Sun, 9 Feb 2014 04:21:57 -0500 Date: Sun, 9 Feb 2014 10:22:19 +0100 From: Jean-Francois Moine To: Russell King - ARM Linux , Rob Clark Cc: devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org, Takashi Iwai , Sascha Hauer , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, Daniel Vetter Subject: Re: [PATCH RFC 0/2] drivers/base: simplify simple DT-based components Message-ID: <20140209102219.3ab40b5e@armhf> In-Reply-To: <20140207202351.GH26684@n2100.arm.linux.org.uk> References: <20140207202351.GH26684@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-media-owner@vger.kernel.org List-ID: On Fri, 7 Feb 2014 20:23:51 +0000 Russell King - ARM Linux wrote: > Here's my changes to the TDA998x driver to add support for the component > helper. The TDA998x driver retains support for the old way so that > drivers can be transitioned. For any one DRM "card" the transition to I rewrote the tda998x as a simple encoder+connector (i.e. not a slave_encoder) with your component helper, and the code is much clearer and simpler: the DRM driver has nothing to do except to know that the tda998x is a component and to set the possible_crtcs. AFAIK, only the tilcdc drm driver is using the tda998x as a slave_encoder. It does a (encoder+connector) conversion to (slave_encoder). Then, in your changes in the TDA998x, you do a (slave_encoder) translation to (encoder+connector). This seems rather complicated! I think it would be easier to use your component helper and rewrite (remove?) tilcdc_slave.c. > And yes, I'm thinking that maybe moving compare_of() into the component > support so that drivers can share this generic function may be a good > idea. This function exists already in drivers/of/platform.c as of_dev_node_match(). It just needs to be exported. -- Ken ar c'hentaƱ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/