From patchwork Fri Feb 19 22:39:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 1442492 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Dj6g448ffz9sSC for ; Sat, 20 Feb 2021 10:07:44 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbhBSXH0 (ORCPT ); Fri, 19 Feb 2021 18:07:26 -0500 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:36927 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbhBSXHZ (ORCPT ); Fri, 19 Feb 2021 18:07:25 -0500 Received: from [77.244.183.192] (port=64500 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.93) (envelope-from ) id 1lDEQi-009zHK-65; Fri, 19 Feb 2021 23:39:20 +0100 From: Luca Ceresoli To: Lee Jones Cc: Luca Ceresoli , Linus Walleij , Bartosz Golaszewski , Liam Girdwood , Mark Brown , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] mfd: lp87565: fix typo in define names Date: Fri, 19 Feb 2021 23:39:08 +0100 Message-Id: <20210219223910.1831-1-luca@lucaceresoli.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org "GOIO" should be "GPIO" here. Signed-off-by: Luca Ceresoli Acked-by: Bartosz Golaszewski --- drivers/gpio/gpio-lp87565.c | 6 +++--- include/linux/mfd/lp87565.h | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/gpio/gpio-lp87565.c b/drivers/gpio/gpio-lp87565.c index e1244520cf7d..fcde6708b5df 100644 --- a/drivers/gpio/gpio-lp87565.c +++ b/drivers/gpio/gpio-lp87565.c @@ -123,14 +123,14 @@ static int lp87565_gpio_set_config(struct gpio_chip *gc, unsigned int offset, return regmap_update_bits(gpio->map, LP87565_REG_GPIO_CONFIG, BIT(offset + - __ffs(LP87565_GOIO1_OD)), + __ffs(LP87565_GPIO1_OD)), BIT(offset + - __ffs(LP87565_GOIO1_OD))); + __ffs(LP87565_GPIO1_OD))); case PIN_CONFIG_DRIVE_PUSH_PULL: return regmap_update_bits(gpio->map, LP87565_REG_GPIO_CONFIG, BIT(offset + - __ffs(LP87565_GOIO1_OD)), 0); + __ffs(LP87565_GPIO1_OD)), 0); default: return -ENOTSUPP; } diff --git a/include/linux/mfd/lp87565.h b/include/linux/mfd/lp87565.h index d44ddfb6bb63..2620554f357a 100644 --- a/include/linux/mfd/lp87565.h +++ b/include/linux/mfd/lp87565.h @@ -222,20 +222,20 @@ enum lp87565_device_type { #define LP87565_GPIO2_SEL BIT(1) #define LP87565_GPIO1_SEL BIT(0) -#define LP87565_GOIO3_OD BIT(6) -#define LP87565_GOIO2_OD BIT(5) -#define LP87565_GOIO1_OD BIT(4) -#define LP87565_GOIO3_DIR BIT(2) -#define LP87565_GOIO2_DIR BIT(1) -#define LP87565_GOIO1_DIR BIT(0) - -#define LP87565_GOIO3_IN BIT(2) -#define LP87565_GOIO2_IN BIT(1) -#define LP87565_GOIO1_IN BIT(0) - -#define LP87565_GOIO3_OUT BIT(2) -#define LP87565_GOIO2_OUT BIT(1) -#define LP87565_GOIO1_OUT BIT(0) +#define LP87565_GPIO3_OD BIT(6) +#define LP87565_GPIO2_OD BIT(5) +#define LP87565_GPIO1_OD BIT(4) +#define LP87565_GPIO3_DIR BIT(2) +#define LP87565_GPIO2_DIR BIT(1) +#define LP87565_GPIO1_DIR BIT(0) + +#define LP87565_GPIO3_IN BIT(2) +#define LP87565_GPIO2_IN BIT(1) +#define LP87565_GPIO1_IN BIT(0) + +#define LP87565_GPIO3_OUT BIT(2) +#define LP87565_GPIO2_OUT BIT(1) +#define LP87565_GPIO1_OUT BIT(0) /* Number of step-down converters available */ #define LP87565_NUM_BUCK 6 From patchwork Fri Feb 19 22:39:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 1442491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Dj6g41X9mz9sBJ for ; Sat, 20 Feb 2021 10:07:43 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbhBSXGm (ORCPT ); Fri, 19 Feb 2021 18:06:42 -0500 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:44038 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhBSXGm (ORCPT ); Fri, 19 Feb 2021 18:06:42 -0500 X-Greylist: delayed 1598 seconds by postgrey-1.27 at vger.kernel.org; Fri, 19 Feb 2021 18:06:41 EST Received: from [77.244.183.192] (port=64500 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.93) (envelope-from ) id 1lDEQi-009zHK-Hu; Fri, 19 Feb 2021 23:39:20 +0100 From: Luca Ceresoli To: Lee Jones Cc: Luca Ceresoli , Linus Walleij , Bartosz Golaszewski , Liam Girdwood , Mark Brown , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] mfd: lp87565: remove unused define Date: Fri, 19 Feb 2021 23:39:09 +0100 Message-Id: <20210219223910.1831-2-luca@lucaceresoli.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210219223910.1831-1-luca@lucaceresoli.net> References: <20210219223910.1831-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This define appears incorrect, but it is completely unused so it can be removed. Signed-off-by: Luca Ceresoli --- include/linux/mfd/lp87565.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/mfd/lp87565.h b/include/linux/mfd/lp87565.h index 2620554f357a..a8799ae50dcf 100644 --- a/include/linux/mfd/lp87565.h +++ b/include/linux/mfd/lp87565.h @@ -237,9 +237,6 @@ enum lp87565_device_type { #define LP87565_GPIO2_OUT BIT(1) #define LP87565_GPIO1_OUT BIT(0) -/* Number of step-down converters available */ -#define LP87565_NUM_BUCK 6 - enum LP87565_regulator_id { /* BUCK's */ LP87565_BUCK_0, From patchwork Fri Feb 19 22:39:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 1442493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Dj6hh722mz9sBJ for ; Sat, 20 Feb 2021 10:09:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229755AbhBSXIP (ORCPT ); Fri, 19 Feb 2021 18:08:15 -0500 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:43814 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhBSXII (ORCPT ); Fri, 19 Feb 2021 18:08:08 -0500 Received: from [77.244.183.192] (port=64500 helo=melee.fritz.box) by hostingweb31.netsons.net with esmtpa (Exim 4.93) (envelope-from ) id 1lDEQi-009zHK-Ux; Fri, 19 Feb 2021 23:39:21 +0100 From: Luca Ceresoli To: Lee Jones Cc: Luca Ceresoli , Linus Walleij , Bartosz Golaszewski , Liam Girdwood , Mark Brown , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] mfd: lp87565: move LP87565_regulator_id to .c file Date: Fri, 19 Feb 2021 23:39:10 +0100 Message-Id: <20210219223910.1831-3-luca@lucaceresoli.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210219223910.1831-1-luca@lucaceresoli.net> References: <20210219223910.1831-1-luca@lucaceresoli.net> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This enum is used only internally to the regulator driver for buck indexes. Signed-off-by: Luca Ceresoli --- drivers/regulator/lp87565-regulator.c | 11 +++++++++++ include/linux/mfd/lp87565.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/lp87565-regulator.c b/drivers/regulator/lp87565-regulator.c index eeab9d3c824b..d059ae85047a 100644 --- a/drivers/regulator/lp87565-regulator.c +++ b/drivers/regulator/lp87565-regulator.c @@ -11,6 +11,17 @@ #include +enum LP87565_regulator_id { + /* BUCK's */ + LP87565_BUCK_0, + LP87565_BUCK_1, + LP87565_BUCK_2, + LP87565_BUCK_3, + LP87565_BUCK_10, + LP87565_BUCK_23, + LP87565_BUCK_3210, +}; + #define LP87565_REGULATOR(_name, _id, _of, _ops, _n, _vr, _vm, \ _er, _em, _ev, _delay, _lr, _cr) \ [_id] = { \ diff --git a/include/linux/mfd/lp87565.h b/include/linux/mfd/lp87565.h index a8799ae50dcf..94cb581af34b 100644 --- a/include/linux/mfd/lp87565.h +++ b/include/linux/mfd/lp87565.h @@ -237,17 +237,6 @@ enum lp87565_device_type { #define LP87565_GPIO2_OUT BIT(1) #define LP87565_GPIO1_OUT BIT(0) -enum LP87565_regulator_id { - /* BUCK's */ - LP87565_BUCK_0, - LP87565_BUCK_1, - LP87565_BUCK_2, - LP87565_BUCK_3, - LP87565_BUCK_10, - LP87565_BUCK_23, - LP87565_BUCK_3210, -}; - /** * struct LP87565 - state holder for the LP87565 driver * @dev: struct device pointer for MFD device