From patchwork Thu Feb 15 10:02:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10220783 X-Patchwork-Delegate: horms@verge.net.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14B726055C for ; Thu, 15 Feb 2018 10:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 008D029111 for ; Thu, 15 Feb 2018 10:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E915B29113; Thu, 15 Feb 2018 10:02:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56C1A29112 for ; Thu, 15 Feb 2018 10:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755263AbeBOKCW (ORCPT ); Thu, 15 Feb 2018 05:02:22 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:40300 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755240AbeBOKCU (ORCPT ); Thu, 15 Feb 2018 05:02:20 -0500 Received: by mail-wr0-f193.google.com with SMTP id o76so2713382wrb.7 for ; Thu, 15 Feb 2018 02:02:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=vvUhghOAEgXGV5FFW3yiYaXYNj03siy8hmPiZu40ZMA=; b=iOb5ROAcPcDpjtvLIpa+DCy4IFYoR6+GTud7dLTQvxOUg9GL3K1QEUUs7NzAooXLXs TJsj8GV+yVt7R7k9NnbhbEmB0vahjjKIGaFYwoHBMYFPZqqcK1z8tzI6E2ZReZ5BYCrZ tbRNoC5RBZLBvtwCiMRQwdp7AqQGDG/BLc6IJ12zNEEBhLVGvn0hGGfd2clIsHL5PC3d 8h9q4JuLd7E53K2UjoOIOhLqenJvX/0/YQkEeaEdhMb3sOyp/XT3gxWnEBjrbc7QFhxk oBSo/7fT6fIrif9Og1E76aTV8zSitjsRFq7WJSeXi2Si2rkJQkluiRmfBi006ibJWV5L ZuKA== 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; bh=vvUhghOAEgXGV5FFW3yiYaXYNj03siy8hmPiZu40ZMA=; b=cRmAlPZYwxNAOkFscd1SvCSIC3diQi83F8StdxDWNFOZAzcbV9NojYhmqFPqk4fsfE NTi8xugJj0L9cqxaxu9+LIdx/LLO+G3+vv84vHNcPecwKRnUG64xEihGz8CX9jsvi+15 Y2I7pIWyt+6ZbysL0PjJREtKmLdTf9bSo6AmfXDLelDYqkyie4x3zi2euqGbAdZS3omC LqSF18wc0VSgt4MqPj8JAGa8RZl4nESzBU0+JDU6F61ysBhbY4D9tyauXWKNUIpcPwOi 1ddPVyFdHpzLgQRRFCPCAx7EnKcFD+pB1FOurRz77wkxN2aEyAhCerPpFlvkTne4DpAT n+HQ== X-Gm-Message-State: APf1xPBr0bd8W/IpvlYQrtxiI6qeRIA5dbxgkBtpVx0HgKvautUgsIde xyoyHA0ee/bX/fnwYc4kmed7FdLN X-Google-Smtp-Source: AH8x227JCwy7VYCrI86LovYWvHWZgIF1XAMIdn4IbTzjJMJwDVuKIR0NdpHOH6nFS+jHfEnfskljAQ== X-Received: by 10.223.135.178 with SMTP id b47mr1920032wrb.108.1518688938659; Thu, 15 Feb 2018 02:02:18 -0800 (PST) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id v72sm12899857wmd.12.2018.02.15.02.02.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 02:02:17 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Marek Vasut , Geert Uytterhoeven , Kuninori Morimoto , Simon Horman , Wolfram Sang Subject: [PATCH V2] ARM: shmobile: stout: enable R-Car Gen2 regulator quirk Date: Thu, 15 Feb 2018 11:02:08 +0100 Message-Id: <20180215100208.24646-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.15.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Regulator setup is suboptimal on H2 Stout too. The Stout newly has two DA9210 regulators, so the quirk is extended to handle another DA9210 at i2c address 0x70. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Kuninori Morimoto Cc: Simon Horman Cc: Wolfram Sang Acked-by: Wolfram Sang --- V2: - Handle another DA9210 at 0x70 - Drop explicit board list from the leading comment in the file --- arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c index 44438f344dc8..8324f9820fde 100644 --- a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +++ b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c @@ -1,9 +1,9 @@ /* * R-Car Generation 2 da9063/da9210 regulator quirk * - * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and - * da9210 regulators. Both regulators have their interrupt request lines tied - * to the same interrupt pin (IRQ2) on the SoC. + * Certain Gen2 development boards have an da9063 and one or more da9210 + * regulators. All of these regulators have their interrupt request lines + * tied to the same interrupt pin (IRQ2) on the SoC. * * After cold boot or da9063-induced restart, both the da9063 and da9210 seem * to assert their interrupt request lines. Hence as soon as one driver @@ -59,6 +59,10 @@ static struct i2c_msg da9xxx_msgs[2] = { .addr = 0x68, .len = ARRAY_SIZE(da9210_irq_clr), .buf = da9210_irq_clr, + }, { + .addr = 0x70, + .len = ARRAY_SIZE(da9210_irq_clr), + .buf = da9210_irq_clr, }, }; @@ -85,7 +89,8 @@ static int regulator_quirk_notify(struct notifier_block *nb, dev_dbg(dev, "Detected %s\n", client->name); if ((client->addr == 0x58 && !strcmp(client->name, "da9063")) || - (client->addr == 0x68 && !strcmp(client->name, "da9210"))) { + (client->addr == 0x68 && !strcmp(client->name, "da9210")) || + (client->addr == 0x70 && !strcmp(client->name, "da9210"))) { int ret; dev_info(&client->dev, "clearing da9063/da9210 interrupts\n"); @@ -118,6 +123,7 @@ static int __init rcar_gen2_regulator_quirk(void) if (!of_machine_is_compatible("renesas,koelsch") && !of_machine_is_compatible("renesas,lager") && + !of_machine_is_compatible("renesas,stout") && !of_machine_is_compatible("renesas,gose")) return -ENODEV;