Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2244469rdb; Thu, 21 Sep 2023 12:40:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHaQuyoTn1qVmTyREXjbPj7I2UY0vErgI77lNHtWapLOQI7G0hJKJ4kBkSm1sQEsiPTP31Y X-Received: by 2002:a05:6a20:160c:b0:153:dff0:c998 with SMTP id l12-20020a056a20160c00b00153dff0c998mr8519195pzj.6.1695325199837; Thu, 21 Sep 2023 12:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695325199; cv=none; d=google.com; s=arc-20160816; b=iGeFMSbqbBa2z9oyQihRp1y4yFylwcQq38FLESxxGIqFCLeOmP0W6OtBKi+rrhe55T xw05DIdxhPaz1nINgKC673PIbXofJdbKPVtX254NwkdbJsS9rnVMPE09kJRk3Ybka02l eScp8sMNKC7X2FuL0/Su9ATiUwAXKqrkJ8AhQp4wErtNftc3vI9EnMYs/QAyxm/vDYB+ sZb5AZODGY0qz2wVkungsU+RXAtoqbD/DY2c85X29pGg8SG39O9BBUby7afVaW6epdYX kaLihdXIusRO22j/nKiVYbjpNuAOP9hoAyLsxciIZrL0vJ3Ybeb8onoQojDWcMvKLaOo FPLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=wDYJGzZuHRIB17co21hSSjx4OCEGdJHsHcQbpiUlbJw=; fh=C9TL9yCnGisUiZfdvbqmpU1FLQkakKnDf/rl0GO1YOw=; b=pe8j27Sr3adqxZD/A1um8V5Atjl52UGBzTFaBXT83aQJV1j0YWTDN8s9WGAiwNi0tw rfxfDP0iZj59RmQnpqdNEOzaoradAmH8g9mw87ZOX25mLxN+suwzF5eXszg1dJNHFF3n p09XHB3ajFMFIFA21xLjKKjdacJNcuhQTqhBwyhQgmOYtv4gj7vQYk+ASf32rFI6Kud+ iIVFrWNtKx1ymADvhAChDk6rVwKUmehMhjlFbyXn/cgLijCZ8lwTkPwypIi6YOHNl/DI Vu1g7j90JSzs6DeY+r55qyVgL+uxr8Vi/hLy+SAAXYlZfCZhQByd3r3/b0uqNaCuTePQ gO6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id eg6-20020a056a00800600b0069023e4bca8si2074482pfb.214.2023.09.21.12.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 12:39:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 88EB681B4AE0; Thu, 21 Sep 2023 12:28:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbjIUT1e (ORCPT + 99 others); Thu, 21 Sep 2023 15:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjIUT1Z (ORCPT ); Thu, 21 Sep 2023 15:27:25 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07C6BA0C33 for ; Thu, 21 Sep 2023 10:57:35 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 38LCRJlj012213 for ; Thu, 21 Sep 2023 20:27:19 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 38LCPc0P001541; Thu, 21 Sep 2023 20:25:38 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx06.spreadtrum.com [10.0.1.11]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4Rrvff0yg8z2SbDtc; Thu, 21 Sep 2023 20:22:18 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx06.spreadtrum.com (10.0.1.11) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 21 Sep 2023 20:25:36 +0800 From: Wenhua Lin To: Linus Walleij , Andy Shevchenko , Bartosz Golaszewski CC: Orson Zhai , Baolin Wang , Chunyan Zhang , , , wenhua lin , Wenhua Lin , Xiongpeng Wu Subject: [PATCH V2 2/2] gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip Date: Thu, 21 Sep 2023 20:25:27 +0800 Message-ID: <20230921122527.15261-3-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230921122527.15261-1-Wenhua.Lin@unisoc.com> References: <20230921122527.15261-1-Wenhua.Lin@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL: SHSQR01.spreadtrum.com 38LCPc0P001541 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 21 Sep 2023 12:28:23 -0700 (PDT) The drivers uses a mutex and I2C bus access in its PMIC EIC chip get implementation. This means these functions can sleep and the PMIC EIC chip should set the can_sleep property to true. This will ensure that a warning is printed when trying to get the value from a context that potentially can't sleep. Signed-off-by: Wenhua Lin --- drivers/gpio/gpio-pmic-eic-sprd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-pmic-eic-sprd.c b/drivers/gpio/gpio-pmic-eic-sprd.c index 442968bb2490..f04a40288638 100644 --- a/drivers/gpio/gpio-pmic-eic-sprd.c +++ b/drivers/gpio/gpio-pmic-eic-sprd.c @@ -353,6 +353,7 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev) pmic_eic->chip.set_config = sprd_pmic_eic_set_config; pmic_eic->chip.set = sprd_pmic_eic_set; pmic_eic->chip.get = sprd_pmic_eic_get; + pmic_eic->chip.can_sleep = true; irq = &pmic_eic->chip.irq; gpio_irq_chip_set_chip(irq, &pmic_eic_irq_chip); -- 2.17.1