From patchwork Tue Oct 30 14:55:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10661227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1C101751 for ; Tue, 30 Oct 2018 16:10:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B5392A895 for ; Tue, 30 Oct 2018 16:10:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 995072A8A5; Tue, 30 Oct 2018 16:10:32 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 488792A899 for ; Tue, 30 Oct 2018 16:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=peI7Wij/fOVOXhU/ecT/HSl10QHC66y1fkvIg29DjEI=; b=CWA 3l77oNf89OLsBEhMPRdKf1oGfcZXlNVz1tKXuwDniOfSX2JZSwl4zwiWb6d2dChehULYY8BtGjma2 49Vj8lzzYnp7uIGJwHHVdEDZ9soYfkl+nbB6kFTWZgLrz7NFCnwktYFWeLUAodbXmLufouJwSGn1k ZPxUgeViSqh2FEdW/NABJkA+NBYHMqEK+AI6pHsyah4r2HQOpMRKZ+wdUxC44/8OgLJDarPp5wdXM ZQapEFVs2jHbqh6qRl+TR90CeoPxfUnNh7dkeprndTtuBSDKeAVHtZpeGoVJZwXWK10eY6kyqJtVq omoW2Q97oJ+jvX0wvE12dVW2n1micyA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHWb8-0002fG-SL; Tue, 30 Oct 2018 16:10:31 +0000 Received: from mail-it1-x144.google.com ([2607:f8b0:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHVu9-0004R3-B9 for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2018 15:26:07 +0000 Received: by mail-it1-x144.google.com with SMTP id d6so8584743itl.4 for ; Tue, 30 Oct 2018 08:25:53 -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; bh=B6nelmiWzVv9Ms36SHf8bfX3KQs/Sfuoyt2iFcGpbl4=; b=QeXtpb+tBozKINn6WMdCQzd7iiveT2tt1eHysZK+nrWxpaBEi43wdZhc7In2QQpopM VzWvXtIFoE7ezfdBoH68zrz3NOcisnAjWOGq+NLwHoivgOOoSKT5/ZgWB+t1sZzRVpjo e0sMz6a41ZX8Hdyjlga3RAvmr+xwQjHDk1j/GrIxK1DyPhO+CNo3COODtppzkvKSAw8b N1m16zKgTBStkG2NLDtSJCneMtwX43n6bXZ6OvX2sQc5a/qvYm9AAhiVAj/yQxKH/WWj nmifQI+WrDlDq9yANPUyMcFQLBSAI4SFU5UjzENwK4TJ+rzY9aMgYtFH+BqrVQtlGus+ PNvQ== 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=B6nelmiWzVv9Ms36SHf8bfX3KQs/Sfuoyt2iFcGpbl4=; b=ej60J7tvLOd0BqOr8DSwaWExulsFg2l7QKb9LTiGgpN/8d4V4UzisKFiRsApz5xaQR MPJeTB64fYDWSCihlJDstmGSBuUu+WjZ+I7800H03JUeNqySAJvrObWbaNsafgUEJ6kw +coQhzU37+jr5HejgcLjHcYScIqLuiWGAFk+eJvSsWBZI9+fNzcBGC28wlvQbMoNqCIu 8s8jZrhDPW7V5CHVxes7Lg17F2hUwys0xPmoEPpZy3ARqgq5a3Xa2YPzmQlE7BgfkHE8 6Myn6Y9OnekaCIiYwbAxjyhJvwFDn7DyRT7zfucfpwRA99/eqGK41lDAkV2hbBQqF+ZQ Mocw== X-Gm-Message-State: AGRZ1gJdWraMdAsx9EmpgRoNZNsIAFcvpp0qqQmceAVcCOjvQpPSQNLh r9G/EIOksN91gl41jJNlN6EqDxIX X-Google-Smtp-Source: AJdET5fCFqtr9vadAbZSrfEnyZKJAE426W4jx9p4r1uZj4qChLF70U1awFIB27PYADHcKNQiFGoGEQ== X-Received: by 2002:a02:8cf9:: with SMTP id n54-v6mr4150551jal.121.1540911313601; Tue, 30 Oct 2018 07:55:13 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id u206-v6sm11185524iod.18.2018.10.30.07.55.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 07:55:12 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V2] regulator: pfuze100-regulator: add coin support to PF0100 Date: Tue, 30 Oct 2018 09:55:07 -0500 Message-Id: <20181030145507.10462-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181030_082606_569204_3CECF80C X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Adam Ford , s.hauer@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, fabio.estevam@nxp.com, shawnguo@kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The driver currently supports coin cell / super cap charging, so this patch extends it to support PF0100. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam --- V2: Rebase from correct branch. V1: Ooops, sorry about the noise. diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index dd41a9bb3f5c..df5df1c495ad 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -370,6 +370,7 @@ static struct pfuze_regulator pfuze100_regulators[] = { PFUZE100_VGEN_REG(PFUZE100, VGEN4, PFUZE100_VGEN4VOL, 1800000, 3300000, 100000), PFUZE100_VGEN_REG(PFUZE100, VGEN5, PFUZE100_VGEN5VOL, 1800000, 3300000, 100000), PFUZE100_VGEN_REG(PFUZE100, VGEN6, PFUZE100_VGEN6VOL, 1800000, 3300000, 100000), + PFUZE100_COIN_REG(PFUZE100, COIN, PFUZE100_COINVOL, 0x7, pfuze100_coin), }; static struct pfuze_regulator pfuze200_regulators[] = { @@ -436,6 +437,7 @@ static struct of_regulator_match pfuze100_matches[] = { { .name = "vgen4", }, { .name = "vgen5", }, { .name = "vgen6", }, + { .name = "coin", }, }; /* PFUZE200 */ diff --git a/include/linux/regulator/pfuze100.h b/include/linux/regulator/pfuze100.h index cb5aecd40f07..331d7d940c7a 100644 --- a/include/linux/regulator/pfuze100.h +++ b/include/linux/regulator/pfuze100.h @@ -33,7 +33,8 @@ #define PFUZE100_VGEN4 12 #define PFUZE100_VGEN5 13 #define PFUZE100_VGEN6 14 -#define PFUZE100_MAX_REGULATOR 15 +#define PFUZE100_COIN 15 +#define PFUZE100_MAX_REGULATOR 16 #define PFUZE200_SW1AB 0 #define PFUZE200_SW2 1