From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755321AbbCEK7V (ORCPT ); Thu, 5 Mar 2015 05:59:21 -0500 Received: from foss.arm.com ([217.140.101.70]:56604 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbbCEK7S (ORCPT ); Thu, 5 Mar 2015 05:59:18 -0500 Message-ID: <1425553154.3092.76.camel@arm.com> Subject: Re: [PATCH] video: ARM CLCD: Added dt support to set tim2 register From: Pawel Moll To: Arun Ramamurthy Cc: Rob Herring , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , Dmitry Torokhov , Anatol Pomazau , Jonathan Richardson , Scott Branden , Ray Jui , "bcm-kernel-feedback-list@broadcom.com" Date: Thu, 05 Mar 2015 10:59:14 +0000 In-Reply-To: <54F653B9.4010507@broadcom.com> References: <1424898082-1522-1-git-send-email-arun.ramamurthy@broadcom.com> <1425312688.3092.10.camel@arm.com> <54F4B583.4000005@broadcom.com> <1425376977.3092.26.camel@arm.com> <1425378127.3092.38.camel@arm.com> <54F653B9.4010507@broadcom.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-04 at 00:37 +0000, Arun Ramamurthy wrote: > > That way you're precisely describing the way the hardware is wired up. > > And the driver simply tries to get clcdclk first, if it's defined - > > cool, set clksel to 1, if not - try hclk and set clksel to 0. If neither > > of them is present - bail out. > > > > Does this make any sense? > > > This makes sense to me, thank you for the suggestions. I will fix it all > up in V2 Cool. Just a word of comment to my own words ;-) The "bail out" case was a bad idea - the non-DT use cases more likely than not will have no clock name defined. So, to maintain backward compatibility, the driver will still have to work when no named clock is available. I think the simplest way to do that is to check if "hclk" is available, and use it if it is (setting the clksel accordingly). Otherwise - proceed as it was the case previously. Pawel