From patchwork Mon Sep 26 06:12:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 609867 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 24BD0C32771 for ; Mon, 26 Sep 2022 06:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233189AbiIZGN3 (ORCPT ); Mon, 26 Sep 2022 02:13:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbiIZGN2 (ORCPT ); Mon, 26 Sep 2022 02:13:28 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF6131235; Sun, 25 Sep 2022 23:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0vvwiYUbkwDGIEkrJ3UvIrt//ZV+kNBRhBpzGjQdcAMONGVdTwipN7UisToYEiSFXYbECRtdBzXVzeI3t4B6mbHlhxbmrOp+EN5DWxOGJsaTDLubhVDAvOq0xd2fisS8iLVdPJQW9kZ90njPKd0Fvr83PZh85jMua1d11dU8Ch0V5ynOsBB3GV8zfCCgf0BDRldfM7k9ZgyBUUQW/vzdli9gKe3gqr/C50vDnB6MZ3rs9fq/suC7lfTqdaO75RxttEsztlruvQ0hX1QOEOYXthBX8FbnF5UOELdCdDNQU02fYcibqRAojFebHltF2IjE07U03gE4p9QnKJHBaUlCQ== 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=ciMdQAnuw4BTH5NQzbBOsKTs5rOuT7MuaxfKydb84Pe/dcK5DiDeSGWOOTUDqxUCRXoljzTnZgwIA+l/2SFvnX/JrQrlZJRsWd1RSRB0yLBMuPeGq2+tnWy7I5rBwc5YUUjB3ULBr3023pTSc1FaX80vg7fHpZbM1lpWmDciXg+NzO6Oh4HpRuG+HuUcDj35SUYMO48c+OIc7zX6X5YlvOYvSJGZbOIZMeGky6NSZ2WMAqZCAlJ1cm9wW+yLkEyWpCY4DXIsLM1fc8uyjxroCSGgZ2uOVrbTjDDERyhrv/2psaTiFZk1Ndqc9Y6CvGq9JZ9icGss/X0vzp18I68EEQ== 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=0qHJrfRUtytquHa1DccQSbp4CJFvAzJfTw3+gPuY4ip9LKo88qAWhaPNYtelpKNwLdT3hNTvqzFC2cBF0Atk78Op2AqG0fxys8kY5a4ERuLc5azBfkhZOsC04C4iB2URqT36VcNVv2NocPOyuUJp0ZIFlrVqRne5OZo+AqdUlfU= Received: from BN9PR03CA0267.namprd03.prod.outlook.com (2603:10b6:408:ff::32) by BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 26 Sep 2022 06:13:23 +0000 Received: from BN8NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ff:cafe::47) by BN9PR03CA0267.outlook.office365.com (2603:10b6:408:ff::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Mon, 26 Sep 2022 06:13:23 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT008.mail.protection.outlook.com (10.13.177.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Mon, 26 Sep 2022 06:13:23 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 26 Sep 2022 01:13:22 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sun, 25 Sep 2022 23:13:22 -0700 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; Mon, 26 Sep 2022 01:13:19 -0500 From: Shubhrajyoti Datta To: CC: , , , , , Subject: [PATCH v3 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Date: Mon, 26 Sep 2022 11:42:57 +0530 Message-ID: <20220926061259.13491-2-shubhrajyoti.datta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220926061259.13491-1-shubhrajyoti.datta@amd.com> References: <20220926061259.13491-1-shubhrajyoti.datta@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT008:EE_|BY5PR12MB4130:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ff5ac8e-817c-4554-da05-08da9f863782 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kuwTD83vCBiHMtmR2rYvr7wrbRijI6Ab9f17T+hkqxf4Y4LXY5qBtIb6WeV1cN7yNIfzTyvig/BUT9kJDCh3Lm2wzNMAobgGUflFLseAcblxHyI2fVRNKYX55Kx8tQsd+SpBh5nUNbBGU5vSRj5edAaAMkme3DrSbfa4FkWPtLwkDU0k2HTPGk3pgE+xj6nC/rVfKvzm/fFQQILuIkVgYqzU/6OE1tqOfhkDHBdtCnycr8F4htQJO1fJ9ycFuDgkNhYxpZv0D7mkNgroGJOSfyI0yhgjybQpZlHEzUBDmO2sgTRLFz+q+5U/qadK+YR0CSj7q962PMOrNTVQz8dtnvRpDXqEgWnt+Bf7A0afCzVS/elQa+iU8er5Iy5AHDZj8KGxfXEef9B5V77kWmeB1VJ7bLYj1+kpHy5aj+qsTzbluL+OZDzF1KYuE4iW+vM4Z6eVCX+YSIP/M9XuduFY+25YTwjc4dBDqVNieFK1Gc3QsnQmooXQ1ulVjqJ/myMOzQb1E5zhumN70+O939ji9Fgw80TavGz0TXUmfZlW2g9COuwLGIF/ymgKgha9eJf9ecJIREc6hO0kCPyP+8PDRCVvCrujbSDUtwV8JJ4h1EezeU6f2kWmp4q82tIzUJis88N6ZbOf3Cc0qj3i5bwlFqg+8c1nP7F8X0n357ghcaBCIscu2Dulbk5+8I+Hjz8mIV6Bzx17SL0hDHOxaJ7qNw7NWvXOwUWE6R52gMaAvbcCAfsCsqThpDkU+TldTYPnWx/vG6nSvDzc/uxmXVDmOld7K4pZbLmRorZi7MfAe92WOxxjtV8vutAJvcnD1Qdp X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39850400004)(136003)(346002)(396003)(376002)(451199015)(36840700001)(46966006)(40470700004)(8936002)(2906002)(5660300002)(44832011)(26005)(36756003)(70586007)(6666004)(41300700001)(70206006)(4744005)(4326008)(8676002)(40480700001)(36860700001)(82740400003)(2616005)(356005)(40460700003)(336012)(1076003)(82310400005)(186003)(86362001)(81166007)(47076005)(426003)(54906003)(6916009)(316002)(478600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2022 06:13:23.1321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ff5ac8e-817c-4554-da05-08da9f863782 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4130 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 Mon Sep 26 06:12:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 609866 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 4C4BFC32771 for ; Mon, 26 Sep 2022 06:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233290AbiIZGOO (ORCPT ); Mon, 26 Sep 2022 02:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233220AbiIZGON (ORCPT ); Mon, 26 Sep 2022 02:14:13 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060.outbound.protection.outlook.com [40.107.93.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 552A527DD5; Sun, 25 Sep 2022 23:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DpXxQ0OqxQG+m/LMh9QegEYxCxC82c01wEPuCz4ncCDBwTsbhKSU6irnxcAQCUJPegGWyKp91i5qukn5azoELzH+VYzSIaRdgVRU/eQ2Uc90noOnQ+luArtmeV0qnHPumkVf6k54pFxGFdm/t9r4O4sL2HtgpaeLlkibDIr0J0udrEYMIxWkKe7KYwXP1f3CVryTsoQCD3ppvnSygCXIWr/1145ByX6NvwW3uZ3lIbB22jYhK7cfgpgJHali8Rmfy6TSgyseWbn7XeJNCBuNSEs+ZdA7cW/moq6tb7V0I9fqTm8xmWxMXG0Pqqsco9q9FeV1efxH1KNAyRCr2MTpPw== 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=qa3kXANouzF5VkQgHZj5NKCv/hXiJKQaxf8n2pAKlMw=; b=jA/7cH087ZC2Fb2WRX8nIz/7a70mgHvkeu+npL6eDdcra2YszomYvIX1Mj636y7wsmpo3ILb/3SF5SLO0a+OLeTJHcYEGxMt22Y4J07g/9OPYuaGJzQspinuYt0H6m4XavZRFCv6FIBcR6JH4xVCXg1CKYaqoXlYUNFwc7QEEaDSmq5p/iQPqvxTnJ369lpz9U+EpuRCDtC+hN9ZpUCBfV+LDY5JPquakDSbb0S72sg0pTECsutUa7omnE0tl4BXCRGavLT+VtX+vCTz6woBQIl81fA6Kd5oZLPqqkagmzgnE6kIXiVOd9Ps8E1PsRNX0+x2Ic1b817guGJ490KlSQ== 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=qa3kXANouzF5VkQgHZj5NKCv/hXiJKQaxf8n2pAKlMw=; b=hw2UgmNjbSRA1f8hJUvMebeK8U2nobRqyhxCxNSSQfEgmk1SbaJmRgPFqiHwVxW/QFiQon5YItvLwVCYzNfrXZJu8vlRPtdbzvQG6UnXmqgThf09um2D5Jm97Jzdhb9Hsnspc6tkVpSbRXY9dwrnjZv2rypvNHgGCBM84QGaBwM= Received: from MW4PR04CA0167.namprd04.prod.outlook.com (2603:10b6:303:85::22) by DM6PR12MB4106.namprd12.prod.outlook.com (2603:10b6:5:221::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 26 Sep 2022 06:14:10 +0000 Received: from CO1NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:303:85:cafe::8d) by MW4PR04CA0167.outlook.office365.com (2603:10b6:303:85::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Mon, 26 Sep 2022 06:14:10 +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 CO1NAM11FT024.mail.protection.outlook.com (10.13.174.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Mon, 26 Sep 2022 06:14:09 +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; Mon, 26 Sep 2022 01:13: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; Mon, 26 Sep 2022 01:13:22 -0500 From: Shubhrajyoti Datta To: CC: , , , , , Subject: [PATCH v3 2/3] gpio: pca9570: add a platform data structure Date: Mon, 26 Sep 2022 11:42:58 +0530 Message-ID: <20220926061259.13491-3-shubhrajyoti.datta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220926061259.13491-1-shubhrajyoti.datta@amd.com> References: <20220926061259.13491-1-shubhrajyoti.datta@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT024:EE_|DM6PR12MB4106:EE_ X-MS-Office365-Filtering-Correlation-Id: bf5438a9-fc29-4985-7b46-08da9f865383 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u4U4TejVbxR2fZs8iHyyF91gbs+IIVZH1cW+JyGZ/M22H7dL3rq3wBzPgDCfCJuN1l9o00FesUHnKQI2dl8qLuHbJZvzjxsAAviaORTPFHhZ91lIAp9Z8Rxh5oc//IH7pb2dBGs1IBG2MY9SJWXi9QQmmbpAKhue0LHoYQi4RTQtaMfY2S35VU8U+DRQgCupwjzpvaaWwVPBsNh7Vc7tTQ9JUzvtVHL+63RE141sJxomJR7PkVwChmHasCLcoS2aDulT7xmj3JCWWmwCrNnexvsfRFClu28PsrZ2vBCPYhIiOrWhGn0MChgFJxV+8n+2IJmSvaB879DGjirccY3U4N/uf8Elp/qSJmNP6KWwEtWjnB2RcC2k9AYP4EOjK8jQsu8JVw/nXaOSS4KXhM6bPlNEIql5p+QBwjnWgl0yaK5WQ+cgdulAZJ/8WQQLS82AKLE4Q043ddzAENgOJPWHrmethr5iS3cnHp5gWmBLJTeQzv+7ZrbRTctC9b0Looj/MKJ651Tvn8mM7xKWDt4R6ESNffG1mTF8CfqQ4PgCxgGzVv8JUX3n/lqKVl35Oalvuht8mbTen480o1LfFXLKCmYSQBVjAT2y1wNoolcdZjDP1tp+GwoJHfS7QfLxOCeowgVDqq+o8gP1Mawb/KB8hD093W+Xv73A446+mE3mDRyVRQilIJl7BJaVgeejQ6Dy4GwBFCyfoWjX7C52qN8NYN1Xat5vlgCTFW8RSbJZfO5iIwDms3n4wN8q0MlauEaXEatJ5ZnmbZuQJfb0+CjN+xyz9pdUWEBdo2gKXMTXntY= 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)(136003)(39860400002)(346002)(376002)(451199015)(46966006)(40470700004)(36840700001)(2616005)(5660300002)(41300700001)(86362001)(6666004)(70586007)(8936002)(4326008)(2906002)(44832011)(316002)(6916009)(54906003)(1076003)(478600001)(82310400005)(26005)(40480700001)(186003)(82740400003)(36756003)(336012)(83380400001)(426003)(47076005)(36860700001)(81166007)(70206006)(356005)(8676002)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2022 06:14:09.9875 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf5438a9-fc29-4985-7b46-08da9f865383 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: CO1NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4106 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 Reviewed-by: Linus Walleij --- v3: split the new patch 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 Mon Sep 26 06:12:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 609433 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 57982C07E9D for ; Mon, 26 Sep 2022 06:14:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233220AbiIZGOR (ORCPT ); Mon, 26 Sep 2022 02:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232675AbiIZGOP (ORCPT ); Mon, 26 Sep 2022 02:14:15 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2087.outbound.protection.outlook.com [40.107.212.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14BD727DCA; Sun, 25 Sep 2022 23:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J3miR6FxB85tSk7YXJqxvZ/o6xd7H2umISSrqNsNfpOhV8SRYhSwpha1sq2E+i+seqscSG/yRt2vIzbHvy5POPWi+BiOGPRMQ0+a1EsCfzK/CfjoH/9ZiUrW/7mz7h7b74oYZqEo+TGBZcSfMBU6ctKgnEMW8NmajytLdReRgF89DJY4mCTiXBZ9zrcJTtp3ZpKVR8/zdzEwzv5OiV/zUTu+FDVikadyK81WnSOV4PBYCAtELKtC3N9IC6XjmwRzwaY8jzO29vueyes7hto8yCogcvjG1FItxnZNLeKY6+6wgle+QTiIw3m5LegdZLBdgZVr+h0X3bevSq8vxrQODw== 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=KTx8Irqn3dOZWwC71x30+8EEcW/wToLoRcjFXMrI3kI=; b=LDxxPOV+r1lH8OdxcnKL87Kf4tQEodQ4XxxNe1aMr3r2l7lai8I7TtcJOEQI6z4gR20FI6CSrIFTSpLrNVAihMIXnb74IUW3uw7j4O2X/WNdcoUI+jca2Lt2SD64lt07rfZQxEdYNUUmd/hVNniswjxqqs7PJ4iC0nrcjz+7ex68xYKHC1J10ZsDoIVOjzvcfBSRZ2GQgyHTIQZ8xnCcVM4jiUos+VESo+YHgykaE7TKNMnwc0ltPVzbnn1RQUhuR+LAS8K2uQdnxeUKtAO5FSgH2tymc+3tiSRq8ZplIM/YMmZzA11EF0chu+NetSw4jTprNmljD8ajp1p2BLqWUA== 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=KTx8Irqn3dOZWwC71x30+8EEcW/wToLoRcjFXMrI3kI=; b=U8rxQfpvDJFaxPHw+ZWk5hjnRak1qlgTqyMHNoATLcEwGzVIIFv6jWvEMZMte4qV2rYhf0zQu29uXdZA40r3VlFUvcwthaTaaCtQapfEcIxE0XJvrviXxoyUShGHlgMrLvXIXsyXhbcjN5L+yGqkXRu6dVdy5lO5rUUr/IYu23w= Received: from MW4PR04CA0173.namprd04.prod.outlook.com (2603:10b6:303:85::28) by CH2PR12MB4921.namprd12.prod.outlook.com (2603:10b6:610:62::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 26 Sep 2022 06:14:12 +0000 Received: from CO1NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:303:85:cafe::31) by MW4PR04CA0173.outlook.office365.com (2603:10b6:303:85::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Mon, 26 Sep 2022 06:14:11 +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 CO1NAM11FT024.mail.protection.outlook.com (10.13.174.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Mon, 26 Sep 2022 06:14:11 +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; Mon, 26 Sep 2022 01:13:27 -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; Mon, 26 Sep 2022 01:13:25 -0500 From: Shubhrajyoti Datta To: CC: , , , , , Subject: [PATCH v3 3/3] gpio: pca9570: add slg7xl45106 support Date: Mon, 26 Sep 2022 11:42:59 +0530 Message-ID: <20220926061259.13491-4-shubhrajyoti.datta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220926061259.13491-1-shubhrajyoti.datta@amd.com> References: <20220926061259.13491-1-shubhrajyoti.datta@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT024:EE_|CH2PR12MB4921:EE_ X-MS-Office365-Filtering-Correlation-Id: 132d34c7-99a0-4a9d-1b42-08da9f86548c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hi2lLycqraBSuOQf+PHXdc64oY8Gj+eho0M2F18vES8A7LqH2A7U+cESKvQk2T+y06VZFvAoshuwLq3EG6bSqYwDXtzuU10Dr/kKLy7rCN3/Pacgj76iVq6E/X2tbFMWhdNGMKMuCz7g/zAgf7m5SxHz91O9jTjKi8SR/I0QOPsKxpXn3HAZl9GpM/ZK0isHEdFiE0ZK/ltQtGAXvVqCmI9lls1qpJ5UV9F3GZFycMg8HXmEjymVu3dY6gynl4amXZkIyBExYyAWfS3gpaWD9aprHC+vNo97bEYlj0oTOQ3sf54hUfv4nCahNC67ZSuX51eSk5cLJs4/0EIRtyPg1PxkYEYHlHhu8bpjI9/Xv+r4J9twUZqgqR8+kLo5x05iCuVS8tVPEYB3cyv60mwmPqm+kwZQ4DeViPg0lDTIc08VMkscthe+jryqo/hmTfSVUNwN08efYhgHD39NG4f+eMAl5ZTpk3Uxc14Z0MuOfg5riF03HYZBsn97Bxh2hjeCYX1wSTEkeG0O+AkOcs9eKZkk45oGPXcl0dLUPFaG3nDzMQrCcuuhnZ4b4Ulx1PJVjl2C99nXhglf771/34KVWpljcefyzh/WdddJx+p/QHAJdWqb63AWRI+cS5OCNz9oITpEb24LHGJa+zKAWt4CAjA96+IZtQBJkl0FYK096Qk/IZMqY/Vn42Kl/MbR/O0NSGf/FGgdhOvc8NXofRuBVyYAYfHxF8fxsNBTimMmuBCQQYyEa1tNo+2SryyNcX/Uh7uzgepiDZuEYSR/FT/zOHBHed28J1BiuhBQjGYbtM8= 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)(376002)(346002)(39860400002)(136003)(396003)(451199015)(36840700001)(40470700004)(46966006)(426003)(83380400001)(336012)(36756003)(47076005)(82740400003)(356005)(40460700003)(36860700001)(81166007)(8676002)(70206006)(70586007)(4326008)(8936002)(44832011)(2906002)(5660300002)(86362001)(6666004)(41300700001)(82310400005)(26005)(2616005)(1076003)(186003)(40480700001)(478600001)(54906003)(316002)(6916009)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2022 06:14:11.7373 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 132d34c7-99a0-4a9d-1b42-08da9f86548c 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: CO1NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4921 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 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 */ }