Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932848AbbFWNVE (ORCPT ); Tue, 23 Jun 2015 09:21:04 -0400 Received: from mga03.intel.com ([134.134.136.65]:33219 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754679AbbFWNUq convert rfc822-to-8bit (ORCPT ); Tue, 23 Jun 2015 09:20:46 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,665,1427785200"; d="scan'208";a="512931587" From: "Tirdea, Irina" To: Dmitry Torokhov CC: Bastien Nocera , Mark Rutland , "linux-input@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , "Purdila, Octavian" Subject: RE: [PATCH v2 4/8] input: goodix: reset device at init Thread-Topic: [PATCH v2 4/8] input: goodix: reset device at init Thread-Index: AQHQot3QEfpWE6TJYUGqcngIfDBOW5259y9w Date: Tue, 23 Jun 2015 13:20:39 +0000 Deferred-Delivery: Tue, 23 Jun 2015 13:20:00 +0000 Message-ID: <1F3AC3675D538145B1661F571FE1805F2F061632@irsmsx105.ger.corp.intel.com> References: <1433774273-23103-1-git-send-email-irina.tirdea@intel.com> <1433774273-23103-5-git-send-email-irina.tirdea@intel.com> <20150609175756.GI6338@dtor-ws> In-Reply-To: <20150609175756.GI6338@dtor-ws> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1990 Lines: 55 > -----Original Message----- > From: linux-input-owner@vger.kernel.org [mailto:linux-input-owner@vger.kernel.org] On Behalf Of Dmitry Torokhov > Sent: 09 June, 2015 20:58 > To: Tirdea, Irina > Cc: Bastien Nocera; Mark Rutland; linux-input@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Rob > Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian > Subject: Re: [PATCH v2 4/8] input: goodix: reset device at init > > Hi Irina, > > On Mon, Jun 08, 2015 at 05:37:49PM +0300, Irina Tirdea wrote: > > +static int goodix_get_gpio_config(struct goodix_ts_data *ts) > > +{ > > + struct device *dev; > > + struct gpio_desc *gpiod; > > + int ret; > > + > > + if (!ts->client) > > + return -EINVAL; > > + dev = &ts->client->dev; > > + > > + /* Get interrupt GPIO pin number */ > > + gpiod = devm_gpiod_get(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN); > > + if (IS_ERR(gpiod)) { > > + ret = PTR_ERR(gpiod); > > + dev_err(dev, "Failed to get %s GPIO: %d\n", > > + GOODIX_GPIO_INT_NAME, ret); > > You need to handle -EPROBE_DEFER (suppress error) and especially -ENOENT error > codes, otherwise, as Bastien mentioned, you will break existing DTS. > Yes, I will handle the -EPROBE_DEFER and -ENOENT for devices that might not have these gpio pins connected or declared in ACPI/DTS. Since the following patches depend on these pins, I will bypass the functionality for these devices (suspend/resume, esd, writing config will not be available if gpio pins are not found). Thanks, Irina > Thanks. > > -- > Dmitry > -- > To unsubscribe from this list: send the line "unsubscribe linux-input" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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/