From patchwork Tue Sep 27 12:19:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 611664 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8682AC6FA83 for ; Tue, 27 Sep 2022 12:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232350AbiI0MVR (ORCPT ); Tue, 27 Sep 2022 08:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232347AbiI0MUv (ORCPT ); Tue, 27 Sep 2022 08:20:51 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2050.outbound.protection.outlook.com [40.107.220.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAA3B2734; Tue, 27 Sep 2022 05:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gA7Vq6oqdrFMxzBaDoTo1mGDzZfINs7GUoXPEQeLQsORBTTHYOVIh3iywovck/Qhhh8DttMfp7qT3Qqu5C1qV2EST7+EvAUeelyBztnAeXcBgwLcKnT+U9UQJK935Suj+XCyn596fC3mr8TACxMBVt22yqLyWjEDpBHuGpUuKGxOHj99IwVp6oUahH6TvHk3qkConRe31BllNTcNfVT5IRh5miSPo3eHnSqmS4Q9rov3JVsarNeRk3htQHHbgH5lkuygBbPgrRsqNypNqgOVbnIj6DXDKhl8BcCeHdj6z9FcRExffu9oE+OxnoslaQ+4TtZoRh4K6+s3cAOVYACEQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/Pm9o5hKkDBRVM+hrAFWEV41OAURgOqftXtTjXoveQw=; b=J8VBJQZOJu4jhlc0rlwKB7RBCleX/VMYou0tba+Fb4NvJGugQZOulkuRSXb8nkqEQ7EGu0lCEDpknp6zFRQGF4RrvDmhI7U4dt6Wo4DGdED2kgFunCvEIyk+E/AYSyLPhepIb+AxBvlUhilqZ+r+TnZ0DEzbxftHs+hYloupUzCfXA38GnXv3ZL30CACb9H3HZGC4ANqsbOLC0mZMAx5FHMnS0G3vEbAl71jAEh1qVhLnjJ2wIgjHm6Q6gKCxoq2vH5kkSNOEq17C4Rsqpgm4pFBGrjsZ23K/3sKsRTYiXfrEsZwovfglzI2GqsRbkLYpHqjIpMITi2dIEh0uCqlng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/Pm9o5hKkDBRVM+hrAFWEV41OAURgOqftXtTjXoveQw=; b=AUAB7iSwlIXN1OzTxNDwQf33K+42JKCx4NQgGTLbwqRkalbI15Cpz6mDn3b4K4ny46Ke7iogyeMnLHovgOmNhHM4mi6NK+NRFy8SHseRMhj8YMvaahRDDuAeLOoNM0vtYwr4Y21CJnz7Zsws9LRlZ2rOZifGU6okTFGRNtmyXFY= Received: from BN8PR04CA0029.namprd04.prod.outlook.com (2603:10b6:408:70::42) by SN7PR12MB6959.namprd12.prod.outlook.com (2603:10b6:806:261::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.24; Tue, 27 Sep 2022 12:19:27 +0000 Received: from BN8NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:408:70:cafe::f2) by BN8PR04CA0029.outlook.office365.com (2603:10b6:408:70::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Tue, 27 Sep 2022 12:19:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT094.mail.protection.outlook.com (10.13.176.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Tue, 27 Sep 2022 12:19:27 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 27 Sep 2022 07:19:24 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 27 Sep 2022 07:19:24 -0500 Received: from xhdshubhraj40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Tue, 27 Sep 2022 07:19:21 -0500 From: Shubhrajyoti Datta To: CC: , , , , , Subject: [PATCH v4 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Date: Tue, 27 Sep 2022 17:49:16 +0530 Message-ID: <20220927121918.30543-2-shubhrajyoti.datta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220927121918.30543-1-shubhrajyoti.datta@amd.com> References: <20220927121918.30543-1-shubhrajyoti.datta@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT094:EE_|SN7PR12MB6959:EE_ X-MS-Office365-Filtering-Correlation-Id: 7442a8ed-32f9-426f-37fc-08daa08285b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8jZuaHZ48rnxL2XTZK/nGRGRbsiYrfClL5yv6eknaCCGUklCU4M1Q57HnYcMr+K/PBkPRGu7cONI6688EfyfUf4GZeAHPAZAP0QXE/5QmW5ttrMEo2pmLaxGgEvdiEnLKgsBavHkShzqORrglsj6BC7kkj3fzPsgft8cyXrqv8MDFVFStMLaxL6yIAyv+L04Sc7dXEBssMRDGb2Uf5X6iC3UJfNU9pvP9+Zu2gxitaEoRBxr6xD1ZRoyKBvmc5aG/g/sHudVpYxNi282BVKnrFyJWtpQVfKmTLM0E2G/ONjdhd7lIamJGA/HoxcMeWbMkQpnRL2Z+ZDErAJ1am7Ra72AC/Oh4bBHL4G34PG5Mm5CBkND4JcS84nXNprEmYEYJCBoWJ1o6J/5Kb/AgOAYHdGwd9bxj+gq79+kNXzWgzBqBcdH2OeaYWxJi5PauaFU+ab/UGOlPSK+KiAjJymqswMHLxGiCXc0rY7V+7je0R/DXfdyqDydwSt0pOAhE9ZpXFxH8zINr1XHm4Elm/NB9DB/TcYKzQGJCoi8oHQnQ03OJ4f5/36bPgYfPtkEfTHJGTKwh0/+dqTH9oek1CEiNjI6MYPFRy2j3dHDN5Yr22fR2u66jNmv/MQ8jQKjG8fD7wSlRyvc26JM85ATXISP3vATKH6ZvMSnumKqduUeuaiacHASo16+ksvRHT4eZnH6bPq46h7ecSWjpQrCeD9iJ1gVu667LyNIsW6vgn2ZeNE/txE/4K5FqGB8s9Iw5SG0aXWEX790JpFpjn8ZKXnRxP2mS9kRi5arUPILZsYlweQJoto+LeNtflqshHlSvY8n X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(396003)(39860400002)(136003)(346002)(376002)(451199015)(46966006)(36840700001)(40470700004)(426003)(44832011)(8936002)(5660300002)(4744005)(40460700003)(26005)(36860700001)(8676002)(6916009)(70586007)(70206006)(54906003)(36756003)(2906002)(4326008)(316002)(41300700001)(40480700001)(356005)(47076005)(6666004)(478600001)(336012)(1076003)(86362001)(82310400005)(186003)(81166007)(82740400003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2022 12:19:27.4938 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7442a8ed-32f9-426f-37fc-08daa08285b4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6959 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This patch adds compatible string for the SLG7XL45106, I2C GPO expander. Acked-by: Krzysztof Kozlowski Signed-off-by: Shubhrajyoti Datta --- v2: add alphabetically v3: Add ack Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml index 1acaa0a3d35a..48bf414aa50e 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml @@ -12,6 +12,7 @@ maintainers: properties: compatible: enum: + - dlg,slg7xl45106 - nxp,pca9570 - nxp,pca9571 From patchwork Tue Sep 27 12:19:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 609839 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80E2AC54EE9 for ; Tue, 27 Sep 2022 12:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232338AbiI0MVR (ORCPT ); Tue, 27 Sep 2022 08:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232346AbiI0MUv (ORCPT ); Tue, 27 Sep 2022 08:20:51 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A3D109747; Tue, 27 Sep 2022 05:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QeFvWgJbtupQ9aHqCHWjhZKkvPaB5SPR67tzjQBjEH+5vjm4qY/yLTZV6K6fi0lh3B8Cl4UbWsaESEE4KO8N0JX89PBi29TIioxlCr0L7gYoJwPkiWdlBgEMNdcQslFiYio3hJvkzvQZJ6pNL0GKgdHbafL0z1MaIvJ37SE6Q0eevXKs29u2whAfHVXfa8VET+OgCpZRccC3UuolAN0zCwtjBAD5ps5gY19tuUl+W/JltU5GtHnT3YcuG8+pIj4KfOpwrGeEW6B9lCDKEf7jFQJ4HFiO+0RSdS4DbLySOMc/ynKyZK6LuCU+sqAiFjws4QlH52b1cFUG13O6U4HASA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fr0tpiwZaW3jcEqlkFzpZ+Ret9pXu2U55oXy18bGEdw=; b=UR8tB2iK7Efqhh7qLiqstYGYWKyQcm3c2xvM3BEUvkUawc4z1sNand4Z7DKQ7+jn+LKrlt4lpx1W/v3hS0n4ynr9iHXH73kXb/+gg9lblAlCaeFE/GpWzg7/Uc5/SIGHC+w/gbumys6IHGQwaJKPGVDhHV0Td1CITumyztAb47IE57LUuMJ63zVPWmrZSkbinvS2UzLJxRy7mK3ps89KKgCbrmpygYVWs44CKqk39RHLN+6T3lLzoIl6aAMvEJtUIZEjvYc4dTrva0EsKW3dIrgeh0cMbXIva/9AaoeOKlEEIn9H9T6oCRvI/107Ssy5VPyg+ImKWtS0QxcoFn/mlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fr0tpiwZaW3jcEqlkFzpZ+Ret9pXu2U55oXy18bGEdw=; b=3AZb6zPY3XvignOqwUgc6p+ts9cvK2Q9sxwqs6DxrBHdhAwMII5/d3ZOEfDm0avqcPbFLDyVWioEcJwkU+5ma4RpDPobs4TOWCvRF4lQ6F1IdxPrWpKFfM3KRum7lqOwdI6jbKXKkRBr85xPjWVM7qT4uc1RdY27hq3NPZRCn24= Received: from BN8PR04CA0027.namprd04.prod.outlook.com (2603:10b6:408:70::40) by IA1PR12MB6484.namprd12.prod.outlook.com (2603:10b6:208:3a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.20; Tue, 27 Sep 2022 12:19:29 +0000 Received: from BN8NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:408:70:cafe::4d) by BN8PR04CA0027.outlook.office365.com (2603:10b6:408:70::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Tue, 27 Sep 2022 12:19:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT094.mail.protection.outlook.com (10.13.176.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Tue, 27 Sep 2022 12:19:28 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 27 Sep 2022 07:19:26 -0500 Received: from xhdshubhraj40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Tue, 27 Sep 2022 07:19:24 -0500 From: Shubhrajyoti Datta To: CC: , , , , , Subject: [PATCH v4 2/3] gpio: pca9570: add a platform data structure Date: Tue, 27 Sep 2022 17:49:17 +0530 Message-ID: <20220927121918.30543-3-shubhrajyoti.datta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220927121918.30543-1-shubhrajyoti.datta@amd.com> References: <20220927121918.30543-1-shubhrajyoti.datta@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT094:EE_|IA1PR12MB6484:EE_ X-MS-Office365-Filtering-Correlation-Id: 8dc7ecbe-41bd-4d64-a106-08daa0828683 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AYa/j72zwKmuuV7V1c2Mf56Im1pn/he83Pexl2eyoDB6w2Oya//dST99xeJ9op8Ty/JsYa6/vwdCU1ybENrC7W563yWVc+zZsimWy7WOXIYEe2otMf7LB8z7f5w8xwynahyjctRE0lyr0zz4dA+o+wC3AS3FUxsxJdCTn27F3IhYZ8ubs+Ak7lXpLoacPaejn4muj96lAuDqd/VHfWqth45zRGF9WDwBygUGebFVSKBXBpzudI2mjKgACbpqxIGlJ5ktSQDUIm2PjV//VUpIZk9q4rNzLkNPRoiIk2DAtKf33jlY62cUNq36vBr9dPAWPnYVTAhQewvRo7fwkY18M+sNNVU8yUwAw6xcJairt39mPPR0j44Ff7aR3nQWRRF9rKcMinbQs6Jc5G0ZnLcPuBydu6tS9qNmlc8WLKs2o5yx4FdlLBstswhxVSvLl7dLhqS/eSaRjy3swHh57jEXdHs81AVDXtpS8Prg1XCB02zFJCabjLX+RdAjhe78KKtigSnNUgcL1tsprt8jNdcdJqYJcPOSBLC6RHGl7GQodWz5LFUbCm5DLGYicjP9YmGvPlR9GS73zs6+jvvDz4S/jA/DxXHGhyDjtTFDZuKCxPgN/+qmRCBRNgk95VpePuJhKMyNsmGb/uvtuIICL04+lt0GowLefOMevBkJi22lJGBdy4fkNtd3nRxN9eL8aMzC6aWKQVSK7VBJk/jC3UFx4/D0gPfsrP3Lk5Wp8kZooCFvQmNTc5QHmVIvWt2afO3E8IkdMEb7EUd7cKuxYF1ysIE3sj9csZr11zq41GQ6Uy81KQi/DjOda7iv4YC9a+CQ X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(396003)(376002)(346002)(39860400002)(136003)(451199015)(46966006)(36840700001)(40470700004)(86362001)(54906003)(6666004)(41300700001)(356005)(82310400005)(2616005)(1076003)(186003)(8936002)(83380400001)(36756003)(426003)(40460700003)(336012)(36860700001)(5660300002)(40480700001)(44832011)(2906002)(47076005)(26005)(82740400003)(478600001)(4326008)(81166007)(8676002)(70586007)(6916009)(70206006)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2022 12:19:28.8531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dc7ecbe-41bd-4d64-a106-08daa0828683 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6484 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add struct pca9570_platform_data for adding the platform data structure. Also modify the existing structs for pca9570 and pca9571 Signed-off-by: Shubhrajyoti Datta --- v3: split the new patch Suggested by Andy Shevchenko drivers/gpio/gpio-pca9570.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-pca9570.c b/drivers/gpio/gpio-pca9570.c index ab2a652964ec..d49e088e6b43 100644 --- a/drivers/gpio/gpio-pca9570.c +++ b/drivers/gpio/gpio-pca9570.c @@ -15,6 +15,16 @@ #include #include +/** + * struct pca9570_platform_data - GPIO platformdata + * @ngpio: no of gpios + * @command: Command to be sent + */ +struct pca9570_platform_data { + u16 ngpio; + u32 command; +}; + /** * struct pca9570 - GPIO driver data * @chip: GPIO controller chip @@ -119,16 +129,24 @@ static int pca9570_probe(struct i2c_client *client) return devm_gpiochip_add_data(&client->dev, &gpio->chip, gpio); } +static const struct pca9570_platform_data pca9570_gpio = { + .ngpio = 4, +}; + +static const struct pca9570_platform_data pca9571_gpio = { + .ngpio = 8, +}; + static const struct i2c_device_id pca9570_id_table[] = { - { "pca9570", 4 }, - { "pca9571", 8 }, + { "pca9570", (kernel_ulong_t)&pca9570_gpio}, + { "pca9571", (kernel_ulong_t)&pca9571_gpio }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, pca9570_id_table); static const struct of_device_id pca9570_of_match_table[] = { - { .compatible = "nxp,pca9570", .data = (void *)4 }, - { .compatible = "nxp,pca9571", .data = (void *)8 }, + { .compatible = "nxp,pca9570", .data = &pca9570_gpio }, + { .compatible = "nxp,pca9571", .data = &pca9571_gpio }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, pca9570_of_match_table); From patchwork Tue Sep 27 12:19:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 609838 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32AB2C6FA93 for ; Tue, 27 Sep 2022 12:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbiI0MVS (ORCPT ); Tue, 27 Sep 2022 08:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232349AbiI0MUw (ORCPT ); Tue, 27 Sep 2022 08:20:52 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2058.outbound.protection.outlook.com [40.107.94.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89035123DB0; Tue, 27 Sep 2022 05:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kapY3ALKLDMIMGzp2ISXOVgAEeg3Gd1XwHtMZstvezv/4znbL0ua3H0GKuBeGAUsaqwR1mQCWCv4U/EZtYXXOijk20MmNgxI+9oMZw9vJwWXIE4IYiclUtMh6MjKP1y6fjPMQSHI3+Qo+yKXObAswV7Vwk8aVOhr+S844kjwU/uCJiZjlFEVX4bLSga808jtyLQod9biTyNixDnT7gvwskd/A2PM3/ywiZUp/3+XQ/IvwSCNWdElmXXENPK29HzYVqSWWvwr5AdJBPC2rTNNr+bPRG+ZHrWFnRvLMXodb4qnzX95QB9yvBKEMAheTzYu9sZPlG+JTELW0ywNxu49jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2AvxgU1n8IkVQJ7Q2UoA9pk5D1qIuQpq6SRxha6oNrg=; b=T7laf/fnJXskHvDM4BojNBfY//mdoW0g08sg6LZ6ulZ/NcUCr9RzItgXpFJcIdzkIsnjUFfUmfChV9xmM1rkp+bgHmQrUYY80vJx8Rvt2Ak9A9ULnfe04eHGR9+2HJQb14LTgTyLEHXH/baLs7U1prZR+DwRRDDEbjh70Vx0HnHLIyjnVWB5W06whzjzdEevBRHs25Ouk38Slzrp3QETEm6ERFlmzU6C4xX9WbT2dGX1sA+/QU2FeqzM1pnjmEApE/AJ4gn4eMNjRt+mGYrWtFpLFxLIieLtHgulcYejqoQbxDUDqXIqrpbuhzJnbmbvw9O2bLR/StzFIUhYwzkXsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2AvxgU1n8IkVQJ7Q2UoA9pk5D1qIuQpq6SRxha6oNrg=; b=y94dW3rzx5iXMAkjogb0L8x4GoTo11GESQX+9Ef7leEjzwbun+PCb5yDd+6xskdta8ZwVIz61J1iodC4AubVwmZXtBVvp30NqJ6+MP6EEA8Lb/UyN451HxO+xQN9C8LgaKU3/EFwBOQAYdSsuzS+YQjDYVgfvfIMffY2xug3Sdo= Received: from BN9PR03CA0299.namprd03.prod.outlook.com (2603:10b6:408:f5::34) by BL1PR12MB5318.namprd12.prod.outlook.com (2603:10b6:208:31d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Tue, 27 Sep 2022 12:19:31 +0000 Received: from BN8NAM11FT084.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f5:cafe::a4) by BN9PR03CA0299.outlook.office365.com (2603:10b6:408:f5::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.15 via Frontend Transport; Tue, 27 Sep 2022 12:19:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT084.mail.protection.outlook.com (10.13.176.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Tue, 27 Sep 2022 12:19:30 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 27 Sep 2022 07:19:29 -0500 Received: from xhdshubhraj40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Tue, 27 Sep 2022 07:19:27 -0500 From: Shubhrajyoti Datta To: CC: , , , , , Subject: [PATCH v3 3/3] gpio: pca9570: add slg7xl45106 support Date: Tue, 27 Sep 2022 17:49:18 +0530 Message-ID: <20220927121918.30543-4-shubhrajyoti.datta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220927121918.30543-1-shubhrajyoti.datta@amd.com> References: <20220927121918.30543-1-shubhrajyoti.datta@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT084:EE_|BL1PR12MB5318:EE_ X-MS-Office365-Filtering-Correlation-Id: 3eee1528-522a-4995-5c54-08daa08287b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GsV7Da4b91Rul+798n19xlkAAZUoFJXjjZtDMYkRAOKfCL/Cry0dxMBeLDCp9Jy9iRM4pkM1om6rg8gqXhiiVBRbTBvc17KNSa1WbD38sNh9B8YFLE/EX71LJ0Fv4CFLeAhd1Spx0z7RL92m+OqCASNILJWsGnLUngCsX20l7GSV18St/6ZkgsK9ZPLLuoOdBkzNQOhsn1uZzdkU0QYkxrgy1q64bjO/uJ3MajD5Cs4K8cXbK0A8XvSAYofSgStRetYGZX6fzwrFghh1VofAUzKJB+UfpgbjBHkEdegf4yJ0VJsc4hIumCPSvd/PLbkcsClQjcszP2uGHaZ9vjFfogaKW8PRpu6BQ3H7F4ahC7rdv/5KhvDw73A2caKThU9dL+LRBsoZ7Upp+ipOON+Cx61NKaac02pI2+vhamf95qCxdQwSvV5W7ayy2Bgcja2vBE48XOl0gbfs5xf0eRvwZt4U+GxEeal0dO0ypCFlXk6JWNXEwye0qZJgXEXa6rQB7K22sZB2rSeycLUnZeP9Df5MQwc9G1ahQYGOGURdXZXHn3ELn57f49Xvc2WEaDiM5PqoCEZPVK5vaVgSn2tqUryqaHbSC7h66t4w8M4SGpuCFPb8ybHVxqtQI11RJwiW1dAtF+QUp+1eneUN3LRLWi5HMnssOACqp0LGH00zawl7rGOrOX/qb1exvCtGUFWZgjhZY0i04A83zahWpv/VS1mJiNLtC0EBtIZH5/GWE0V3uOJ7sjmVJlnVRZ6amJmjunu3nsS2qYe0CorgVCN2YhJgxkCRaXnrs8riFXzB64uMyzswbgH/4RUrsGa8PIMV5gY/T6NTy6nj3oXFr3qZRyD1MZsyvkfTbcca1mUP+SY= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(346002)(396003)(376002)(451199015)(46966006)(40470700004)(36840700001)(36756003)(82310400005)(356005)(81166007)(2906002)(316002)(6916009)(26005)(6666004)(36860700001)(44832011)(82740400003)(54906003)(86362001)(478600001)(5660300002)(426003)(336012)(47076005)(8936002)(8676002)(83380400001)(2616005)(186003)(1076003)(41300700001)(40460700003)(40480700001)(70206006)(70586007)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2022 12:19:30.7771 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3eee1528-522a-4995-5c54-08daa08287b0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT084.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5318 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander. The output port is controlled by a data byte with register address. Add a compatible string for the same. Also update the driver to write and read from it. Signed-off-by: Shubhrajyoti Datta --- v3: split the patch As suggested by Andy Shevchenko drivers/gpio/gpio-pca9570.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-pca9570.c b/drivers/gpio/gpio-pca9570.c index d49e088e6b43..6c07a8811a7a 100644 --- a/drivers/gpio/gpio-pca9570.c +++ b/drivers/gpio/gpio-pca9570.c @@ -15,6 +15,8 @@ #include #include +#define SLG7XL45106_GPO_REG 0xDB + /** * struct pca9570_platform_data - GPIO platformdata * @ngpio: no of gpios @@ -28,11 +30,13 @@ struct pca9570_platform_data { /** * struct pca9570 - GPIO driver data * @chip: GPIO controller chip + * @p_data: GPIO controller platform data * @lock: Protects write sequences * @out: Buffer for device register */ struct pca9570 { struct gpio_chip chip; + const struct pca9570_platform_data *p_data; struct mutex lock; u8 out; }; @@ -42,7 +46,11 @@ static int pca9570_read(struct pca9570 *gpio, u8 *value) struct i2c_client *client = to_i2c_client(gpio->chip.parent); int ret; - ret = i2c_smbus_read_byte(client); + if (gpio->p_data->command != 0) + ret = i2c_smbus_read_byte_data(client, gpio->p_data->command); + else + ret = i2c_smbus_read_byte(client); + if (ret < 0) return ret; @@ -54,6 +62,9 @@ static int pca9570_write(struct pca9570 *gpio, u8 value) { struct i2c_client *client = to_i2c_client(gpio->chip.parent); + if (gpio->p_data->command != 0) + return i2c_smbus_write_byte_data(client, gpio->p_data->command, value); + return i2c_smbus_write_byte(client, value); } @@ -116,7 +127,8 @@ static int pca9570_probe(struct i2c_client *client) gpio->chip.get = pca9570_get; gpio->chip.set = pca9570_set; gpio->chip.base = -1; - gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev); + gpio->p_data = device_get_match_data(&client->dev); + gpio->chip.ngpio = gpio->p_data->ngpio; gpio->chip.can_sleep = true; mutex_init(&gpio->lock); @@ -137,14 +149,21 @@ static const struct pca9570_platform_data pca9571_gpio = { .ngpio = 8, }; +static const struct pca9570_platform_data slg7xl45106_gpio = { + .ngpio = 8, + .command = SLG7XL45106_GPO_REG, +}; + static const struct i2c_device_id pca9570_id_table[] = { { "pca9570", (kernel_ulong_t)&pca9570_gpio}, { "pca9571", (kernel_ulong_t)&pca9571_gpio }, + { "slg7xl45106", (kernel_ulong_t)&slg7xl45106_gpio }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, pca9570_id_table); static const struct of_device_id pca9570_of_match_table[] = { + { .compatible = "dlg,slg7xl45106", .data = &slg7xl45106_gpio}, { .compatible = "nxp,pca9570", .data = &pca9570_gpio }, { .compatible = "nxp,pca9571", .data = &pca9571_gpio }, { /* sentinel */ }