From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753005AbbKOCTk (ORCPT ); Sat, 14 Nov 2015 21:19:40 -0500 Received: from mail.kernel.org ([198.145.29.136]:56604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbbKOCTb (ORCPT ); Sat, 14 Nov 2015 21:19:31 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Rob Herring Date: Sat, 14 Nov 2015 20:19:06 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 6/8] drivers:input:ads7846(+tsc2046): recognise old binding for coordinate flipping To: "H. Nikolaus Schaller" Cc: Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Russell King , Dmitry Torokhov , Hans Verkuil , Mauro Carvalho Chehab , Sebastian Reichel , Haibo Chen , Andrey Gelman , Igor Grinberg , Aaron Sierra , Krzysztof Kozlowski , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-omap , List for communicating with real GTA04 owners , "linux-input@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 13, 2015 at 2:35 PM, H. Nikolaus Schaller wrote: > By this patch we still recognise the old binding ti,swap-xy in parallel to > the common binding touchscreen-swapped-x-y. This keeps compatibility > to older (out-of-tree) device tree binaries. > > We do this in a separate patch so that it can be easily reverted in the > future to retire the old API. A notice is printed to remind developers > of using old API. > > We also fix the bindings name for all in-tree device tree sources in > a separate patch. This one and patch 5 should be combined, so the series is bisectable. Rob > > Signed-off-by: H. Nikolaus Schaller > --- > drivers/input/touchscreen/ads7846.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c > index 4525f00..b9896fd 100644 > --- a/drivers/input/touchscreen/ads7846.c > +++ b/drivers/input/touchscreen/ads7846.c > @@ -1259,7 +1259,11 @@ static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev) > of_property_read_u16(node, "ti,vref-mv", &pdata->vref_mv); > pdata->keep_vref_on = of_property_read_bool(node, "ti,keep-vref-on"); > > - pdata->swap_xy = of_property_read_bool(node, "touchscreen-swapped-x-y"); > + pdata->swap_xy = of_property_read_bool(node, "ti,swap-xy"); > + if (pdata->swap_xy) > + dev_notice(dev, "please update device tree to use touchscreen-swapped-x-y"); > + pdata->swap_xy |= of_property_read_bool(node, > + "touchscreen-swapped-x-y"); > > of_property_read_u16(node, "ti,settle-delay-usec", > &pdata->settle_delay_usecs); > -- > 2.5.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v2 6/8] drivers:input:ads7846(+tsc2046): recognise old binding for coordinate flipping Date: Sat, 14 Nov 2015 20:19:06 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "H. Nikolaus Schaller" Cc: Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Russell King , Dmitry Torokhov , Hans Verkuil , Mauro Carvalho Chehab , Sebastian Reichel , Haibo Chen , Andrey Gelman , Igor Grinberg , Aaron Sierra , Krzysztof Kozlowski , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-omap , List for communicating with real GTA04 owners List-Id: devicetree@vger.kernel.org On Fri, Nov 13, 2015 at 2:35 PM, H. Nikolaus Schaller wrote: > By this patch we still recognise the old binding ti,swap-xy in parallel to > the common binding touchscreen-swapped-x-y. This keeps compatibility > to older (out-of-tree) device tree binaries. > > We do this in a separate patch so that it can be easily reverted in the > future to retire the old API. A notice is printed to remind developers > of using old API. > > We also fix the bindings name for all in-tree device tree sources in > a separate patch. This one and patch 5 should be combined, so the series is bisectable. Rob > > Signed-off-by: H. Nikolaus Schaller > --- > drivers/input/touchscreen/ads7846.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c > index 4525f00..b9896fd 100644 > --- a/drivers/input/touchscreen/ads7846.c > +++ b/drivers/input/touchscreen/ads7846.c > @@ -1259,7 +1259,11 @@ static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev) > of_property_read_u16(node, "ti,vref-mv", &pdata->vref_mv); > pdata->keep_vref_on = of_property_read_bool(node, "ti,keep-vref-on"); > > - pdata->swap_xy = of_property_read_bool(node, "touchscreen-swapped-x-y"); > + pdata->swap_xy = of_property_read_bool(node, "ti,swap-xy"); > + if (pdata->swap_xy) > + dev_notice(dev, "please update device tree to use touchscreen-swapped-x-y"); > + pdata->swap_xy |= of_property_read_bool(node, > + "touchscreen-swapped-x-y"); > > of_property_read_u16(node, "ti,settle-delay-usec", > &pdata->settle_delay_usecs); > -- > 2.5.1 >