Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3036290imm; Mon, 10 Sep 2018 10:00:49 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda5wTczeOY0Exc2bjWbDMB6g5+R8mV2NMxA8T+CaJ7fO099f4RowJC5mwHjJYPCK7n0f9Tu X-Received: by 2002:a17:902:f096:: with SMTP id go22mr23419131plb.183.1536598849565; Mon, 10 Sep 2018 10:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536598849; cv=none; d=google.com; s=arc-20160816; b=w2zSU2gX+U2Ybm+77lCB2VHeZVHhBl8TqdXFov3hGX6a2qtWwHGKtNfDd5EuPOITVZ za/D8A/EYLN9N/IguV8nRL6hipX7B6Zva2GhQ4JHxebwy4EjxhCHT/EOKzRAL/V6JeRZ 9MTgtz2OyL1M7apmrpWhvv2BFjAdbxIJTtnkiMmgevm2ZSwH1iFwDKYzNSMFycenCrfK batsMQdAPWuc+qr6DBY2V1QcpOqAYZNGA7oYCv9RwS4E6ySvrcikLZYq30ln3CRH2vx0 yp4YtT6kFzwAHJK7KutWncjk4HsbkMVA4CHOuEdPEh131aaQYBzn37DvuCOvCYmM6qmv o2YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e5BKtTLrTCHfcmFaAzlx61dPaZ6ZBXaTF5ZmiyXBuLU=; b=M/PlDX3V6Oo268t3QYPKd2CGD8oy27+S5oQdQ4SSIZwgRF7HsQAnXZwztYqgNdvSws tRg2Tgdh54Cdoq/Yg3Uc90eCmz/8BugmoR4GsD3KaJzCiSAJaE1ImooC1AisR6vTOzRE rbbk7wr9Lx32AA4PxnnYmqimq8mBhwxZIwQI1VgFgDmCBlO6KOY3J9Vl5YX/BlzmSi1T ydTSK8Aizq+3FMEgsda66HvoCnBnN6l8pnMCn/WSonG/Cf2c9YfIle9uUpITnN6LM+GM ZAPbtjKMrMtoGNcheaaZAAGch9kEY5CZUd8QY+TdpUN0KiIAKrNurMPk1Z5MZAS3+U9x 7P7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="DW/yTjGe"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t190-v6si19167814pfb.344.2018.09.10.10.00.28; Mon, 10 Sep 2018 10:00:49 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="DW/yTjGe"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728436AbeIJVzP (ORCPT + 99 others); Mon, 10 Sep 2018 17:55:15 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37354 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728167AbeIJVzP (ORCPT ); Mon, 10 Sep 2018 17:55:15 -0400 Received: by mail-lf1-f68.google.com with SMTP id j8-v6so18011688lfb.4 for ; Mon, 10 Sep 2018 10:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e5BKtTLrTCHfcmFaAzlx61dPaZ6ZBXaTF5ZmiyXBuLU=; b=DW/yTjGeX23LXavqa/G/1u7E2B1wld+YVDgWkRtya3hfFLlu5tU/jzCrhGrM+8OFIq S740x3jAw5X1Ew5owDkR7bsH7DsH/OqIppm1arAUyqQYuAtdjpRSL4LWcAWgLVcwH60d ADY/S43QveDduzFwOxLRKlUbo6XLBPtepwOg+vgMHkkW+HeaQhdHYN2pe1joX5f2Fm8W nbxQdnTgWOqlY6agf0cz4EMn13L6I5Ll1mc4xiFxHHrYSsiTi82wR5EbBZIkHtJaTR5e gJxEr1chdab6KhIUE5H5OVhzlmgBK5n8DIQGHmm61awuiJf6BK8xUugtPkJf52IQbJVw yZIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e5BKtTLrTCHfcmFaAzlx61dPaZ6ZBXaTF5ZmiyXBuLU=; b=LX9kPotlOamoAYM6yeefkXKLA3DbaKlRYJJnp52CMOx9U9GacACOKLgsOiZjl+2GGE pYeLSMxrSEQbh2VMBD0fOPEZ6viVap18jj7FLjOedBKANbFjV9crw7PJLaYaTFUtYjGf Ql+iCouKSY8OIMzuvBw0EeSzZBwd9xwlW6+amTDxdEofE06wnVZ6cTDYBDCgKW/y/WT2 Qyn/P1Kd/OvchUD0rkE2pY2gAgjjioO3oqYO/mwsmQce6v9H4Z1DTyxgTYxDI9MK6DWu JVdZ6K8kdOnjMe6nr3g77SHNFMRtQwDc21wSpmGn50Dst3pe+ErxMcoEOgoXX0UvvB/P 3sQw== X-Gm-Message-State: APzg51CBj13+f0LT5DVBZ7pMKbYlb/5IBY06CM2nVsTeCF0AXLMCZqAp DAgVxTwGdGSKPrj7w5+M2us= X-Received: by 2002:a19:e307:: with SMTP id a7-v6mr12882831lfh.125.1536598812948; Mon, 10 Sep 2018 10:00:12 -0700 (PDT) Received: from z50.localnet (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id e30-v6sm2873404ljb.86.2018.09.10.10.00.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 10:00:11 -0700 (PDT) From: Janusz Krzysztofik To: Linus Walleij Cc: Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, Alexander Shiyan , Haojian Zhuang , Aaro Koskinen , Mike Rapoport , Robert Jarzmik , Philipp Zabel , Daniel Mack , Marc Zyngier , Jacopo Mondi , Geert Uytterhoeven , Russell King , Janusz Krzysztofik Subject: Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only Date: Mon, 10 Sep 2018 19:01:31 +0200 Message-ID: <2015775.cKlHUi0ia0@z50> In-Reply-To: <20180906122436.25610-1-linus.walleij@linaro.org> References: <20180906122436.25610-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Thursday, September 6, 2018 2:24:36 PM CEST Linus Walleij wrote: > As we augmented the regulator core to accept a GPIO descriptor instead > of a GPIO number, we can augment the fixed GPIO regulator to look up > and pass that descriptor directly from device tree or board GPIO > descriptor look up tables. > > Some boards just auto-enumerate their fixed regulator platform devices > and I have assumed they get names like "fixed-regulator.0" but it's > pretty hard to guess this. I need some testing from board maintainers to > be sure. Other boards are straight forward, using just plain > "fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the > device ID. > > It seems the da9055 and da9211 has never got around to actually passing > any enable gpio into its platform data (not the in-tree code anyway) so we > can just decide to simply pass a descriptor instead. > > The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named > "*_dummy_supply_device" while it is a very real device backed by a GPIO > line. There is nothing dummy about it at all, so I renamed it with the > infix *_regulator_* as part of this patch set. > > Intel MID portions tested by Andy. > > Cc: Janusz Krzysztofik # OMAP1 > Cc: Alexander Shiyan # i.MX boards user > Cc: Haojian Zhuang # MMP2 maintainer > Cc: Aaro Koskinen # OMAP1 maintainer > Cc: Mike Rapoport # EM-X270 maintainer > Cc: Robert Jarzmik # EZX maintainer > Cc: Philipp Zabel # Magician maintainer > Cc: Daniel Mack # Raumfeld maintainer > Cc: Marc Zyngier # Zeus maintainer > Cc: Jacopo Mondi # SH Ecovec24 > Cc: Geert Uytterhoeven # SuperH pinctrl/GPIO maintainer > Cc: Russell King # SA1100 > Tested-by: Andy Shevchenko # Check the x86 BCM stuff > Acked-by: Tony Lindgren # OMAP1,2,3 maintainer > Signed-off-by: Linus Walleij > --- > ChangeLog v6->v7: > - As the autobuilder churned along, after 24+ hours it was testing > SH and found a bug in the ecovec24 boardfile. It does test a > SH arch byt default, sh7763rdp_defconfig, sadly not this one. > So it discovers more obscure boards in later testing. > - Shaked out this bug too and re-pushed and posted. > ChangeLog v5->v6: > - New code appeared in the OMAP1 AMS delta board that added a > new user of the removed .gpio member. The build robot was first > happy, then came back later and was not happy. > - Fixed up the offending .gpio, now rebuilt for this OMAP1 > board specifically to make sure it really really work now. > ChangeLog v4->v5: > - Rebased on v4.19-rc1 > - Put the OMAP1 AMD delta GPIO table addition in the *TOP* > of the ams_delta_gpio_tables[] so Janusz can add any > new addtions on the *BOTTOM* > - Hopefully we can merge this now. > ChangeLog v3->v4: > - Rebase and adapt the OMAP1 changes for the GPIO descriptor > look-up tables deployed by Janusz. > - Add two calls to add the GPIO descriptor tables properly on > the Super-H Ecovec24 board as pointed out by Geert. > - Go over all patches to board files and make sure we pass > a NULL descriptor instead of an "enable" descriptor. The code > is looking for unnamed GPIOs as the device tree also just pass > gpio[s] = <&foo> so board files also need to use anonymous > GPIOs. > - Fold in an EZX fix from Arnd Bergmann. > - Add Andy's Tested-by tag. > - Send this patch *ALONE* as I realized I need to take smaller > steps so things do not blow up left and right. > ChangeLog v2->v3: > - Resending. > ChangeLog v1->v2: > - Rebase the patch on mainline with Blackfin gone and other changes. > - Fix up the new users that appeared in sa1100 > - Drop some suplus comments in x86. > --- > arch/arm/mach-imx/mach-mx21ads.c | 12 ++++++- > arch/arm/mach-imx/mach-mx27ads.c | 12 ++++++- > arch/arm/mach-mmp/brownstone.c | 12 ++++++- > arch/arm/mach-omap1/board-ams-delta.c | 12 +++++-- > arch/arm/mach-omap2/pdata-quirks.c | 16 ++++++++- > arch/arm/mach-pxa/em-x270.c | 1 - > arch/arm/mach-pxa/ezx.c | 33 ++++++++++++------- > arch/arm/mach-pxa/magician.c | 2 +- > arch/arm/mach-pxa/raumfeld.c | 12 +++++-- > arch/arm/mach-pxa/zeus.c | 23 +++++++++++-- > arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - > arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - > arch/arm/mach-sa1100/assabet.c | 21 ++++++++---- > arch/arm/mach-sa1100/generic.c | 5 +-- > arch/arm/mach-sa1100/generic.h | 3 +- > arch/arm/mach-sa1100/shannon.c | 4 +-- > arch/sh/boards/mach-ecovec24/setup.c | 27 +++++++++++++-- > .../intel-mid/device_libs/platform_bcm43xx.c | 17 ++++++++-- > drivers/regulator/fixed-helper.c | 1 - > drivers/regulator/fixed.c | 33 +++++++++---------- > include/linux/regulator/fixed.h | 3 -- > 21 files changed, 188 insertions(+), 63 deletions(-) For arch/arm/mach-omap1/board-ams-delta.c: Reviewed-by: Janusz Krzysztofik Thanks, Janusz