From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161932AbbKEPQE (ORCPT ); Thu, 5 Nov 2015 10:16:04 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:44903 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755488AbbKEPQC (ORCPT ); Thu, 5 Nov 2015 10:16:02 -0500 Date: Thu, 5 Nov 2015 16:15:59 +0100 From: Andrew Lunn To: Mason Cc: Linux ARM , LKML Subject: Re: Grafting old platform drivers onto a new DT kernel Message-ID: <20151105151559.GA16666@lunn.ch> References: <563B3749.50701@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <563B3749.50701@free.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Since I don't have time to rewrite the drivers at the moment, I'm wondering > if it's possible to "graft" old drivers (they're using the platform API, no > trace of DT support) onto my small base? Platform drivers are still usable with DT systems. We used that fact when converting platform based machines over to DT, one driver at a time. Look in the git history for kirkwood devices. e.g. somewhere around v3.7, arch/arm/mach-kirkwood. board-dt.c, and the various board-*.c files, and the DT files in the usual place. > Is that a realistic plan? What traps am I likely to fall into? It is not just the move to DT where things are different. Kernel APIs are not stable. So your old drivers might not even compile with a current kernel. Andrew