Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbbFXPjW (ORCPT ); Wed, 24 Jun 2015 11:39:22 -0400 Received: from cpanel09.rubas.ch ([195.182.222.79]:58403 "EHLO cpanel09.tophost.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbbFXPjO (ORCPT ); Wed, 24 Jun 2015 11:39:14 -0400 Message-ID: <1435160348.12060.7.camel@bitron.ch> Subject: Re: [PATCH 2/3] ti-st: st_kim: fix nshutdown_gpio in get_platform_data From: =?ISO-8859-1?Q?J=FCrg?= Billeter To: Peter Hurley Cc: Greg Kroah-Hartman , Gigi Joseph , Colin Ian King , linux-kernel@vger.kernel.org Date: Wed, 24 Jun 2015 17:39:08 +0200 In-Reply-To: <558ACD67.9050704@hurleysoftware.com> References: <1435141446-27236-1-git-send-email-j@bitron.ch> <1435141446-27236-2-git-send-email-j@bitron.ch> <558ACD67.9050704@hurleysoftware.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel09.tophost.ch X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - bitron.ch X-Get-Message-Sender-Via: cpanel09.tophost.ch: authenticated_id: juerg@bitron.ch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1176 Lines: 29 On Wed, 2015-06-24 at 11:31 -0400, Peter Hurley wrote: > On 06/24/2015 06:24 AM, Jürg Billeter wrote: > > @@ -761,8 +762,14 @@ static struct ti_st_plat_data > > *get_platform_data(struct device *dev) > > dt_property = of_get_property(np, "dev_name", &len); > > if (dt_property) > > memcpy(&dt_pdata->dev_name, dt_property, len); > > - of_property_read_u32(np, "nshutdown_gpio", > > - &dt_pdata->nshutdown_gpio); > > + > > + gpio = of_get_named_gpio(np, "nshutdown_gpio", 0); > > NAK. This breaks existing dtbs, since the format is not the same. Isn't the existing code completely broken as there is no predictable GPIO numbering in general? There is also no documentation or use of that device tree property in the kernel tree, as far as I can tell. Do you have a suggestion how to fix this without breaking existing dtbs? Do we need to introduce a second property and support both in the driver? Regards, Jürg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/