From patchwork Mon Oct 30 19:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13440849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41944C00142 for ; Mon, 30 Oct 2023 19:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=06Ylylavdhw0cRhufyCs7lbPpONTAry4WoDPoHcEgD0=; b=MopfcyeCy7cSjv YMnAzuKesT7+bFUnJ/9ovqDjYIi80uigEvuuU7tLDOx23R40yU0TAuDQLIn7dz5eSyf30RsiZmxcu T438cCnAlyHtUBk1lvauBiAUctrtupUz5KbNVTvImENcL4fL0HECdUEobxRD6t2+a6wGuWDGGv4pP 03rgx//ASHoh32KKEsZ+f9lMQ86C1QMTqRV8vkv/426O4T1qhiqucRBckd9V6hbNooo1viyUSwEvv +rV4NJKummwf1Oat1uYydNQUZo/SvJD1ywHEmiJyg0nfHikLqyfXIfo03tUWq00rrGkO+PzZNEncf we18fQ/l51+gcPYBnvdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qxY9D-003xLE-1K; Mon, 30 Oct 2023 19:42:03 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qxY97-003xHC-1I for linux-arm-kernel@lists.infradead.org; Mon, 30 Oct 2023 19:41:59 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507e85ebf50so6833935e87.1 for ; Mon, 30 Oct 2023 12:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698694913; x=1699299713; darn=lists.infradead.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=VTc2Bm66zeu7VMhnba934MJuAMnYkPtdiaYlT2VVRZcnFSC+Q6HvugmzauC7PHSamG eBGlHHRnSKHz3ZRXgU81smm691WtItMAY/n1KBK+BhmgMWsia4WTYwHnl59MYLfIFOuj UiGWZkadOQLHiKZTUBBqrL1w2UGrzgQ237eHxK9R25H2xHJxO9EvhYHC6qtlwEn+W5fO fSrhDsqrkZIYXGE9XSguoB9kEKmNjJFruwDr8cQ4yuWXyldCWHMxP5ah3sjHtpCR/tUH cCGheG9b41nV+ldj0mYCf6rMAh5v6Ec+gDDAnLCmMmuXHYr1arRP2ytCc01RsErnZo2n 5dxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698694913; x=1699299713; 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=wx+wgt+8L1D14mM8K5sxfw4y9g8WcHZ8t8VH6RGTuYZTXiOEgMuBiWD+rkObizCG8v hnDeVPvcZIzjkIyawcwb/wryEC3ROSKsMsbCVtsbSmMkH9bdG2rXccNy8zO2AqZJ0Csc I9ya7zgR5s6zGd0dKg2yq1/DD6em9EDPPfb6JF4LNSvqhh+qAdL2qDVP7Evj4vjEfvHA 7Y4gnHHH4ZiXEwLBI9njOu/fX7UD6/tdatBxpzX9igOcie8O3wZx8yDf+hKj1Ko8QCld B/Ic+vJJW7XrJeB3BLcUrLnCSZ8Vi4Ga03Zj2r/gwv6oHxTQntJFdmPrensduNLpi041 ttAA== X-Gm-Message-State: AOJu0Yy6u9+cOcOv1H4Ra0dJ7/baA55zVLMQyloReyeGd/pTxhFtwQZy /uiETLS0L6I50si//04MDDo= X-Google-Smtp-Source: AGHT+IG2fWFrzQ7B0lInjhmgmbToxPfdp7+yDm6KzfqHnJxQ2uEdEnXUVAgy07VZr7nveCyziVdYyA== X-Received: by 2002:ac2:55aa:0:b0:505:98a8:fa39 with SMTP id y10-20020ac255aa000000b0050598a8fa39mr7131537lfg.18.1698694913087; Mon, 30 Oct 2023 12:41:53 -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 m10-20020ac2428a000000b005057184ae62sm1527802lfh.96.2023.10.30.12.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 12:41:52 -0700 (PDT) From: Artur Weber Date: Mon, 30 Oct 2023 20:41:46 +0100 Subject: [PATCH v2 4/6] mfd: bcm590xx: Add compatible for BCM59054 MIME-Version: 1.0 Message-Id: <20231030-bcm59054-v2-4-5fa4011aa5ba@gmail.com> References: <20231030-bcm59054-v2-0-5fa4011aa5ba@gmail.com> In-Reply-To: <20231030-bcm59054-v2-0-5fa4011aa5ba@gmail.com> To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Liam Girdwood , Mark Brown Cc: Stanislav Jakubek , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Artur Weber X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698694906; l=1936; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=GaZAs1pHOm9g/5MXQbdGtce8n4JeiRhmO5EZ2BKjVhk=; b=AD/A0qChov9/UuR+aIEJvoDFuKb6QmCISZGXUmJiKCiDvIrqzPckzH/r1BjXFz0+orh2oldKb oaNuSd6xQuBALsUkb2Zqe1I8ORVi7y7c2fmGpP6RT8VIQpNkC9hgNzX X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231030_124157_441953_1FE55604 X-CRM114-Status: GOOD ( 18.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/mfd/bcm590xx.c | 5 ++++- include/linux/mfd/bcm590xx.h | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 #include +/* 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;