Message ID | 20231030-bcm59054-v1-4-3517f980c1e3@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2462244vqb; Mon, 30 Oct 2023 12:37:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEH0bhynOESsZa1/6kFssGKBnVtv6zo3kskd/EQ0NoS7GsHTFJ5RkYBxXw3cC9K4Sk9EZA4 X-Received: by 2002:a05:6358:52c5:b0:168:ec27:47a1 with SMTP id z5-20020a05635852c500b00168ec2747a1mr14805788rwz.26.1698694640324; Mon, 30 Oct 2023 12:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698694640; cv=none; d=google.com; s=arc-20160816; b=m5t7NQg0qG+770npK9JRbmH4nVMaaq4MsEQ2TmetxPtPitGVLk5HNIa8PPKuMCZmqo WJNkRTv7uat3OfZ15E9XVSVhaiBiTlgRAKfyE+K6NHyGE0jNEFC2sVB20nk2mjcwSCQc HoYwqjzrBmV6gEgth8ksO1CPUug66vlJAw2RvwYaJsrMVejf2/P16MNQkBpdeRnvXQZY Rv50CaYncMWqtdNOdL1WqtSChutaf0dsNfbKXjg2HjXdvQ3O9Rqa1JVno75nz8XKvks2 rTl0Po6U9S+tsWFPE27tu3oMhqakWzy4g83Fzgc8ZwSWdFKvKdiiFiAjAfRERY4fqb5K JbHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=MVGWdNdmpu8vSibrYJC/RZxDG0iblOVJzHPyX+FabSU=; fh=pNQf8kBW3o3Cr/f9RsS2JPU7rcdrv8+HQq3q4Yx0m48=; b=KsNEaGLdN43Zvmr+nSN7yCKJtgOYt9pJlngLP3CTSna5rKrZugZo2dGCHCOTfZcHlU DDuAHfus1+lbo4bDiyGWWfgshgU859Nw09Lj65oMyvPcvtLnmR+4bT1sI4+9O7JDe6sn JiQOgoOqoOChkiwQeOEO1YxcFxYuSQ3CqXHwxczM4RM79o6mtnwtnSW3/7d540On9ZAX 38c1uqbESAIOCo4OLSkCdkbkfkOw8VSvS8BYQ9oPGLUno80FV9qKZKw3tu6ZmlQp6bgL vVjBayJd9FAdT5Oc2JH+pNozi90bAooBefBllmBe6lS91oUXTKzuWVjc0pkNb/uonO/k 8qlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hu3ccR1j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005a9fde46f98si5418147pgk.52.2023.10.30.12.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 12:37:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hu3ccR1j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9B573802C688; Mon, 30 Oct 2023 12:37:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231589AbjJ3ThI (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 32 others); Mon, 30 Oct 2023 15:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbjJ3ThC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 30 Oct 2023 15:37:02 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C04C4EE; Mon, 30 Oct 2023 12:36:58 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50930f126b1so107614e87.3; Mon, 30 Oct 2023 12:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698694617; x=1699299417; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MVGWdNdmpu8vSibrYJC/RZxDG0iblOVJzHPyX+FabSU=; b=hu3ccR1jimNXh2B0ACJGbtYF090Tqi23OaoKu1WQpJ+cPw40xM4N84iUPpurvzGFs2 voNaItV/YTJ4dZQK9KtMcQFOb0uVwMAeRxzUHC2JKZlx0mVki9et+2tEPfo1WUypNNMm 1M0uQtG67JRlG3j+EI8PQJhiTfXsx2/GURav6o9IP4MG2VOrWca3dmhuecbENu1Zk8+h bb5k2ZKuRWV2qa2HkjKMPCbfRaTQ8ZclRsLvNAhNWl0YSnlkZn97zUeTOhbvqV46TwrC E+GkU/lv5cDKcDZS+ZZ5mi8Ftlg2D7tpJJrxpkDHm2YCDUZ7twxmlHXB6KduyFSGRYd5 Vlig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698694617; x=1699299417; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MVGWdNdmpu8vSibrYJC/RZxDG0iblOVJzHPyX+FabSU=; b=W/eGgHA1vLzrGEGyZ1TiHaBJkLzkRxEih9T3l9i4h200tLHClVX94JI59F2iVrYq+Z LhGJCw0iiynoXiqjC88P7KQEjAqHN9wTMa20nbknUka0s3yLAGTOvEr3G1BWZXHSet+w 18U5KzbiG76+YilrjwVHCXZ8Dh+KO4bEDchBSPdniKMwXNBq7GWeb+YH9Qj69zY0zPal ZQ7wgDGeiq6gZ1V4LZdu4N1Z8xFxOcsxw8cia/T1N1NRumUreD5LXjkb3Jgj3QwmZK+P Xv/cpwZ8OcbjEQnIrE+LFGQSy4ZSPtPvYxWJGMjSk2zOCAMPqvJDL+yrxc2Tlvvu/3Tu c+jA== X-Gm-Message-State: AOJu0Yy0prFPlI2ffhHilHWDLJWPjWpmbWGptcnG/aSWEIMrSgspxJgU U0m3sYJ/UgV2BhDMHZdlb3E= X-Received: by 2002:ac2:424f:0:b0:502:9a2c:f766 with SMTP id m15-20020ac2424f000000b005029a2cf766mr7192644lfl.30.1698694616903; Mon, 30 Oct 2023 12:36:56 -0700 (PDT) Received: from hex.my.domain (83.11.208.51.ipv4.supernova.orange.pl. [83.11.208.51]) by smtp.gmail.com with ESMTPSA id a27-20020ac2521b000000b0050482b29ac8sm1510781lfl.31.2023.10.30.12.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 12:36:56 -0700 (PDT) From: Artur Weber <aweber.kernel@gmail.com> Date: Mon, 30 Oct 2023 20:36:41 +0100 Subject: [PATCH 4/6] mfd: bcm590xx: Add compatible for BCM59054 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231030-bcm59054-v1-4-3517f980c1e3@gmail.com> References: <20231030-bcm59054-v1-0-3517f980c1e3@gmail.com> In-Reply-To: <20231030-bcm59054-v1-0-3517f980c1e3@gmail.com> To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Florian Fainelli <florian.fainelli@broadcom.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org> Cc: Stanislav Jakubek <stano.jakubek@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Artur Weber <aweber.kernel@gmail.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698694608; l=1936; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=GaZAs1pHOm9g/5MXQbdGtce8n4JeiRhmO5EZ2BKjVhk=; b=iXnXR/iUSsOy5Qa5LWnXMndbYTWYQ0arqnxQ5RAfnU1nadKV2ZmXXoLfF5IdKOLigzM8FZ/6i NxuD1yo/ADECA98t5VkRwFb8psKKdYFIGg5911KUgycrohoLdBS8NHv X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 30 Oct 2023 12:37:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781210431495346439 X-GMAIL-MSGID: 1781210431495346439 |
Series |
mfd: bcm590xx: Add support for BCM59054
|
|
Commit Message
Artur Weber
Oct. 30, 2023, 7:36 p.m. UTC
The BCM59056 supported by the bcm590xx driver is similar to the
BCM59054 MFD. Add a compatible for it in the driver, in preparation
for adding support for this chip in the bcm590xx regulator driver.
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
drivers/mfd/bcm590xx.c | 5 ++++-
include/linux/mfd/bcm590xx.h | 7 +++++++
2 files changed, 11 insertions(+), 1 deletion(-)
Comments
Hi Artur, kernel test robot noticed the following build warnings: [auto build test WARNING on 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1] url: https://github.com/intel-lab-lkp/linux/commits/Artur-Weber/dt-bindings-mfd-brcm-bcm59056-Convert-to-YAML/20231031-040046 base: 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1 patch link: https://lore.kernel.org/r/20231030-bcm59054-v1-4-3517f980c1e3%40gmail.com patch subject: [PATCH 4/6] mfd: bcm590xx: Add compatible for BCM59054 config: loongarch-randconfig-001-20231031 (https://download.01.org/0day-ci/archive/20231031/202310311110.QsKHR6Ap-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231031/202310311110.QsKHR6Ap-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202310311110.QsKHR6Ap-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/mfd/bcm590xx.c: In function 'bcm590xx_i2c_probe': >> drivers/mfd/bcm590xx.c:53:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 53 | bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev); | ^ vim +53 drivers/mfd/bcm590xx.c 39 40 static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri) 41 { 42 struct bcm590xx *bcm590xx; 43 int ret; 44 45 bcm590xx = devm_kzalloc(&i2c_pri->dev, sizeof(*bcm590xx), GFP_KERNEL); 46 if (!bcm590xx) 47 return -ENOMEM; 48 49 i2c_set_clientdata(i2c_pri, bcm590xx); 50 bcm590xx->dev = &i2c_pri->dev; 51 bcm590xx->i2c_pri = i2c_pri; 52 > 53 bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev); 54 55 bcm590xx->regmap_pri = devm_regmap_init_i2c(i2c_pri, 56 &bcm590xx_regmap_config_pri); 57 if (IS_ERR(bcm590xx->regmap_pri)) { 58 ret = PTR_ERR(bcm590xx->regmap_pri); 59 dev_err(&i2c_pri->dev, "primary regmap init failed: %d\n", ret); 60 return ret; 61 } 62 63 /* Secondary I2C slave address is the base address with A(2) asserted */ 64 bcm590xx->i2c_sec = i2c_new_dummy_device(i2c_pri->adapter, 65 i2c_pri->addr | BIT(2)); 66 if (IS_ERR(bcm590xx->i2c_sec)) { 67 dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n"); 68 return PTR_ERR(bcm590xx->i2c_sec); 69 } 70 i2c_set_clientdata(bcm590xx->i2c_sec, bcm590xx); 71 72 bcm590xx->regmap_sec = devm_regmap_init_i2c(bcm590xx->i2c_sec, 73 &bcm590xx_regmap_config_sec); 74 if (IS_ERR(bcm590xx->regmap_sec)) { 75 ret = PTR_ERR(bcm590xx->regmap_sec); 76 dev_err(&bcm590xx->i2c_sec->dev, 77 "secondary regmap init failed: %d\n", ret); 78 goto err; 79 } 80 81 ret = devm_mfd_add_devices(&i2c_pri->dev, -1, bcm590xx_devs, 82 ARRAY_SIZE(bcm590xx_devs), NULL, 0, NULL); 83 if (ret < 0) { 84 dev_err(&i2c_pri->dev, "failed to add sub-devices: %d\n", ret); 85 goto err; 86 } 87 88 return 0; 89 90 err: 91 i2c_unregister_device(bcm590xx->i2c_sec); 92 return ret; 93 } 94
Hi Artur, kernel test robot noticed the following build warnings: [auto build test WARNING on 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1] url: https://github.com/intel-lab-lkp/linux/commits/Artur-Weber/dt-bindings-mfd-brcm-bcm59056-Convert-to-YAML/20231031-040046 base: 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1 patch link: https://lore.kernel.org/r/20231030-bcm59054-v1-4-3517f980c1e3%40gmail.com patch subject: [PATCH 4/6] mfd: bcm590xx: Add compatible for BCM59054 config: powerpc64-allyesconfig (https://download.01.org/0day-ci/archive/20231106/202311061654.4074XhbV-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231106/202311061654.4074XhbV-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202311061654.4074XhbV-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/mfd/bcm590xx.c:53:26: warning: cast to smaller integer type 'unsigned int' from 'const void *' [-Wvoid-pointer-to-int-cast] 53 | bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. vim +53 drivers/mfd/bcm590xx.c 39 40 static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri) 41 { 42 struct bcm590xx *bcm590xx; 43 int ret; 44 45 bcm590xx = devm_kzalloc(&i2c_pri->dev, sizeof(*bcm590xx), GFP_KERNEL); 46 if (!bcm590xx) 47 return -ENOMEM; 48 49 i2c_set_clientdata(i2c_pri, bcm590xx); 50 bcm590xx->dev = &i2c_pri->dev; 51 bcm590xx->i2c_pri = i2c_pri; 52 > 53 bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev); 54 55 bcm590xx->regmap_pri = devm_regmap_init_i2c(i2c_pri, 56 &bcm590xx_regmap_config_pri); 57 if (IS_ERR(bcm590xx->regmap_pri)) { 58 ret = PTR_ERR(bcm590xx->regmap_pri); 59 dev_err(&i2c_pri->dev, "primary regmap init failed: %d\n", ret); 60 return ret; 61 } 62 63 /* Secondary I2C slave address is the base address with A(2) asserted */ 64 bcm590xx->i2c_sec = i2c_new_dummy_device(i2c_pri->adapter, 65 i2c_pri->addr | BIT(2)); 66 if (IS_ERR(bcm590xx->i2c_sec)) { 67 dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n"); 68 return PTR_ERR(bcm590xx->i2c_sec); 69 } 70 i2c_set_clientdata(bcm590xx->i2c_sec, bcm590xx); 71 72 bcm590xx->regmap_sec = devm_regmap_init_i2c(bcm590xx->i2c_sec, 73 &bcm590xx_regmap_config_sec); 74 if (IS_ERR(bcm590xx->regmap_sec)) { 75 ret = PTR_ERR(bcm590xx->regmap_sec); 76 dev_err(&bcm590xx->i2c_sec->dev, 77 "secondary regmap init failed: %d\n", ret); 78 goto err; 79 } 80 81 ret = devm_mfd_add_devices(&i2c_pri->dev, -1, bcm590xx_devs, 82 ARRAY_SIZE(bcm590xx_devs), NULL, 0, NULL); 83 if (ret < 0) { 84 dev_err(&i2c_pri->dev, "failed to add sub-devices: %d\n", ret); 85 goto err; 86 } 87 88 return 0; 89 90 err: 91 i2c_unregister_device(bcm590xx->i2c_sec); 92 return ret; 93 } 94
diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c index 92eede9a5e61..f5c5fa97ca9a 100644 --- a/drivers/mfd/bcm590xx.c +++ b/drivers/mfd/bcm590xx.c @@ -50,6 +50,8 @@ static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri) bcm590xx->dev = &i2c_pri->dev; bcm590xx->i2c_pri = i2c_pri; + bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev); + bcm590xx->regmap_pri = devm_regmap_init_i2c(i2c_pri, &bcm590xx_regmap_config_pri); if (IS_ERR(bcm590xx->regmap_pri)) { @@ -91,7 +93,8 @@ static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri) } static const struct of_device_id bcm590xx_of_match[] = { - { .compatible = "brcm,bcm59056" }, + { .compatible = "brcm,bcm59054", .data = (void *)BCM59054_TYPE }, + { .compatible = "brcm,bcm59056", .data = (void *)BCM59056_TYPE }, { } }; MODULE_DEVICE_TABLE(of, bcm590xx_of_match); diff --git a/include/linux/mfd/bcm590xx.h b/include/linux/mfd/bcm590xx.h index 6b8791da6119..ed0d8be6387c 100644 --- a/include/linux/mfd/bcm590xx.h +++ b/include/linux/mfd/bcm590xx.h @@ -13,12 +13,19 @@ #include <linux/i2c.h> #include <linux/regmap.h> +/* device types */ +enum { + BCM59054_TYPE, + BCM59056_TYPE, +}; + /* max register address */ #define BCM590XX_MAX_REGISTER_PRI 0xe7 #define BCM590XX_MAX_REGISTER_SEC 0xf0 struct bcm590xx { struct device *dev; + unsigned int device_type; struct i2c_client *i2c_pri; struct i2c_client *i2c_sec; struct regmap *regmap_pri;