Received: by 10.223.185.116 with SMTP id b49csp2203119wrg; Thu, 15 Feb 2018 08:03:29 -0800 (PST) X-Google-Smtp-Source: AH8x224t0wTQuwnq0KCv1muMDLmRDKUQhnVAT3INuqVLa7m6mk6o85xN5fJJ+uHFZ+YzSYOWkHFk X-Received: by 10.99.97.81 with SMTP id v78mr2596538pgb.243.1518710609167; Thu, 15 Feb 2018 08:03:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518710609; cv=none; d=google.com; s=arc-20160816; b=KNZ39/EbngLNo9DCmu/TJZiiGwHnEtu0EKjAy6xfmwTxez8/s5sA+YyKpBamtPEvqI 8vpfnq/6uaduAFheiaJa3QUTAW/iLVij+AcbLwCW7Acd8/xpzAq9jcW26g2I0qwDXcMa dxwgbC/Oi9AKUcZjgc1OIo0acgb6PzMxxEB+qKbDr4sR0J+cHG8YB9VTbfp0O7VFw8jg 8h0e33ptanVBaDQwyWNCGIOY2913ZBwFoPue/Rmr8u6edUDYWNSMxYq0r07gHRtxDVnQ I08GFMmBUyc+uvrfYgTcGqAgoTfZ4S/szuWpcHS/4tJkJaXj2jYhYusV+UrXrYP73Ko1 pUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3q0/9ThgcQmtX2lv2Ue1NyzcD1AbznGC3Sk4XznoDr0=; b=kf0gp8un+M6X5CZbWYAuj2lq4ZV/Ad7Hz8Cd72xw0QE7f4XXc35cahM80JDdU8tFf6 4qlLRr4sMEbD3unT7uFbbEUCN9FEgRUMX+MI0nCsSvA43XxKdKBRyPhbw15gxZpb1gOg 0KrZntjcLJ7/AUfZiu6H5+urO9mPpr+ZH3qv46besmwogVo76sUBaSd3LAL1brRieb/V ezsvxXmDL5cPYGmjsMpbsyvzyvNq6rAzu15CR/rbNCAAQMOIEM70XohQO2N3/i3cM23r D4yQnuEKQA+qEwyEjuhCVI6wg4kZ/7b/dqrTxFaKetRwFEiCs/muCPtDVnZxV5PYFjKg OEhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c137si2591533pga.513.2018.02.15.08.02.59; Thu, 15 Feb 2018 08:03:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424764AbeBOPqx (ORCPT + 99 others); Thu, 15 Feb 2018 10:46:53 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35960 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424685AbeBOPqv (ORCPT ); Thu, 15 Feb 2018 10:46:51 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5FFF5FF2; Thu, 15 Feb 2018 15:46:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Peter Rosin Subject: [PATCH 4.15 180/202] pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping Date: Thu, 15 Feb 2018 16:18:00 +0100 Message-Id: <20180215151722.282779075@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Rosin commit b930151e5b55a0e62a3aad06876de891ac980471 upstream. Without such a range, gpiolib fails with -EPROBE_DEFER, pending the addition of the range. So, without a range, gpiolib will keep deferring indefinitely. Fixes: 9e80f9064e73 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver") Fixes: e10f72bf4b3e ("gpio: gpiolib: Generalise state persistence beyond sleep") Suggested-by: Linus Walleij Signed-off-by: Peter Rosin Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/pinctrl-sx150x.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/pinctrl/pinctrl-sx150x.c +++ b/drivers/pinctrl/pinctrl-sx150x.c @@ -1193,6 +1193,11 @@ static int sx150x_probe(struct i2c_clien if (ret) return ret; + ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev), + 0, 0, pctl->data->npins); + if (ret) + return ret; + /* Add Interrupt support if an irq is specified */ if (client->irq > 0) { pctl->irq_chip.name = devm_kstrdup(dev, client->name,