From patchwork Mon Oct 30 19:36:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13440841 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 75742C4167D for ; Mon, 30 Oct 2023 19:37:48 +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=euFRsjZfUVHL6q D3EKlZqC2ZTld3fJgrEVeY5cyceJ/aUtIIJEaavov+I7G5QwzU75WpuPgFAUIz75MNcx1hS3BW/DK j2mx+aH6soxI0xmizMKkHpA/jo9GNFi733EermPh4XMCpIs01ODbuvShx77uaQB3XXQzXwBrviQpr VIFp24aQsLGr9VpkVfsDuO2xlr+kdNPzqX76z+JcCgEjM5l+1PKB/AyIX8Smt0MWPFQ9KRbidVY7V LZmCoYlkp3iYDhZ587Md20mq8jnSX7ES/3KDa7Mjl71YhpgrGwx/KH2qeRdEcfBBSf5UeAv7SI4N9 /Eg9glKr4DVZwoLGiA7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qxY4e-003wb4-0b; Mon, 30 Oct 2023 19:37:20 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qxY4K-003wR8-08; Mon, 30 Oct 2023 19:37:01 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5079f6efd64so6819045e87.2; 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=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=gp6ug4JNHUSBW/6mYYpAN8w+b14kTqOBbF/0kcNOirjMNUMFV0VmfpaitpQf+ap/32 fV3kCNlMH005QCnOJVDykXoe9tRPdvUnA6h9YJDbINZ07vsaZX0HoKD0P5TrcWsiohlL vMcIxPAgVfpyYOImK7d3VwVnK1aHLQfdiYZBAT/hvV90/qkaYmPpeCOCz7J4VV7Zebem BbhI2WblCd93IcI1i0QSh8Rc2w75WzTfCAylQW7UPYRds51Htsc0T9tDwjqUVXXkH60/ pFQI7nMBSJe+BbLrYKBzPRFWR1h54nDwz2ln+7LzF4HT4XKEGP8RznL3pDNHQLpNh14M Yyhw== 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=gKQlDxdYAPn03CG7pevChuk2QPg1lwicVPdaiZhYxhAvxIAzJGK4H2nurIU+Gawxh1 MHFxE4mpjy76fV4H9Q1mAWV1OKHBvMUnXJfyTtRi/t89QBa23NBCiUoxPyg5hxsdnttF 0tXicl/Ls37gp17hGeQl3saCM+DxDFCq0gPJP7ZyYfrr8eXNvdi2tiyimeYnW8x/AjOV Xq4xleUWcko5fcRJNMeoUklmwea2/nHRcS46tjIdDyzfLkQ2zJZGa79aIiGSEN/3hTfF sI+577NESoHBZtCcSgNQaKwFRcjwG2N2LXvz3GfS+KMenNjqOAQ1a7joy/DLiyhaVlLO lRAg== X-Gm-Message-State: AOJu0YxQtMzXkPobnLZHIuQOd33+7xQbmYi+iiSB9RITxxm58H4yQStP WEEBpJhIH6xT1PkK+3Ap8wQ= X-Google-Smtp-Source: AGHT+IEFYLc0LWk2+gubsWmVoJUJJhCLxugkEYB/uIxSQB6LHNJIH24jVFny2uBAM3G+f/x8iu3Jjw== 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 Date: Mon, 30 Oct 2023 20:36:41 +0100 Subject: [PATCH 4/6] mfd: bcm590xx: Add compatible for BCM59054 MIME-Version: 1.0 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 , 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-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Artur Weber 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231030_123700_075839_8FFE84AA X-CRM114-Status: GOOD ( 16.86 ) 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;