[PATCHv4][ 1/4] Input: tsc2007: Add device tree support.

Lothar Waßmann LW at KARO-electronics.de
Tue Oct 22 05:49:47 EDT 2013


Hi,

> On Mon, Oct 21, 2013 at 03:54:24PM +0200, Denis Carikli wrote:
> >  
> > +	if (ts->of)
> > +		return tsc2007_get_pendown_state_dt(ts);
> > +
> >  	if (!ts->get_pendown_state)
> >  		return true;
> 
> Instead of special casing "if (ts->of)" all over the place why don't you
> set up the device structure as:
> 
> 	if (<configuring_tsc2007_form_dt>)
> 		ts->get_pendown_state = tsc2007_get_pendown_state_dt;
> 
> and be done with it?
>
I also thought about that, but the existing function does not have any
parameters, while the DT version of get_pendown_state() requires to get
the GPIO passed to it somehow.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-arm-kernel mailing list