From patchwork Tue Sep 10 02:26:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 827301 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDEB661FE1; Tue, 10 Sep 2024 02:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935190; cv=none; b=Bm4c0Ep+i4deT8jAJsgKoeRd2Gn7q1L8lI0QJIFKgan5bG5bIq1MWI/UplrO3wrR+YR2JE4cbnzgUveDVYzUyNWlKC6Fb49rBljFNe9oz0spPooqYaiDsdV12e3mH33Ejr5rErLB9EwH/6NqG+WeBF+gQFbb8LxQCXYuRsfqfa4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935190; c=relaxed/simple; bh=e1RaqJ6OHjhJr44fQc1svj2UgSK4SS3mdHscWAQBFEQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J3hbdBjxvxs4zjWhUf65faYV+GefT4T64tF7pLaCp/41Tavpg8y5JHHYYANaAhzqIWaDbrwpecQx+u/G/RZYXlJXlUBfixCaGzZyXg0kSf590FJmBUqHjPAlokp1jC8njPLQRjD4znVgSUC8o+2WsOEcfTLJXlDatKsxDnTcYIk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4X2ncw1tN8z4f3jdT; Tue, 10 Sep 2024 10:26:08 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 964EC1A0568; Tue, 10 Sep 2024 10:26:23 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S5; Tue, 10 Sep 2024 10:26:23 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 1/7] spi: switch to use spi_controller_is_target() Date: Tue, 10 Sep 2024 10:26:11 +0800 Message-ID: <20240910022618.1397-2-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S5 X-Coremail-Antispam: 1UD129KBjvJXoW7tF1kury7CFWDGrWkXryrJFb_yoW8Aw4fpa 17Gr47Jr1rAF4YyF15ta18WF1aqFZ2yrW7Gws7K34fJw1Sq3s8Wr18ur1rJFyrXFZ2yF42 9ay0y3WIqa1UCF7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Cb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGw A2048vs2IY020Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV WxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx 0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWU JVW8JwACjcxG0xvY0x0EwIxGrwCY1x0262kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrw CFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE 14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2 IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxK x2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI 0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07jb8n5UUUUU= X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang Switch to use modern name function spi_controller_is_target(). No functional changed. Signed-off-by: Yang Yingliang --- drivers/spi/spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2000bce240a6..03032bb7397c 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1440,7 +1440,7 @@ static int spi_transfer_wait(struct spi_controller *ctlr, u32 speed_hz = xfer->speed_hz; unsigned long long ms; - if (spi_controller_is_slave(ctlr)) { + if (spi_controller_is_target(ctlr)) { if (wait_for_completion_interruptible(&ctlr->xfer_completion)) { dev_dbg(&msg->spi->dev, "SPI transfer interrupted\n"); return -EINTR; @@ -2425,7 +2425,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, } } - if (spi_controller_is_slave(ctlr)) { + if (spi_controller_is_target(ctlr)) { if (!of_node_name_eq(nc, "slave")) { dev_err(&ctlr->dev, "%pOF is not called 'slave'\n", nc); @@ -3321,7 +3321,7 @@ int spi_register_controller(struct spi_controller *ctlr) */ dev_set_name(&ctlr->dev, "spi%u", ctlr->bus_num); - if (!spi_controller_is_slave(ctlr) && ctlr->use_gpio_descriptors) { + if (!spi_controller_is_target(ctlr) && ctlr->use_gpio_descriptors) { status = spi_get_gpio_descs(ctlr); if (status) goto free_bus_id; @@ -3349,7 +3349,7 @@ int spi_register_controller(struct spi_controller *ctlr) if (status < 0) goto free_bus_id; dev_dbg(dev, "registered %s %s\n", - spi_controller_is_slave(ctlr) ? "slave" : "master", + spi_controller_is_target(ctlr) ? "target" : "host", dev_name(&ctlr->dev)); /* From patchwork Tue Sep 10 02:26:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 827302 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7255143866; Tue, 10 Sep 2024 02:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935189; cv=none; b=LNu3zViRkQ1rKdaYyNZrZhTax8kogppBT81bvq9/se5CkipZakY3Ic9Bh1a6jWrixTldwegNzb8lzTJPxMHvm4/wJOJWsH4FqeKQmoYRTeOpncCT3yIlswdMCm5u/kCP4EGEjFcGOibRnhqyNXAw4NC/X5kte2NRtjjBnCrwcnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935189; c=relaxed/simple; bh=VPyx2vnkh+9nUIBGaqOrveNmW1xQjDxdIpSfYpYaRgo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fk6aX7eiCvNsA12sxzfILM4Na4lsGXestt2HZMEM7/PcbbjGAMHK6Onxo64DKMBt76ua9G9ujbbPpVZA5C/eYsK9EqcHn5ob4gwOOejQyTz70k0EWvFrZDAotcHGSjVY14RvtfAhLxBSb22hEOcapR0iiInRSr688juVZs6azJ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4X2ncx1KSGz4f3jsJ; Tue, 10 Sep 2024 10:26:09 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 827D41A0359; Tue, 10 Sep 2024 10:26:24 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S6; Tue, 10 Sep 2024 10:26:24 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 2/7] spi: slave-time: switch to use spi_target_abort() Date: Tue, 10 Sep 2024 10:26:12 +0800 Message-ID: <20240910022618.1397-3-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S6 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw1UJFWkGFy8tr47uw48Zwb_yoW3XFbEkF 1UAr47WrW7KFsIqF129r1rZas29rW5WF4xKF1qqFW3Ka98Zw1rWw1DJr17Cw1UZr48Kr93 uFs3Jwn5ZrnxCjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbTxYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r15M2 8IrcIa0xkI8VCY1x0267AKxVW8JVW5JwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK 021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F 4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0 oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7V C0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j 6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4kS14v26r126r1DMxAIw28IcxkI7VAKI48JMx C20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAF wI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20x vE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v2 0xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxV W8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU89NVDUUUUU== X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang Switch to use modern name function spi_target_abort(). No functional changed. Signed-off-by: Yang Yingliang --- drivers/spi/spi-slave-time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-slave-time.c b/drivers/spi/spi-slave-time.c index f56c1afb8534..8bb3070e4b80 100644 --- a/drivers/spi/spi-slave-time.c +++ b/drivers/spi/spi-slave-time.c @@ -110,7 +110,7 @@ static void spi_slave_time_remove(struct spi_device *spi) { struct spi_slave_time_priv *priv = spi_get_drvdata(spi); - spi_slave_abort(spi); + spi_target_abort(spi); wait_for_completion(&priv->finished); } From patchwork Tue Sep 10 02:26:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 828117 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EC4C143C6E; Tue, 10 Sep 2024 02:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935190; cv=none; b=erxQ+qZdB1EuED2UvXgqSu+LKb16qVbKIlcYb7RG7Qp9kps9tk0Xb96wgnPv1+YyqNfDiVUm7faklZTP3v+FVj0HNFLPJPRIs6FzLh4bFMEt4b3bhoDeJ4DoVAnc6MuA/s86A0KTucVeflB5S2BO3y4Oal5+DdYhIJBGaYeM1Os= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935190; c=relaxed/simple; bh=glINnQqD0Ffy6xgU1TMYl5QpTlSq+B9X2f4Ifbo+Rn4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qp/AF+3KE1rqhd+2MzdHqsRqvQxxJuvvd8Y2h5MmjFDgcnhQmsnRi05DdIw7SXxRZz7L+hNiOkYQMtil/Fj2POo8XWgdbo9uT4Vb4OmEcjq/aXwAgvlVmey1pAXBUJ3f1RKfcYZl34ufEU1WZnDUz/o67uAnspql5jm4pIdfe+Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4X2ncy1Yw2z4f3jHh; Tue, 10 Sep 2024 10:26:10 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 8AF171A0359; Tue, 10 Sep 2024 10:26:25 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S7; Tue, 10 Sep 2024 10:26:25 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 3/7] spi: slave-system-control: switch to use spi_target_abort() Date: Tue, 10 Sep 2024 10:26:13 +0800 Message-ID: <20240910022618.1397-4-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S7 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw1UJw1rWr4rKw13uF45Jrb_yoW3KFb_AF 47XF1xZr47KF9FkF1qkr1rJF929rWYgF4vgwnFyFW5Ka9Fvw1rXr1vya1Iyw15ZFWrWrya yrn3Jw45AwnxGjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbTxYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r1rM2 8IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK 021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F 4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0 oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7V C0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j 6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4kS14v26r126r1DMxAIw28IcxkI7VAKI48JMx C20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAF wI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20x vE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v2 0xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxV W8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU1ByIUUUUUU== X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang Switch to use modern name function spi_target_abort(). No functional changed. Signed-off-by: Yang Yingliang --- drivers/spi/spi-slave-system-control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-slave-system-control.c b/drivers/spi/spi-slave-system-control.c index d37cfe995a63..8f5c32b61a5b 100644 --- a/drivers/spi/spi-slave-system-control.c +++ b/drivers/spi/spi-slave-system-control.c @@ -136,7 +136,7 @@ static void spi_slave_system_control_remove(struct spi_device *spi) { struct spi_slave_system_control_priv *priv = spi_get_drvdata(spi); - spi_slave_abort(spi); + spi_target_abort(spi); wait_for_completion(&priv->finished); } From patchwork Tue Sep 10 02:26:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 828116 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82FB514A09A; Tue, 10 Sep 2024 02:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935191; cv=none; b=gQVgIgnV4I2zLyaA4h6umZbcCvApWlNbphBC0dGxCnEW14FlEM1y1vE+qkh2t1NPcws7PRrTaNBaiJjGKjFRCGUpg3CyBeNTJ9wGgYxSMItFyL8CrvphrXo2AOAdzUqGJIy7amCpkn33DsNqo278SeN5/4B67t35IVngWIH88YM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935191; c=relaxed/simple; bh=kAx/hmL2kiPrfqBBPKV8gXJAAZBUInsrT3H+9jqgM0g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dj+h1pJLBvtSoQhb3vr+P4b7ChE4oVES5jddcHDNinSEj756DCNnZ29N2hVrhNvtmeUWf65eHjdsrhPiC+BxrlBo9st7xMpW0S/QLf4CF1P1i0/m48laSLKy1zwcnegvUemlWUpdfzmyESniYJszu/HZj24FWFrp/EyLkAvPS/g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4X2ncz1TZGz4f3jdT; Tue, 10 Sep 2024 10:26:11 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 88D001A0359; Tue, 10 Sep 2024 10:26:26 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S8; Tue, 10 Sep 2024 10:26:26 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 4/7] spi: spidev: switch to use spi_target_abort() Date: Tue, 10 Sep 2024 10:26:14 +0800 Message-ID: <20240910022618.1397-5-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S8 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw1UJw1DKw4kGr1UZr4xZwb_yoWxtFg_ZF WUuF4xWrW2kr4xJa1a9F4Sv3sY9rW5WFs5Xrn2vFWrG398Xw18Ar1qqr1fXr1UZF45Gr98 Crn5tr4Ykr13KjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbf8YFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r126s 0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xG Y2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14 v26F4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AK xVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4kS14v26r126r1DMxAIw28IcxkI7VAKI4 8JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xv wVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjx v20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20E Y4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267 AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU1l_M7UUUUU== X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang Switch to use modern name function spi_target_abort(). No functional changed. Signed-off-by: Yang Yingliang --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 14bf0fa65bef..ebab80a2def0 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -666,7 +666,7 @@ static int spidev_release(struct inode *inode, struct file *filp) } #ifdef CONFIG_SPI_SLAVE if (!dofree) - spi_slave_abort(spidev->spi); + spi_target_abort(spidev->spi); #endif mutex_unlock(&device_list_lock); From patchwork Tue Sep 10 02:26:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 827300 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39E2761FE1; Tue, 10 Sep 2024 02:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935191; cv=none; b=jr//xJKXtnu6mqocNQoN3EJ2XUcZgz1eLGfNpn0zTTdBu5m2cUzqNWFgKqPa9wftz6jouIxOaDd+uZ9qrVETAm/b96fcPjuDrZmDSbiRUqOu1QOykRXC+s6u/j87GFNATe0pYg9nbb5WlFsgfRTY6+4XjAaT1icbQYTyrOCqphY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935191; c=relaxed/simple; bh=LvPlV6zaDIZLwFQs+QHBBo9llDMM2gzg9rT8GQc7wQc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qa8vnWb5+qzrru5/17/28voaMZ+G4HAkZ3NWi/LdxVBEynKoML0LLlxgk4goWocTO2rD9PJFwevvl5o47cOyDT4xAbkcBGdnvw3+Bq4jEbI5vIjJIhVcO+to830N1GxzgtYJ79eiMRqcM5VEcw5Bgmj/2LcNVlZc+9uAUl3CYrA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=none smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4X2nd01QKNz4f3jsG; Tue, 10 Sep 2024 10:26:12 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 848971A058E; Tue, 10 Sep 2024 10:26:27 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S9; Tue, 10 Sep 2024 10:26:27 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 5/7] spi: slave-mt27xx: switch to use target_abort Date: Tue, 10 Sep 2024 10:26:15 +0800 Message-ID: <20240910022618.1397-6-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S9 X-Coremail-Antispam: 1UD129KBjvJXoW7uryrKrykWFW3CrykAryxKrg_yoW8Kr18pF 47Wry3trWrArsavr9rJF4DuFZ0kF4fXry7Kw1rtw4fWr4YqryDGF4rtr92vF1YvayfKw1U ZF40k3sIgayIkrJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBjb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAV Cq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0 rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267 AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2 WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkE bVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY1x0262kKe7AKxVWUAVWUtwCF04k20xvY0x0EwI xGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480 Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7 IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k2 6cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxV AFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UM6wAUUUUU= X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang Switch to use modern name target_abort. No functional changed. Signed-off-by: Yang Yingliang --- drivers/spi/spi-slave-mt27xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c index 98cbc0c30e45..00d455dad135 100644 --- a/drivers/spi/spi-slave-mt27xx.c +++ b/drivers/spi/spi-slave-mt27xx.c @@ -69,7 +69,7 @@ struct mtk_spi_slave { struct clk *spi_clk; struct completion xfer_done; struct spi_transfer *cur_transfer; - bool slave_aborted; + bool target_aborted; const struct mtk_spi_compatible *dev_comp; }; @@ -118,7 +118,7 @@ static void mtk_spi_slave_disable_xfer(struct mtk_spi_slave *mdata) static int mtk_spi_slave_wait_for_completion(struct mtk_spi_slave *mdata) { if (wait_for_completion_interruptible(&mdata->xfer_done) || - mdata->slave_aborted) { + mdata->target_aborted) { dev_err(mdata->dev, "interrupted\n"); return -EINTR; } @@ -286,7 +286,7 @@ static int mtk_spi_slave_transfer_one(struct spi_controller *ctlr, struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); reinit_completion(&mdata->xfer_done); - mdata->slave_aborted = false; + mdata->target_aborted = false; mdata->cur_transfer = xfer; if (xfer->len > mdata->dev_comp->max_fifo_size) @@ -314,11 +314,11 @@ static int mtk_spi_slave_setup(struct spi_device *spi) return 0; } -static int mtk_slave_abort(struct spi_controller *ctlr) +static int mtk_target_abort(struct spi_controller *ctlr) { struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr); - mdata->slave_aborted = true; + mdata->target_aborted = true; complete(&mdata->xfer_done); return 0; @@ -402,7 +402,7 @@ static int mtk_spi_slave_probe(struct platform_device *pdev) ctlr->prepare_message = mtk_spi_slave_prepare_message; ctlr->transfer_one = mtk_spi_slave_transfer_one; ctlr->setup = mtk_spi_slave_setup; - ctlr->slave_abort = mtk_slave_abort; + ctlr->target_abort = mtk_target_abort; of_id = of_match_node(mtk_spi_slave_of_match, pdev->dev.of_node); if (!of_id) { From patchwork Tue Sep 10 02:26:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 828115 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5E7F14A09A; Tue, 10 Sep 2024 02:26:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935193; cv=none; b=gwBfZ8d2bK+0mqZ+JlzUeDXP2l6qcs1gnZWiVDD/i01W9AtXtHPsrKBklMSq66bbXj9aHDt5tsiOoEUBOTJw0ZQDf8cHbB0FryNyYSELBkB8OEdruM7bajqnEHtUcvdKYpTIShHxtMQPpZuEH7AW2Ax4Q6AFEgVE3H4u+aOhW4c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935193; c=relaxed/simple; bh=V+6wYhEz7BgX2SLxOy/nESTXWdm7o7QN6FvYCRcRBT8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uw+Sz2zAo9mOWGhLI8wz1p6/bcYNddVyAame3jgTCVYqcPiZSsAcgXMq5P2OLxr8Ich3hidLH7TSbuoXzRGlK3ehQgucZyKd+F/GGh/9FDhtcQquPb5ChSOQd0Z0bSxhEjhnPV4Hn7jVdrrYYQttfZFcxARyhO9cMLNffWi8D3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4X2nd10nddz4f3jsH; Tue, 10 Sep 2024 10:26:13 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 6FD101A0568; Tue, 10 Sep 2024 10:26:28 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S10; Tue, 10 Sep 2024 10:26:28 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 6/7] platform/olpc: olpc-xo175-ec: switch to use spi_target_abort(). Date: Tue, 10 Sep 2024 10:26:16 +0800 Message-ID: <20240910022618.1397-7-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S10 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw1UJw1rXryfuryruF4UArb_yoWkuwb_Gr 1xtrWxX3y09F4DCF1jkF4fJry0kryrWF1kXF1av3Waka45Xw1rXw4qkrW3A3Z2vrWDArZa ka1kZrZ5CryfCjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbf8YFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r126s 0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xG Y2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14 v26F4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AK xVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4kS14v26r126r1DMxAIw28IcxkI7VAKI4 8JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xv wVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjx v20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20E Y4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267 AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU1l_M7UUUUU== X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang Switch to use modern name function spi_target_abort(). No functional changed. Signed-off-by: Yang Yingliang --- drivers/platform/olpc/olpc-xo175-ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c index 62ccbcb15c74..fa7b3bda688a 100644 --- a/drivers/platform/olpc/olpc-xo175-ec.c +++ b/drivers/platform/olpc/olpc-xo175-ec.c @@ -536,7 +536,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp, dev_err(dev, "EC cmd error: timeout in STATE %d\n", priv->cmd_state); gpiod_set_value_cansleep(priv->gpio_cmd, 0); - spi_slave_abort(priv->spi); + spi_target_abort(priv->spi); olpc_xo175_ec_read_packet(priv); return -ETIMEDOUT; } @@ -653,7 +653,7 @@ static void olpc_xo175_ec_remove(struct spi_device *spi) if (pm_power_off == olpc_xo175_ec_power_off) pm_power_off = NULL; - spi_slave_abort(spi); + spi_target_abort(spi); platform_device_unregister(olpc_ec); olpc_ec = NULL; From patchwork Tue Sep 10 02:26:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 827299 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF22D61FE1; Tue, 10 Sep 2024 02:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935194; cv=none; b=On3Wh0le2IXt1ehzKeWNbz0Mz7G7Z/XbbtkjzR/KGM0Qs+q/ZEOdZjNfvXnoiLCPBVIw3BpjKlCYoqGfy+a7lID1X7hO6P5OtH95MdDuvcuPc0RyyNQU8tpolroc8EO/cnIkjiYfOIgwl4IhTdXdVoA8QOsUK0AhDODPxAMc94Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725935194; c=relaxed/simple; bh=y1TG+e9LqhH/Wjk+GdG0ujoJ28CWv1vLIC1OiTu3u0Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NghUP552hwUNFtiyE4XwMBbIkigL50YE88uFe0SrxqDJNXYwjR7NriXhidC1LK5wVrg1BCBGPfnWyfHRKb5GWw0zzLUOtUyGrXROAePF+erbAd+1QKsqUrqgfFn6R9M72gBA5B6sqiisXShU25oQFULYM44cTg4hOQKBe4NdkZI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4X2nd12SlPz4f3kvv; Tue, 10 Sep 2024 10:26:13 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 7EBDB1A058E; Tue, 10 Sep 2024 10:26:29 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.0.27]) by APP4 (Coremail) with SMTP id gCh0CgDH+8dKrt9m1gKTAw--.13967S11; Tue, 10 Sep 2024 10:26:29 +0800 (CST) From: Yang Yingliang To: broonie@kernel.org, hdegoede@redhat.com, matthias.bgg@gmail.com, yangyingliang@huawei.com, liwei391@huawei.com Cc: linux-spi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH -next 7/7] spi: remove spi_controller_is_slave() and spi_slave_abort() Date: Tue, 10 Sep 2024 10:26:17 +0800 Message-ID: <20240910022618.1397-8-yangyingliang@huaweicloud.com> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20240910022618.1397-1-yangyingliang@huaweicloud.com> References: <20240910022618.1397-1-yangyingliang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: gCh0CgDH+8dKrt9m1gKTAw--.13967S11 X-Coremail-Antispam: 1UD129KBjvJXoWxAF1UAF4Dur47uFWUZF4ktFb_yoW5ZFW7pF 47GF47AFZ5CFW5uFy5Kw48uF9xWFZa9rZ8G397t34fJw4aqa4UAFyUAr4FvFy5XFWxKw4U urW2vr1kGF1jvr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBYb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAV Cq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0 rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267 AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E 14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7 xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Y z7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26F4j6r4UJwCI42IY6xAI w20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x 0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU1l_M7UUUUU== X-CM-SenderInfo: 51dqw5xlqjzxhdqjqx5xdzvxpfor3voofrz/ From: Yang Yingliang spi_controller_is_slave() and spi_slave_abort() are all replaced, so they can be removed. No functional changed. Signed-off-by: Yang Yingliang --- drivers/spi/spi.c | 13 +------------ include/linux/spi/spi.h | 12 +----------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 03032bb7397c..073ffae97767 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2934,21 +2934,10 @@ static struct class spi_master_class = { #ifdef CONFIG_SPI_SLAVE /** - * spi_slave_abort - abort the ongoing transfer request on an SPI slave + * spi_target_abort - abort the ongoing transfer request on an SPI slave * controller * @spi: device used for the current transfer */ -int spi_slave_abort(struct spi_device *spi) -{ - struct spi_controller *ctlr = spi->controller; - - if (spi_controller_is_slave(ctlr) && ctlr->slave_abort) - return ctlr->slave_abort(ctlr); - - return -ENOTSUPP; -} -EXPORT_SYMBOL_GPL(spi_slave_abort); - int spi_target_abort(struct spi_device *spi) { struct spi_controller *ctlr = spi->controller; diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a9a6af11c974..8497f4747e24 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -498,7 +498,6 @@ extern struct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 ch * controller has native support for memory like operations. * @mem_caps: controller capabilities for the handling of memory operations. * @unprepare_message: undo any work done by prepare_message(). - * @slave_abort: abort the ongoing transfer request on an SPI slave controller * @target_abort: abort the ongoing transfer request on an SPI target controller * @cs_gpiods: Array of GPIO descriptors to use as chip select lines; one per CS * number. Any individual value may be NULL for CS lines that @@ -725,10 +724,7 @@ struct spi_controller { struct spi_message *message); int (*unprepare_message)(struct spi_controller *ctlr, struct spi_message *message); - union { - int (*slave_abort)(struct spi_controller *ctlr); - int (*target_abort)(struct spi_controller *ctlr); - }; + int (*target_abort)(struct spi_controller *ctlr); /* * These hooks are for drivers that use a generic implementation @@ -802,11 +798,6 @@ static inline void spi_controller_put(struct spi_controller *ctlr) put_device(&ctlr->dev); } -static inline bool spi_controller_is_slave(struct spi_controller *ctlr) -{ - return IS_ENABLED(CONFIG_SPI_SLAVE) && ctlr->slave; -} - static inline bool spi_controller_is_target(struct spi_controller *ctlr) { return IS_ENABLED(CONFIG_SPI_SLAVE) && ctlr->target; @@ -1266,7 +1257,6 @@ extern int devm_spi_optimize_message(struct device *dev, struct spi_device *spi, extern int spi_setup(struct spi_device *spi); extern int spi_async(struct spi_device *spi, struct spi_message *message); -extern int spi_slave_abort(struct spi_device *spi); extern int spi_target_abort(struct spi_device *spi); static inline size_t