Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1286916imu; Wed, 28 Nov 2018 07:24:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wl48wJbXfUmV/DCtF0hmeMMk1DH4WWtLHRLjunORCrfVDI12IlkAWif/C6gPUCuuHrAyJz X-Received: by 2002:a65:514c:: with SMTP id g12mr33323116pgq.169.1543418645523; Wed, 28 Nov 2018 07:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543418645; cv=none; d=google.com; s=arc-20160816; b=tC1FD2d9DyL++ezUJl+TeO86qE6BicEau6/io0AwOZkQbcVZV4MG9Qon2DdOqqVUF4 NNXIMrQjTP/fqKefV0G0c6rkWJT8jDM3gu9XmT5Xu/B6I9yy6MZqiAIWFiFAbgyp54Ue EJF6ZB+GoVuu3GfBphJ7fs7EN0TeAzgBTwmtilaJzQKZLSunWl6HR4jmhjqppZBVStXv LpNlrNypBnAXjetL252FkAD3g94SAaCk7lNABBacPbfIrSk4iaMk7CgjSGsf87UJ0YlP 9qVvI2d1YsMefTsLz7gMjxZOhbhQ9vyZe+v4+lSPtxfrNa4wp4kZ95gObLOOMLqSrufY SndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dT9fJ6RdJ2AQfkiIxWC7jU0oIYFICL06Vi6j+Aj9ur4=; b=Kpxzz7F4zKLY593ALid4E8M5mdjeiFIdyODPaGKcAkCLtqaVDsXdsGD1czyGecv66c LGlMMukfw8AeIPM12evcoQNH1tWQ4NGqt/pBFRi0ETTp2cfK2nHXh6zF0PSAEOFZ3oJ5 FpmJCH4bIos2HK79YL9XlyjFeNXJ7N+WKQKqqPBtzQS3XvlQfqXhsdLjCf8ANjAP9xz8 5+f8GKtpdjHE5UH0623Q9Q5h1BbSe3rb928cFdKGZOAm0pUuB1rd8HhMhYhGSRpeHByq aN9Wbu9E1RPOfHPjW1A9cGt/ZoYLzi7hmeNsMHtdK07/OHc3j0yFn9IFvWPm+vbi//p5 +v9A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a34-v6si8087491pld.249.2018.11.28.07.23.44; Wed, 28 Nov 2018 07:24:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728663AbeK2CYr (ORCPT + 99 others); Wed, 28 Nov 2018 21:24:47 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:47653 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727726AbeK2CYq (ORCPT ); Wed, 28 Nov 2018 21:24:46 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wASFJLxn002041; Wed, 28 Nov 2018 09:22:39 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail1.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0b-001ae601.pphosted.com with ESMTP id 2ny3xu6pgp-1; Wed, 28 Nov 2018 09:22:39 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail1.cirrus.com (Postfix) with ESMTP id 36200611E127; Wed, 28 Nov 2018 09:22:39 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.408.0; Wed, 28 Nov 2018 15:22:38 +0000 Received: from imbe.wolfsonmicro.main (imbe.wolfsonmicro.main [198.61.95.81]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id wASFMcWg027697; Wed, 28 Nov 2018 15:22:38 GMT Date: Wed, 28 Nov 2018 15:22:38 +0000 From: Charles Keepax To: Linus Walleij CC: Liam Girdwood , Mark Brown , , Bartosz Golaszewski Subject: Re: [PATCH 00/10] Regulator ena_gpiod fixups Message-ID: <20181128152238.GV16508@imbe.wolfsonmicro.main> References: <20181128104350.31902-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20181128104350.31902-1-linus.walleij@linaro.org> User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=722 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811280135 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 28, 2018 at 11:43:40AM +0100, Linus Walleij wrote: > drivers/gpio/gpiolib.h | 6 ----- > drivers/regulator/da9211-regulator.c | 4 +-- > drivers/regulator/fixed.c | 4 ++- > drivers/regulator/lm363x-regulator.c | 8 ++++-- > drivers/regulator/lp8788-ldo.c | 4 ++- > drivers/regulator/max77686-regulator.c | 3 +-- > drivers/regulator/max8952.c | 8 +++--- > drivers/regulator/max8973-regulator.c | 12 ++++++--- > drivers/regulator/s5m8767.c | 37 ++++++++++++++++++-------- > drivers/regulator/tps65090-regulator.c | 10 +++---- > include/linux/gpio/consumer.h | 13 +++++++++ > 11 files changed, 72 insertions(+), 37 deletions(-) It looks like the patches are assuming the regulator core, doesn't free the GPIO on an error, however that is not true in all cases. If only a single regulator has requested the GPIO then all the error paths after the call to regulator_ena_gpio_request in regulator_register will free the GPIO. Although this is not the case if more than one regulator has requested the GPIO. Thanks, charles